mcp-registry

MCP.Pizza Chef: ARadRareness

The MCP Registry is a centralized server solution designed to manage and coordinate multiple Model Context Protocol (MCP) servers. It facilitates dynamic port allocation, health monitoring of registered MCP servers, and provides unified access to tools across all registered servers. Complementing this, the FastMCP-HTTP package offers a RESTful HTTP client-server interface, enabling synchronous and asynchronous interactions with MCP servers and the registry. This setup streamlines the orchestration and accessibility of MCP servers, making it easier to integrate and manage distributed MCP environments through a single HTTP interface.

Use This MCP server To

Centralize registration of multiple MCP servers Dynamically allocate ports for MCP servers Monitor health status of registered MCP servers Provide unified HTTP access to MCP tools and resources Coordinate distributed MCP server environments Enable synchronous and asynchronous MCP server interactions

README

MCP Registry & FastMCP-HTTP

This repository is a combination of two complementary components.

MCP Registry is a server solution that manages and coordinates multiple MCP (Model Context Protocol) servers. It provides:

  • Central registration for MCP servers
  • Dynamic port allocation
  • Health monitoring of registered servers
  • Unified access to tools across all registered servers

FastMCP-HTTP is a Python package that provides an HTTP REST client-server solution for MCP. It offers a unified interface for accessing tools, prompts and resources through HTTP endpoints.

Components

HTTP Server

The FastMCPHttpServer provides an HTTP server solution for MCP.

HTTP Client

The FastMCPHttpClient offers both synchronous and asynchronous interfaces to interact with FastMCP servers. It is extended to also function as a client to the MCP registry server.

Registry Server

The MCP Registry Server acts as a central coordinator for multiple MCP servers. It handles server registration, health monitoring, and provides a unified interface to access tools across all connected servers.

MCP Explorer

The MCP Explorer provides a graphical user interface for interacting with MCP servers and their tools.

Installation

  1. Clone the repository
  2. Install the dependencies:
pip install -r requirements.txt

Examples

Using the registry server

FastMCPHttpServer

from fastmcp_http.server import FastMCPHttpServer

mcp = FastMCPHttpServer("MyServer", description="My MCP Server")

@mcp.tool()
def my_tool(text: str) -> str:
    return f"Processed: {text}"

if __name__ == "__main__":
    mcp.run_http()

FastMCPHttpClient

from fastmcp_http.client import FastMCPHttpClient


def main():
    # Connect to the registry server
    client = FastMCPHttpClient("http://127.0.0.1:31337")

    servers = client.list_servers()
    print(servers)

    tools = client.list_tools()
    print(tools)

    result = client.call_tool("my_tool", {"text": "Hello, World!"})
    print(result)


if __name__ == "__main__":
    main()

Standalone

FastMCPHttpServer

from fastmcp_http.server import FastMCPHttpServer

mcp = FastMCPHttpServer("MyServer", description="My MCP Server")

@mcp.tool()
def my_tool(text: str) -> str:
    return f"Processed: {text}"

if __name__ == "__main__":
    mcp.run_http(register_server=False, port=15151)

FastMCPHttpClient

from fastmcp_http.client import FastMCPHttpClient


def main():
    client = FastMCPHttpClient("http://127.0.0.1:15151")

    tools = client.list_tools()
    print(tools)

    result = client.call_tool("my_tool", {"text": "Hello, World!"})
    print(result)


if __name__ == "__main__":
    main()

Usage

  1. Start the MCP Registry (start_registry_server.py)
  2. Start an MCP server (and verify that it is properly registered in the registry)
  3. Start a client and connect to the registry url

License

MIT License

mcp-registry FAQ

How does MCP Registry handle dynamic port allocation?
MCP Registry automatically assigns available ports to MCP servers upon registration, simplifying network configuration and avoiding conflicts.
Can MCP Registry monitor the health of registered servers?
Yes, it continuously monitors the health status of all registered MCP servers to ensure availability and reliability.
What is FastMCP-HTTP?
FastMCP-HTTP is a Python package providing HTTP REST client-server interfaces for MCP, enabling unified access to tools and resources via HTTP endpoints.
Does FastMCP-HTTP support asynchronous communication?
Yes, FastMCP-HTTP offers both synchronous and asynchronous client interfaces for flexible interaction with MCP servers.
How does MCP Registry unify access to tools across servers?
It aggregates tool endpoints from all registered MCP servers, providing a single HTTP interface to access them seamlessly.
Is MCP Registry limited to any specific programming language?
While FastMCP-HTTP is Python-based, MCP Registry's HTTP interface can be accessed by any language supporting HTTP requests.
Can MCP Registry be used in distributed environments?
Yes, it is designed to coordinate multiple MCP servers across distributed systems efficiently.
How secure is the communication with MCP Registry?
MCP Registry supports standard HTTP security practices; additional security layers can be implemented depending on deployment needs.