Unlock over 650 MCP server tools seamlessly integrated with popular agent frameworks for enhanced AI workflows
MCPAdapt is an open-source project designed to facilitate easy integration of Model Context Protocol (MCP) servers into various agentic frameworks. It allows anyone to access and utilize over 650 MCP servers directly within their preferred agentic setup, enabling widespread deployment of AI tools and resources.
MCPAdapt makes it effortless for developers and integrators to leverage the Model Context Protocol (MCP) in their projects. MCP is an open-source protocol introduced by Anthropic that simplifies the process of making tools and data available as "MCP servers." These servers can be used by supported MCP clients, such as Claude Desktop, Continue, and Cursor, enabling powerful AI functionality.
MCPAdapt offers several key features:
MCPAdapt implements the Model Context Protocol to enable communication between MCP clients and servers. This protocol defines how data and commands are transmitted, ensuring that both client and server adhere to a common standard for interaction. The implementation details include:
To get started, you can install MCPAdapt using pip or as part of Smolagents. Here’s how:
Since version 1.4.1, Smolagents includes MCPAdapt pre-integrated. You can add it like so:
uv add smolagents[mcp]
For other frameworks, you need to install mcpadapt
along with the specific framework adapter:
# Using pip
pip install mcpadapt[langchain]
# Or using uv in Smolagents context
uv add mcpadapt[langchain]
You can also specify multiple frameworks by separating them with commas.
Imagine a scenario where an AI needs to process and analyze data streamed from an MCP server. Here’s how it would work:
from mcp import StdioServerParameters
from mcpadapt.core import MCPAdapt
from mcpadapt.smolagents_adapter import SmolAgentsAdapter
with MCPAdapt(
StdioServerParameters(command="uv", args=["run", "src/analyze_data.py"]),
SmolAgentsAdapter(),
) as tools:
# Process and analyze data from the MCP server in real-time
...
Developers can use MCPAdapt to integrate custom prompt generation into their AI applications, allowing for dynamic and context-aware interactions.
from mcp import StdioServerParameters
from mcpadapt.core import MCPAdapt
from mcpadapt.langchain_adapter import LangChainAdapter
with MCPAdapt(
StdioServerParameters(command="uv", args=["run", "src/generate_prompts.py"]),
LangChainAdapter(),
) as tools:
# Generate custom prompts based on user inputs and MCP server data
...
MCPAdapt is compatible with various MCP clients, ensuring that developers can choose the right tool for their needs. Below is a compatibility matrix:
MCP Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✕ |
Continue | ✕ | ✕ | ❌ |
Cursor | ✖ | ✓ | ✕ |
To ensure smooth integration, MCPAdapt is designed to work seamlessly across different agentic frameworks. We provide performance metrics and compatibility notes in our documentation.
Here’s an example of how you might configure your mcpServers
section:
{
"mcpServers": {
"exampleServer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-example"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
For advanced users, MCPAdapt offers several configuration options and security best practices. Ensure that your MCP servers are properly secured to prevent unauthorized access.
When using MCP servers over SSE (Server-Sent Events), always ensure:
Integrating MCPAdapt into Smolagents is straightforward. Use the following command:
uv add smolagents[mcp]
Yes, you can adapt Google GenAI servers using MCPAdapt’s google_genai_adapter
. Add it to your project as follows:
pip install mcpadapt[google_genai]
MCPAdapt supports real-time communication through asynchronous operations. Ensure that both frameworks support this feature.
You can run tests by adapting tools from different servers and verifying their functionality within your agentic workflow.
Yes, certain environment variables might be needed depending on the server you are integrating. Always refer to the official documentation of the server being used.
Contributing to MCPAdapt is easy and welcoming. Follow these steps:
Explore more about the Model Context Protocol and its ecosystem at our official documentation:
Join us in building a future where AI and tools work seamlessly together.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
MCP Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ (Full) |
Continue | ❌ | ✅ | ❌ (Partial) |
Cursor | ✖ | ✓ | ✕ |
{
"mcpServers": {
"mathServer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-math"],
"env": {
"API_KEY": "your-api-key"
}
},
"dataAnalysisServer": {
"command": "npm",
"args": ["run", "serve"]
}
}
}
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods