MCP Docker Demo
A Model Context Protocol (MCP) server implementation with Docker support and a web-based inspector.
š Quick Start
1. Build the Docker Image
2. Test the Server (Simple Client)
3. Launch Web Inspector (Recommended)
Then open your browser to: http://localhost:8000
š Project Structure
š§ What's Inside
MCP Server (server.py)
Implements a simple "hello-world" tool
Accepts a greeting and returns it with " World!" appended
Runs over stdio transport
Includes debug logging
Web Inspector (mcp_inspector_web.py)
Beautiful web interface for testing MCP servers
Lists available tools
Shows tool schemas
Interactive testing with real-time results
Built with FastAPI
Simple Client (client.py)
Command-line MCP client
Connects to server via stdio
Tests the hello-world tool
š ļø Development
Local Development (without Docker)
Run Web Inspector Locally
š API Reference
Hello World Tool
Name: hello-world
Description: A simple tool that returns a greeting.
Input Schema:
Example:
š³ Docker Commands
š Troubleshooting
"Connection closed" Error
This usually means the server failed to start. Check:
Python version (should be 3.11+)
All dependencies installed
Server logs for errors
Port Already in Use
If port 8000 is busy:
Then open: http://localhost:8001
š Learn More
š¤ Contributing
Feel free to open issues or submit pull requests!
š License
MIT License - feel free to use this code however you'd like!