FastMCP Implementation
A production-ready MCP (Model Context Protocol) server and client implementation using FastMCP, Python 3.13, and modern async patterns.
<Ż What is This?
This project demonstrates how to build clean, readable MCP servers and clients using the FastMCP library. It includes:
- 3 Production MCP Servers (Weather, News, Finance)
- Intelligent MCP Client with LLM integration (Anthropic/OpenAI)
- Interactive Chat Interface for testing
- Automated Test Suite for validation
=€ Quick Start
1. Install Dependencies```bash
cd fastmcp-implementation
uv sync
### 2. Configure API Keys
Edit `.env` file with your API keys:```bash
# LLM Provider (required)
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here
# External APIs (optional - servers will work with test keys)
OPENWEATHER_API_KEY=your_key_here
NEWS_API_KEY=your_key_here
EXCHANGERATE_API_KEY=your_key_here
3. Run Automated Tests```bash
uv run python examples/test_demo.py
Expected output:```
======================================================================
TEST SUMMARY
======================================================================
[PASS] Weather Server
[PASS] News Server
[PASS] Finance Server
Total: 3/3 tests passed
======================================================================
4. Try Interactive Mode```bash
uv run python examples/interactive_client.py
## =Á Project Structure```
fastmcp-implementation/
server/ # MCP servers (Weather, News, Finance)
client/ # MCP client with LLM integration
examples/ # Interactive demo and tests
.env # API keys (gitignored)
pyproject.toml # UV dependencies
=ŕ Tech Stack
- Python 3.13.1 - Latest Python release
- UV - Fast package manager
- MCP SDK 1.19.0 - Model Context Protocol
- Anthropic/OpenAI - LLM providers
- httpx - Async HTTP client
Success - All Tests Passed!```
[PASS] Weather Server - 2 tools discovered
[PASS] News Server - 2 tools discovered
[PASS] Finance Server - 3 tools discovered
Total: 3/3 tests passed
```
See full documentation in FASTMCP_IMPLEMENTATION_PLAN.md