mcp-agent-tool-adapter

by serkanyasr

342 downloads
Not rated
GitHub

About

Transforms MCP tools into collaborative, reasoning agents using modern agent frameworks.

Details

Author
serkanyasr
Downloads
342
Categories
AI

- 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">
license
last-commit
repo-top-language
repo-language-count
</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.

---

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.