DeepMCPAgent  by cryxnet

Model-agnostic agents discover and use HTTP/SSE tools

Created 2 weeks ago

New!

534 stars

Top 59.6% on SourcePulse

GitHubView on GitHub
Project Summary

Model-agnostic LangChain/LangGraph agents are provided by DeepMCPAgent, enabling dynamic discovery and use of tools served over HTTP/SSE via the MCP protocol. This approach eliminates manual tool wiring, allowing developers to rapidly build production-ready agents with flexibility in model choice and robust agent loops, whether using DeepAgents or LangGraph ReAct fallbacks.

How It Works

DeepMCPAgent bridges LLMs with external tools by dynamically discovering them from MCP servers. It converts tool definitions (JSON-Schema) into Pydantic models and then into LangChain BaseTool objects, ensuring typed and validated arguments. The agent runtime supports any LangChain chat model instance and orchestrates the agent loop, prioritizing DeepAgents for enhanced functionality or falling back to the LangGraph ReAct pattern. It can connect to remote MCP servers, supporting authentication via HTTP headers.

Quick Start & Requirements

  • Installation: Install via pip: pip install "deepmcpagent[deep]" (recommended for DeepAgents support). For development tooling (linting, typing, tests), use pip install "deepmcpagent[deep,dev]".
  • Prerequisites: Python environment. Requires a LangChain-compatible chat model (e.g., OpenAI, Anthropic, Ollama, Groq).
  • Setup: Run a sample MCP server (e.g., python examples/servers/math_server.py) and then execute an example agent (python examples/use_agent.py).
  • Documentation: Links to official documentation and issues are mentioned but not provided in the README.
  • CLI: Offers deepmcpagent list-tools and deepmcpagent run for interactive agent use without Python scripting.

Highlighted Details

  • Zero Manual Tool Wiring: Tools are discovered dynamically from MCP servers (HTTP/SSE).
  • Model-Agnostic: Compatible with any LangChain chat model instance or provider ID string.
  • Typed Tool Arguments: Leverages JSON-Schema → Pydantic → LangChain BaseTool for robust typing and validation.
  • External API Support: Connects to remote MCP servers, including authentication via headers.
  • Quality Bar: Enforces strict quality standards with mypy, ruff, pytest, and GitHub Actions.

Maintenance & Community

The provided README does not contain specific details regarding maintainers, community channels (like Discord or Slack), sponsorships, or a public roadmap.

Licensing & Compatibility

The project is licensed under the Apache-2.0 license. No specific compatibility notes regarding commercial use or closed-source linking are detailed.

Limitations & Caveats

The implementation strictly relies on MCP tools served over HTTP/SSE. The agent loop prefers DeepAgents but falls back to LangGraph ReAct. Troubleshooting notes indicate potential issues with environment management (PEP 668), server path configuration (404 errors), and tool wrapper stability. High token counts are noted as normal for tool-calling models. The README explicitly states that diagrams reflect the "current implementation," suggesting potential for ongoing changes.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
9
Issues (30d)
1
Star History
535 stars in the last 20 days

Explore Similar Projects

Feedback? Help us improve.