π― Sample MCP ServersΒΆ
The MCP Context Forge Gateway includes a collection of high-performance sample MCP servers built in different programming languages. These servers serve multiple purposes: demonstrating best practices for MCP implementation, providing ready-to-use tools for testing and development, and showcasing the performance characteristics of different language ecosystems.
Perfect for testing, learning, and production use - each server is optimized for speed, reliability, and demonstrates language-specific MCP patterns.
π Available ServersΒΆ
𦫠Fast Time Server (Go)¢
mcp-servers/go/fast-time-server
- Ultra-fast timezone and time conversion tools
- Language: Go 1.21+
- Performance: Sub-millisecond response times
- Transport: stdio, HTTP, SSE, dual-mode
- Tools:
get_system_time
, timezone conversions with DST support - Container:
ghcr.io/ibm/fast-time-server:latest
Quick StartΒΆ
# Docker (recommended)
docker run --rm -it -p 8888:8080 \
ghcr.io/ibm/fast-time-server:latest \
-transport=dual -log-level=debug
# From source
cd mcp-servers/go/fast-time-server
make build && make run
π Planned SamplesΒΆ
π Python SamplesΒΆ
- Fast Calculator Server - Mathematical operations and conversions
- System Info Server - OS and hardware information tools
- File Operations Server - Safe file system operations
π¨ JavaScript/TypeScript SamplesΒΆ
- Web Scraper Server - URL content extraction and parsing
- JSON Transformer Server - Data transformation and validation
- API Client Server - REST API interaction tools
π¦ Rust SamplesΒΆ
- High-Performance Parser Server - Ultra-fast text and data parsing
- Crypto Utils Server - Cryptographic operations and hashing
- Network Tools Server - Network diagnostics and utilities
β Java SamplesΒΆ
- Enterprise Integration Server - Database and messaging operations
- Document Processor Server - PDF and office document handling
- Monitoring Server - Application metrics and health checks
π― Use CasesΒΆ
π§ͺ Testing & DevelopmentΒΆ
- Protocol Testing - Validate MCP client implementations
- Performance Benchmarking - Compare language runtime characteristics
- Integration Testing - Test gateway federation and tool routing
π Learning & ReferenceΒΆ
- Best Practices - Language-specific MCP implementation patterns
- Architecture Examples - Different transport and authentication approaches
- Performance Optimization - Learn optimization techniques per language
π Production ReadyΒΆ
- Horizontal Scaling - All servers support container orchestration
- Monitoring Integration - Built-in health checks and metrics
- Security Hardened - Authentication, input validation, and safe defaults
π Gateway IntegrationΒΆ
All sample servers are designed to integrate seamlessly with the MCP Gateway:
Direct RegistrationΒΆ
# Register any sample server with the gateway
curl -X POST -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"sample_server","url":"http://localhost:8080/sse"}' \
http://localhost:4444/gateways
Via Translate BridgeΒΆ
# Expose stdio servers over SSE using mcpgateway.translate
python3 -m mcpgateway.translate \
--stdio "path/to/sample-server" \
--expose-sse \
--port 8002
Testing with WrapperΒΆ
# Test through mcpgateway.wrapper
export MCP_AUTH=$MCPGATEWAY_BEARER_TOKEN
export MCP_SERVER_URL='http://localhost:4444/servers/UUID_OF_SERVER_1'
python3 -m mcpgateway.wrapper
π Development GuidelinesΒΆ
Adding New Sample ServersΒΆ
Each sample server should follow these conventions:
Directory StructureΒΆ
mcp-servers/
βββ go/
β βββ your-server/
β βββ main.go
β βββ Makefile
β βββ Dockerfile
β βββ README.md
βββ python/
β βββ your-server/
β βββ main.py
β βββ pyproject.toml
β βββ Dockerfile
β βββ README.md
βββ typescript/
βββ your-server/
βββ src/index.ts
βββ package.json
βββ Dockerfile
βββ README.md
Required FeaturesΒΆ
- β Multiple transports - stdio, SSE, HTTP support
- β Container ready - Dockerfile with multi-stage builds
- β
Health checks -
/health
endpoint for monitoring - β Authentication - Bearer token support for web transports
- β Logging - Configurable log levels
- β Documentation - Complete usage examples and API docs
Performance TargetsΒΆ
- Response Time: < 10ms for simple operations
- Memory Usage: < 50MB baseline memory footprint
- Startup Time: < 1 second cold start
- Throughput: > 1000 requests/second under load
π Performance ComparisonΒΆ
Server | Language | Response Time | Memory | Binary Size | Cold Start |
---|---|---|---|---|---|
fast-time-server | Go | 0.5ms | 8MB | 12MB | 100ms |
(planned) | Python | ~2ms | 25MB | N/A | 300ms |
(planned) | TypeScript | ~3ms | 35MB | N/A | 400ms |
(planned) | Rust | 0.3ms | 4MB | 8MB | 50ms |
(planned) | Java | ~5ms | 45MB | 25MB | 800ms |
Benchmarks measured on standard GitHub Actions runners
π€ ContributingΒΆ
We welcome contributions of new sample servers!
Contribution ProcessΒΆ
- Choose a language and create the directory structure
- Implement core MCP functionality following our guidelines
- Add comprehensive tests and performance benchmarks
- Create documentation following the fast-time-server example
- Submit a pull request with your implementation
Language PrioritiesΒΆ
We're particularly interested in: - Python - Most popular for AI/ML tooling - TypeScript - Web-native integration - Rust - Maximum performance critical applications - Java - Enterprise integration scenarios
π ResourcesΒΆ
MCP SpecificationΒΆ
Gateway DocumentationΒΆ
Development ToolsΒΆ
- MCP Inspector - Interactive protocol debugging
- mcpgateway.translate Bridge - stdio β SSE/Streamable HTTP bridge
- UV - Fast Python package management
π Quick LinksΒΆ
Want to add a new sample server? Open an issue or submit a pull request!