MCP-Agent
@shane-kercheval
Basic information
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
More Agent Frameworks MCP clients
mcp-cli
wong2A CLI inspector for the Model Context Protocol
Where On-Device and Cloud LLMs Meet
hazyresearchBig & Small LLMs working together
Saiki
truffle-aiA customizable, general purpose AI Agent that supports MCP. Talk to Saiki in natural language to control computers, applications and more!
Novu - Connect your AI agents & products to customers
NovuNovu is the open-source communication layer for AI agents. An agent built on Novu connects to MCP servers like Linear, GitHub, and Notion for its tools, then talks with your users on Slack, Microsoft Teams, WhatsApp, Tel
Smolagents
huggingface🤗 smolagents: a barebones library for agents that think in code.
Comments