MCPAgentAI
Python SDK designed to simplify interactions with MCP (Model Context Protocol) servers. It provides an easy-to-use interface for connecting to MCP servers, reading resources, and calling tools
What is MCPAgentAI?
MCPAgentAI is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to python sdk designed to simplify interactions with mcp (model context protocol) servers. it provides an easy-to-use interface for connecting to mcp servers, reading resources, and calling tools
Python SDK designed to simplify interactions with MCP (Model Context Protocol) servers. It provides an easy-to-use interface for connecting to MCP servers, reading resources, and calling tools
This server falls under the APIs and Coding Agents categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Python SDK designed to simplify interactions with MCP (Model
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcpagentaiConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCPAgentAI
MCPAgentAI is a Python SDK and multi-tool agent framework that simplifies building applications on top of MCP servers by providing a unified interface for connecting to MCP servers, reading resources, and invoking tools. It ships with a collection of pre-built tool agents covering Twitter automation, cryptocurrency price tracking, weather data, stock market information, currency exchange, dictionary lookups, and a calculator, all composable through a MultiToolAgent abstraction. Python developers building AI agents or chatbots who want to add real-world data retrieval and social media actions without writing MCP boilerplate can use MCPAgentAI as a foundation.
Prerequisites
- Python 3.8 or higher
- pip package manager
- An Anthropic API key (ANTHROPIC_API_KEY) to use Claude as the backing LLM
- Optional: Twitter API credentials if enabling the Twitter agent
- An MCP-compatible client or the MCPAgentAI framework itself as the runtime
Install MCPAgentAI
Install the package from PyPI using pip. This installs the SDK, all built-in tool agents, and the MCP client runtime.
pip install mcpagentaiSet your Anthropic API key
Export the key so MCPAgentAI can call Claude for agent orchestration.
export ANTHROPIC_API_KEY="sk-ant-..."Write a minimal agent using MultiToolAgent
Compose the agents you need by passing a list of tool agent instances to MultiToolAgent. Only the agents you include are loaded.
from mcpagentai.tools.time_agent import TimeAgent
from mcpagentai.tools.weather_agent import WeatherAgent
from mcpagentai.core.multi_tool_agent import MultiToolAgent
agent = MultiToolAgent([TimeAgent(), WeatherAgent()])
result = agent.run("What is the current time in Tokyo and will it rain tomorrow?")
print(result)Enable Twitter integration (optional)
If you want Twitter automation, set the required credentials as environment variables before instantiating the agent.
export TWITTER_API_KEY="your-api-key"
export TWITTER_API_SECRET="your-api-secret"
export TWITTER_ACCESS_TOKEN="your-access-token"
export TWITTER_ACCESS_SECRET="your-access-secret"
export TWITTER_BEARER_TOKEN="your-bearer-token"Run with Docker (optional)
For a containerized deployment, build the provided Docker image and pass environment variables at runtime.
docker build -t mcpagentai .
docker run -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY mcpagentaiMCPAgentAI Examples
Client configuration
Claude Desktop configuration that runs MCPAgentAI as an MCP server subprocess, exposing its tools to Claude.
{
"mcpServers": {
"mcpagentai": {
"command": "python",
"args": ["-m", "mcpagentai"],
"env": {
"ANTHROPIC_API_KEY": "your-anthropic-api-key"
}
}
}
}Prompts to try
Example interactions that exercise the pre-built tool agents for data retrieval and automation.
- "What is the current price of Bitcoin in USD?"
- "What is the weather forecast for London tomorrow?"
- "Convert 1000 EUR to JPY at the current exchange rate"
- "Look up the definition of the word 'ephemeral'"
- "What is the latest stock price for NVDA?"Troubleshooting MCPAgentAI
AuthenticationError when running the agent
Ensure ANTHROPIC_API_KEY is exported in the same shell session or set in the env block of your MCP client config. The key must start with 'sk-ant-'.
Twitter tool raises a 403 Forbidden error
Twitter API v2 requires Elevated access for most write operations. Verify your app has the correct permissions in the Twitter Developer Portal and that all six Twitter credentials (API key, secret, access token, access secret, client ID, client secret) are set correctly.
A tool agent returns stale or unavailable data
Some tool agents (weather, currency, stocks) rely on third-party APIs that may require their own API keys. Check the agent's documentation in the mcpagentai/tools directory for the specific required environment variables.
Frequently Asked Questions about MCPAgentAI
What is MCPAgentAI?
MCPAgentAI is a Model Context Protocol (MCP) server that python sdk designed to simplify interactions with mcp (model context protocol) servers. it provides an easy-to-use interface for connecting to mcp servers, reading resources, and calling tools It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCPAgentAI?
Follow the installation instructions on the MCPAgentAI GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCPAgentAI?
MCPAgentAI works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCPAgentAI free to use?
Yes, MCPAgentAI is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.
MCPAgentAI Alternatives โ Similar APIs Servers
Looking for alternatives to MCPAgentAI? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
โ 43.4k๐ฆ The API and AI Gateway
API Mega List
โ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHubโperiod. ๐ช
Fetch
โ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
โ 2.1kSelf-Hosted API Management for Builders
Korean Law
โ 1.8k๊ตญ๊ฐ๋ฒ๋ น์ ๋ณดMCP v4.0 | ๋ฒ์ ์ฒ 41๊ฐ API โ 17๊ฐ MCP ๋๊ตฌ. ๋ฒ๋ นยทํ๋กยท์กฐ๋ก ๊ฒ์ + LLM ํ๊ฐ ๋ฐฉ์ง ์ธ์ฉ๊ฒ์ฆ + ์กฐ๋ฌธ ์ํฅ ๊ทธ๋ํ(impact_map) + ์์ ๋น๊ต ์๋ diff(time_travel) + ์๋ฏผ 5๋จ๊ณ ์คํ ๊ฐ์ด๋(action_plan) | 41 Korean legal APIs โ 17 MCP tools
RuleGo
โ 1.5kโ๏ธRuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Browse More APIs MCP Servers
Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCPAgentAI in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCPAgentAI?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.