MCP-Orchestrator

abialemuel/MCP-Orchestrator

3.2

If you are the rightful owner of MCP-Orchestrator and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP Proxy Server is a FastMCP-based proxy server that facilitates access to MCP services through the Model Context Protocol, offering native MCP support and multiple transport options.

Tools
5
Resources
0
Prompts
0

MCP Proxy Server

A FastMCP-based proxy server that provides access to MCP services through the Model Context Protocol. Built with FastMCP for native MCP support.

๐Ÿš€ Features

  • Native MCP Protocol: Full MCP support with multiple transports (SSE, STDIO, HTTP)
  • Multi-Server Support: Connect to multiple MCP servers simultaneously
  • Multiple Transport Options: Choose the best transport for your use case
  • Enhanced Logging: Context-aware logging and debugging
  • Type Safety: Built-in validation and error handling
  • Clean Architecture: Pure FastMCP implementation without unnecessary API layers

๐Ÿ“ฆ Installation

# Clone and install
git clone <repository-url>
cd tlkm-mcp
pip install .

# For development
pip install -e ".[dev]"

โš™๏ธ Configuration

Create a .env file:

# MCP Servers (JSON format)
MCP_SERVERS='{"server-name": "https://your-mcp-server.com"}'

# Authentication tokens (JSON format)  
MCP_SERVER_TOKENS='{"server-name": "your-api-key"}'

# Server settings
HOST=0.0.0.0
PORT=8000

๐Ÿƒโ€โ™‚๏ธ Running

Choose Transport

# Server-Sent Events (default, for web clients like GitHub Copilot)
python run_server.py --transport sse

# Standard I/O (for command-line tools)
python run_server.py --transport stdio

# HTTP streaming (for custom implementations)  
python run_server.py --transport http

๐Ÿ”Œ GitHub Copilot Integration

Add to your .vscode/mcp.json:

{
    "servers": {
        "mcp-proxy": {
            "url": "http://localhost:8000/sse"
        }
    }
}

Then start the server:

python run_server.py --transport sse

๐Ÿ”ง Available Tools

Core MCP Operations

  • list_all_tools - List all available tools from connected servers
  • call_mcp_tool - Call any tool on connected MCP servers (main interface)
  • get_server_status - Check status of all connected servers
  • reinitialize_servers - Restart all server connections
  • list_all_resources - List available resources from all servers
  • read_resource - Read specific resources by server and URI
  • list_all_prompts - List available prompts from all servers
  • get_prompt - Execute prompts with arguments

Server Tools (accessed via call_mcp_tool)

When you call call_mcp_tool, tools are automatically prefixed with server names:

  • server-name_tool1 - Tools are prefixed with server names
  • server-name_tool2 - Use the call_mcp_tool interface to access them
  • server-name_search - Each server provides its own set of tools

๐Ÿ’ป Usage

FastMCP Client Example

from fastmcp import Client
import asyncio

async def use_mcp_services():
    async with Client("http://localhost:8000") as client:
        # First, list all available tools
        tools_result = await client.call_tool("list_all_tools", {})
        print("Available tools:", tools_result)
        
        # Call a specific service (tools are prefixed with server name)
        result = await client.call_tool("call_mcp_tool", {
            "name": "server-name_tool-name",
            "arguments": {"query": "Your query here"}
        })
        print("Response:", result)

asyncio.run(use_mcp_services())

GitHub Copilot Usage

Once configured in .vscode/mcp.json, you can directly ask GitHub Copilot:

"What tools are available?"
"Call the search function with my query"

The tools will be automatically called with your natural language queries.

Command Line (STDIO)

# Start server in STDIO mode
python run_server.py --transport stdio

# Connect with MCP client tools or other MCP-compatible applications

๐Ÿ“š Resources & Prompts

Resources

  • config://servers - View configured MCP servers
  • config://status - Current server status

Prompts

  • Available prompts depend on connected servers
  • Use list_all_prompts to see what's available

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   MCP Client    โ”‚
โ”‚ (GitHub Copilot)โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚ MCP Protocol (SSE/STDIO/HTTP)
          โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  FastMCP Server   โ”‚
โ”‚  (Proxy Server)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Proxy Manager    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   External MCP    โ”‚
โ”‚     Servers       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ› ๏ธ Development

Quick Start

# Setup development environment
make dev-setup

# Start for GitHub Copilot
make copilot

# Start for MCP Inspector
make inspector

# Run tests
make test

# Code quality
make quality

Available Make Commands

make help           # Show all available commands
make run            # Run with SSE transport (default)
make run-sse        # Run with SSE transport
make run-http       # Run with HTTP transport  
make run-stdio      # Run with STDIO transport
make test           # Run tests
make format         # Format code
make lint           # Lint code
make docker         # Build and run Docker

๐Ÿงช Testing

# Test FastMCP functionality
python test_fastmcp.py

# Test server endpoints (requires running server)
python test_mcp_server.py

# Use MCP Inspector for interactive testing
python run_server.py --transport http
# Then open MCP Inspector and connect to http://localhost:8000/mcp

๐Ÿณ Docker

# Build and run with Docker
make docker

# Or manually:
docker build -t mcp-proxy-server .
docker run -p 8000:8000 --env-file .env mcp-proxy-server

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test your changes
  5. Submit a pull request