Skip to main content
Glama

MCPilot - MCP Gateway

A powerful, FastAPI-based gateway for the Model Context Protocol (MCP), designed to unify and scale your AI toolchain.

โœ… Current Status

MCPilot is now fully functional with the following working features:

โœ… Working Features

  • FastAPI Gateway Server - Running on http://localhost:8000/docs

  • Admin Dashboard - Beautiful web UI at http://localhost:8000

  • REST API Endpoints - Full CRUD operations via /api/v1/*

  • API Wrapper System - Convert REST APIs to MCP tools (tested with JSONPlaceholder)

  • Configuration Management - Environment-based settings

  • Transport Framework - Ready for HTTP, WebSocket, SSE, stdio

  • Modular Architecture - Clean separation of concerns

  • Interactive Documentation - OpenAPI/Swagger UI at /docs

๐Ÿ”„ In Progress

  • MCP Server Federation - Basic framework ready, needs MCP client integration fixes

  • WebSocket Real-time Communication - Framework ready

  • Admin UI Management - Backend ready, frontend interactions needed

๐Ÿงช Tested Examples

The API wrapper successfully converts REST APIs to MCP tools:

# Example: JSONPlaceholder API โ†’ MCP Tool
result = await gateway.call_tool(
    "api:jsonplaceholder:get_user",
    {"user_id": "1"}
)
# Returns: Full user data from REST API

  1. Federation of multiple MCP servers into one unified endpoint

  2. REST API and function wrapping as virtual MCP-compliant tools

  3. Multiple transport support: HTTP/JSON-RPC, WebSocket, SSE, and stdio

  4. Centralized tools, prompts, and resources with full JSON-Schema validation

  5. Admin UI with built-in auth, observability, and transport layers

Related MCP server: MCPHubs

๐Ÿ“ Project Structure

src/mcpilot/
โ”œโ”€โ”€ main.py           # FastAPI application entry point
โ”œโ”€โ”€ config.py         # Configuration management
โ”œโ”€โ”€ gateway.py        # Core MCP federation logic
โ”œโ”€โ”€ api.py           # REST API endpoints
โ”œโ”€โ”€ admin.py         # Admin management endpoints
โ”œโ”€โ”€ transports.py    # Transport layer implementations
โ”œโ”€โ”€ api_wrapper.py   # REST API to MCP tool wrapper
โ”œโ”€โ”€ middleware.py    # Request/response middleware
โ””โ”€โ”€ server.py        # Original MCP server implementation

๐Ÿ› ๏ธ Installation

Prerequisites

  • Python 3.10 or higher

  • uv package manager (recommended) or pip

Install Dependencies

# Using uv (recommended)
uv sync

# Or using pip
pip install -e .

๐Ÿš€ Quick Start

1. Start the Gateway Server

# Run the FastAPI server
uv run python -m mcpilot.main

# Or using uvicorn directly
uvicorn mcpilot.main:app --reload --host 0.0.0.0 --port 8000

2. Access the Admin UI

Open your browser to http://localhost:8000 to access the admin dashboard.

3. API Documentation

  • OpenAPI/Swagger UI: http://localhost:8000/docs

  • ReDoc: http://localhost:8000/redoc

๐Ÿ”ง Configuration

MCPilot can be configured via environment variables or a .env file:

# Server Configuration
MCPILOT_HOST=0.0.0.0
MCPILOT_PORT=8000
MCPILOT_DEBUG=false

# CORS Settings
MCPILOT_CORS_ORIGINS=["*"]

# Logging
MCPILOT_LOG_LEVEL=INFO

Adding MCP Servers

Configure MCP servers via the admin API or by setting up the configuration:

from mcpilot.config import MCPServerConfig

server_config = MCPServerConfig(
    name="my-server",
    type="stdio",
    command="python",
    args=["-m", "my_mcp_server"],
    enabled=True
)

Adding API Wrappers

Convert REST APIs to MCP tools:

from mcpilot.config import APIWrapperConfig

api_config = APIWrapperConfig(
    name="my-api",
    base_url="https://api.example.com",
    auth_type="bearer",
    auth_config={"token": "your-token"},
    endpoints=[
        {
            "name": "get_user",
            "method": "GET",
            "path": "/users/{user_id}",
            "description": "Get user information",
            "path_params": [
                {"name": "user_id", "type": "string", "required": True}
            ]
        }
    ]
)

๐Ÿ“– API Endpoints

Core MCP Operations

  • GET /api/v1/tools - List all available tools

  • POST /api/v1/tools/call - Call a tool

  • GET /api/v1/prompts - List all available prompts

  • POST /api/v1/prompts/get - Get a prompt

  • GET /api/v1/resources - List all available resources

  • POST /api/v1/resources/read - Read a resource

Admin Operations

  • GET /admin/servers - List MCP servers

  • POST /admin/servers - Add new MCP server

  • PUT /admin/servers/{name} - Update MCP server

  • DELETE /admin/servers/{name} - Remove MCP server

  • GET /admin/api-wrappers - List API wrappers

  • POST /admin/api-wrappers - Add new API wrapper

Health & Monitoring

  • GET /health - Health check endpoint

  • GET /api/v1/status - Gateway and server status

  • GET /admin/metrics - System metrics

๐Ÿ”Œ WebSocket Support

Connect to the WebSocket endpoint for real-time MCP communication:

const ws = new WebSocket('ws://localhost:8000/api/v1/ws');

// Send MCP JSON-RPC message
ws.send(JSON.stringify({
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {}
}));

๐Ÿงช Development

Running in Development Mode

# Install development dependencies
uv sync --dev

# Run with auto-reload
uvicorn mcpilot.main:app --reload --host 0.0.0.0 --port 8000

Testing

# Run tests (when implemented)
uv run pytest

# Type checking
uv run mypy src/mcpilot

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Original MCP Server Components

MCPilot also includes the original MCP server functionality for development and testing:

Resources

The server implements a simple note storage system with:

  • Custom note:// URI scheme for accessing individual notes

  • Each note resource has a name, description and text/plain mimetype

Prompts

The server provides a single prompt:

  • summarize-notes: Creates summaries of all stored notes

    • Optional "style" argument to control detail level (brief/detailed)

    • Generates prompt combining all current notes with style preference

Tools

The server implements one tool:

  • add-note: Adds a new note to the server

    • Takes "name" and "content" as required string arguments

    • Updates server state and notifies clients of resource changes

Configuration

[TODO: Add configuration details specific to your implementation]

Quickstart

Install

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:

uv sync
  1. Build package distributions:

uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:

uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN

  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory C:\Users\ary7s\OneDrive\Desktop\MCPilot run mcpilot

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

Available Tools

1 tool
add-noteC

Add a new note

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
contentYes

TDQS

C2.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Add a new note' implies a write operation but doesn't specify permissions, side effects, error handling, or response format. This leaves critical behavioral traits like mutation impact and authentication needs unaddressed, which is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence, 'Add a new note', which is front-loaded and wastes no words. However, this conciseness comes at the cost of under-specification, but structurally, it's efficient and to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a write operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, how errors are handled, or provide enough context for safe and effective use, making it insufficient for the agent's needs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It adds no information about the two required parameters ('name' and 'content'), such as their meaning, format, or constraints. This fails to provide value beyond the bare schema, leaving parameters semantically unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Add a new note' restates the tool name 'add-note' with minimal elaboration, making it tautological. It specifies the verb 'add' and resource 'note' but lacks details like where notes are added or what distinguishes this from other note operations. Without sibling tools, differentiation isn't needed, but the purpose remains vague beyond the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool, such as prerequisites, alternatives, or context. The description doesn't mention any constraints or scenarios for usage, leaving the agent with no direction beyond the basic action implied by the name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

C2.6/5.0
Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap with other tools. The tool's purpose is clearly defined as adding a new note, making it distinct by default.

Naming Consistency5/5

A single tool inherently follows a consistent naming pattern, as there are no other tools to compare it against. The name 'add-note' uses a verb-noun format with hyphenation, which is clear and readable.

Tool Count2/5

A single tool is generally too few for most server purposes, as it limits functionality and suggests an incomplete or trivial scope. For a note-taking domain, one tool is insufficient to cover basic operations like listing, updating, or deleting notes.

Completeness1/5

The server appears to be for note-taking, but with only an 'add-note' tool, it lacks essential operations such as retrieving, updating, deleting, or listing notes. This severe gap will cause agent failures in handling note-related workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A universal gateway that aggregates multiple MCP servers into a single interface while providing advanced token optimization, result filtering, and automated summarization. It enables efficient management of large tool catalogs and reduces context usage by up to 95% for major AI clients.
    34
    15
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A unified gateway and web dashboard that aggregates multiple MCP servers into a single Streamable HTTP endpoint. It supports stdio, SSE, and HTTP protocols, featuring optimized tool exposure modes to reduce token consumption for AI clients.
    5
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCPGate aggregates multiple MCP servers into a single unified endpoint, enabling centralized tool management with granular filtering, automatic namespacing, and observability. Features a real-time web dashboard and optional PostgreSQL-backed audit trails for monitoring and controlling AI tool access across local and remote deployments.
    23
    Apache 2.0
  • A
    license
    D
    quality
    D
    maintenance
    A meta API Gateway server that works with the Model Context Protocol (MCP), enabling AI assistants to connect to any API and access real-world data sources through standardized MCP tools.
    70
    55
    12
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ferrary7/MCPilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server