Skip to content

🎯 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

πŸ“– 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

πŸš€ Coming Soon

🐍 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
coming soon Python ~2ms 25MB N/A 300ms
coming soon TypeScript ~3ms 35MB N/A 400ms
coming soon Rust 0.3ms 4MB 8MB 50ms
coming soon Java ~5ms 45MB 25MB 800ms

Benchmarks measured on standard GitHub Actions runners


🀝 Contributing

We welcome contributions of new sample servers!

Contribution Process

  1. Choose a language and create the directory structure
  2. Implement core MCP functionality following our guidelines
  3. Add comprehensive tests and performance benchmarks
  4. Create documentation following the fast-time-server example
  5. 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



Want to add a new sample server? Open an issue or submit a pull request!