MCP-Agent logo

MCP-Agent

by shane-kercheval

MCP-Agent is a CLI tool that uses DSPy to interact with MCP servers, aiming for a Claude Desktop-like experience. It leverages tool definitions from MCP servers to autonomously fulfill user requests.

View on GitHub

Last updated: N/A

What is MCP-Agent?

MCP-Agent is a command-line interface that utilizes DSPy to interact with MCP (Modular Computation Protocol) servers. It is designed to mimic the functionality of Claude Desktop, enabling autonomous operation of tools defined within the MCP servers to accomplish user requests.

How to use MCP-Agent?

To use MCP-Agent, you need to:

  1. Create a .env file with your OPENAI_API_KEY.
  2. Adjust the server path in ./servers/mcp_fake_server_config.json.
  3. Build the project with make build.
  4. Start the chat interface using make chat, which uses the specified configuration file and the openai/gpt-4o-mini model.

Key features of MCP-Agent

  • DSPy agent integration

  • MCP server interaction

  • Tool-based autonomous operation

  • Configuration via JSON files

  • CLI interface

Use cases of MCP-Agent

  • Automated execution of tasks based on user requests using defined tools

  • Integration with MCP servers for access to various functionalities

  • Simulation of Claude Desktop-like interactions

  • Testing and development of MCP servers and their tools

FAQ from MCP-Agent

What is MCP?

MCP stands for Modular Computation Protocol, likely a protocol for interacting with modular servers containing tools.

What is DSPy?

DSPy is a framework used to build declarative self-improving language model pipelines.

How do I set up the environment?

Create a .env file with your OpenAI API key and adjust the server path in the configuration file.

What model is used by default?

The default model is openai/gpt-4o-mini.

How do I resolve the 'spawn uv ENOENT' error?

Provide the full path to the uv command in the configuration and include the --directory flag referencing the project directory.