# MCP Server Model Context Protocol (MCP) server implementation for Atlas voice agent. ## Overview This server exposes tools via JSON-RPC 2.0 protocol, allowing LLM agents to interact with external services and capabilities. ## Architecture - **Protocol**: JSON-RPC 2.0 - **Transport**: HTTP (can be extended to stdio) - **Tools**: Modular tool system with registration ## Quick Start ### Setup (First Time) ```bash # Create virtual environment and install dependencies ./setup.sh # Or manually: python3 -m venv venv source venv/bin/activate pip install -r requirements.txt ``` ### Running the Server ```bash # Option 1: Use the run script (recommended) ./run.sh # Option 2: Activate venv manually and run as module source venv/bin/activate python -m server.mcp_server # Server runs on http://localhost:8000/mcp ``` **Note**: On Debian/Ubuntu systems, you must use a virtual environment due to PEP 668 (externally-managed-environment). The setup script handles this automatically. ## Testing ```bash # Test tools/list curl -X POST http://localhost:8000/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}' # Test tools/call (echo tool) curl -X POST http://localhost:8000/mcp \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "tools/call", "params": {"name": "echo", "arguments": {"text": "hello"}}, "id": 2 }' ``` ## Tools Currently implemented: - `echo` - Simple echo tool for testing - `weather` - Weather lookup (stub implementation) See `tools/` directory for tool implementations.