MCP-Agent
@shane-kercheval
About MCP-Agent
CLI that uses DSPy to interact with MCP servers.
Overview
What is MCP-Agent?
MCP-Agent is a command-line interface (CLI) that uses DSPy to interact with MCP (Model Context Protocol) servers. It runs on any platform that supports Python and DSPy, and is designed for developers who want an autonomous agent experience similar to Claude Desktop but with full control over MCP server configuration and tool usage.
How to use MCP-Agent?
Create a .env file with OPENAI_API_KEY, adjust the server configuration path in the provided JSON config file, then run make build followed by make chat. The chat command loads all MCP servers defined in the configuration and makes their tools available to the DSPy agent, which autonomously uses them to fulfill user requests.
Key features of MCP-Agent
- Autonomous tool orchestration via DSPy agent
- Loads multiple MCP servers from a single Claude‑compatible config file
- Works with any MCP server providing tools
- CLI‑based, no GUI required
- Example includes simple tools like
count_charactersandcalculator_multiply - Uses
openai/gpt-4o-minias the default model
Use cases of MCP-Agent
- Perform multi‑step calculations on text data (e.g., count characters across texts and multiply results)
- Automate data extraction or transformation by chaining MCP tools
- Test and prototype MCP server integrations in a headless environment
- Trigger sequences of actions that require reasoning and tool selection
FAQ from MCP-Agent
How do I set up MCP-Agent?
Create a .env file in the project directory containing OPENAI_API_KEY, adjust the path in ./servers/mcp_fake_server_config.json to point to your project’s servers directory, then run make build and make chat.
What MCP servers can I use?
Any MCP server that defines tools compatible with the MCP protocol. The agent loads all servers listed in a configuration file (the same format used by Claude Desktop) and makes their combined tools available.
Does MCP-Agent support multiple servers simultaneously?
Yes. The CLI loads all servers defined in
Basic information
More Agent Frameworks MCP clients
GenAIScript
microsoftAutomatable GenAI Scripting
MCP CLI client
adhikaspA simple CLI to run LLM prompt and implement MCP client.
Unified MCP Client Library
mcp-usemcp-use is the easiest way to interact with mcp servers with custom agents
Computer Use AI SDK
mediar-aiHermes MCP
cloudwalkElixir Model Context Protocol (MCP) SDK
Comments