π― Sample MCP Servers
The ContextForge 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
π Full Documentation β
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 ContextForge:
!!! tip "Gateway URL"
- Direct installs (uvx, pip, or docker run): http://localhost:4444
- Docker Compose (nginx proxy): http://localhost:8080
Direct Registration
# Set the gateway base URL
export BASE_URL="http://localhost:4444"
# export BASE_URL="http://localhost:8080" # docker-compose with nginx
# 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"}' \
$BASE_URL/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="$BASE_URL/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 -
/healthendpoint 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
- 𦫠Fast Time Server (Go) β
Want to add a new sample server? Open an issue or submit a pull request!