mcp-agent-tool-adapter
About
Transforms MCP tools into collaborative, reasoning agents using modern agent frameworks.
Details
- Author
- serkanyasr
- Downloads
- 342
- Categories
- AI
Jump to
- Transforms MCP tools into Google ADK or LangGraph agents.
- Supports streaming interfaces via FastAPI or CLI.
- Handles tool server spawning, session management, and cleanup.
- Dynamically swap agent type by changing tool_type to "google" or "langgraph".
- Modular MCPClient architecture for tool adaptation.
Clone the repository, install dependencies with pip install -r requirements.txt, define tools in mcp_config.json, then run either python app_client_adk.py for a Google ADK CLI agent or python app_client_langgraph.py for a LangGraph ReAct CLI agent.
<p align="center">
<h1 align="center">mcp-agent-tool-adapter</h1>
</p>
<p align="center">
<em>From Protocol to Intelligence: Powering Agents with MCP.</em>
</p>
<p align="center">
</p>
---
π Overview
MCP Agent Tool Adapter enables modular tool invocation via the MCP protocol, and provides agents that can dynamically reason with tools using either Google ADK or LangGraph.
This project transforms MCP tools into:
- π€ Google ADK-based agents with streaming FastAPI or CLI interfaces
- π§ LangGraph-based agents that use ReAct + streaming tool planning
---
π§± Project Structure
mcp-agent-tool-adapter/
βββ mcp_client/ # Core client implementation (modular)
β βββ client.py # MCPClient & MCPServer
β βββ tool_loader.py # High-level async loader
β βββ types.py # Shared type definitions
βββ app_client_adk.py # Google ADK agent + CLI chat
βββ app_client_langgraph.py # LangGraph agent + ReAct CLI chat
βββ mcp_config.json # Example MCP tool config
βββ requirements.txt # Dependencies
βββ README.md
---
π Getting Started
βοΈ Prerequisites
- Python 3.10+
βοΈ Installation
# Clone this repository
β― git clone https://github.com/serkanyasr/mcp-agent-tool-adapter
β― cd mcp-agent-tool-adapter
Install dependencies
β― pip install -r requirements.txt
---
π€ Usage
Run Google ADK CLI agent:
β― python app_client_adk.py
Run LangGraph ReAct CLI agent:
β― python app_client_langgraph.py
Ensure your mcp_config.json defines tools like:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["@modular-protocol/filesystem"]
}
}
}
---
π§ Tool Architecture
MCP tools are connected to agents through MCPClient, which handles:
- Tool server spawning (via subprocess)
- Session management
- Tool adaptation (langgraph or Google ADK)
- Cleanup
You can dynamically swap agent type by changing tool_type to "google" or "langgraph" in your app.
---
π§ͺ Development / Contributing
- Fork the repo and create feature branches.
- Submit a PR with a description of your changes.
- Tag @serkanyasr in issues or PRs.
We welcome contributions in:
- π§© new MCP tool adapters
- π§ multi-agent LangGraph use cases
- π οΈ OpenAPI / streaming support
---
π License
This project is licensed under the MIT License.For more details, refer to the LICENSE file.
---
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
