MCP Agent Example
A reference repo showing MCP server capabilities and agent integration
What is MCP Agent Example?
MCP Agent Example is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to reference repo showing mcp server capabilities and agent integration
A reference repo showing MCP server capabilities and agent integration
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A reference repo showing MCP server capabilities and agent i
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-agent-exampleConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Agent Example
mcp-agent-example is a reference repository demonstrating how to build and integrate MCP (Model Context Protocol) servers with AI agent workflows in Python. It pairs a minimal weather MCP server (weather_mcp.py) that exposes geolocation and weather forecast tools with a terminal-based agent (mini_tui_agent.py), showing the complete pattern for tool registration, agent loop design, and real API integration using public endpoints. Developers use it as a starting point for building their own MCP-powered agents.
Prerequisites
- Python 3.10 or later
- The mcp Python package (pip install mcp)
- An MCP-compatible client or the included mini_tui_agent.py for testing
- Internet access for the ipinfo.io and api.weather.gov public APIs (no API keys required)
Clone the repository
Download the reference implementation from GitHub.
git clone https://github.com/deepstation/mcp-agent-example.git
cd mcp-agent-exampleInstall dependencies
Install the project and its dependencies using pip or the project's pyproject.toml configuration.
pip install -e .Explore the MCP server implementation
Review weather_mcp.py to understand how tools are defined. The server exposes two tools: get_user_location (uses ipinfo.io for geolocation) and get_forecast (uses api.weather.gov for weather data). No API keys are needed for either service.
Run the weather MCP server
Start the weather MCP server in stdio mode. You can connect it directly to Claude Desktop or invoke it via the included agent.
python weather_mcp.pyRun the example agent
Launch the minimal TUI agent to see a complete agent-MCP interaction loop in your terminal.
python mini_tui_agent.pyConnect to Claude Desktop
Add the weather MCP server to Claude Desktop config to use it as a real MCP tool source.
{
"mcpServers": {
"mcp-agent-example": {
"command": "python",
"args": ["/absolute/path/to/mcp-agent-example/weather_mcp.py"]
}
}
}MCP Agent Example Examples
Client configuration
Claude Desktop configuration to run the example weather MCP server via Python.
{
"mcpServers": {
"mcp-agent-example": {
"command": "python",
"args": ["/absolute/path/to/mcp-agent-example/weather_mcp.py"]
}
}
}Prompts to try
Example prompts using the two tools exposed by the weather MCP server.
- "What is my current location based on my IP address?"
- "What's the weather forecast for my current location?"
- "Get my coordinates and then fetch the weather forecast for the next 24 hours"
- "Is it going to rain today where I am?"Troubleshooting MCP Agent Example
get_forecast returns no data or an error for non-US locations
The server uses api.weather.gov which only covers US locations. For coordinates outside the US the NWS API will return a 404 or empty response. This is a known limitation of the reference implementation.
Module not found errors when running weather_mcp.py
Run 'pip install -e .' from the repository root to install the package and all dependencies. Ensure you are using the correct Python environment where mcp is installed.
mini_tui_agent.py exits immediately without showing any output
Make sure weather_mcp.py is accessible and the mcp package is installed. Check that your terminal supports the TUI display. Run with Python's -v flag for verbose output to diagnose startup issues.
Frequently Asked Questions about MCP Agent Example
What is MCP Agent Example?
MCP Agent Example is a Model Context Protocol (MCP) server that reference repo showing mcp server capabilities and agent integration It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP Agent Example?
Follow the installation instructions on the MCP Agent Example GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP Agent Example?
MCP Agent Example works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Agent Example free to use?
Yes, MCP Agent Example is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
MCP Agent Example Alternatives — Similar Developer Tools Servers
Looking for alternatives to MCP Agent Example? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP Agent Example 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 MCP Agent Example?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.