Sponsored by Deepsite.site

MCP Composer

Created By
htkuana year ago
Connect and dynamically manage multiple MCP servers/tools through a single SSE interface, allowing your AI agent or AI APP to control MCP servers more flexibly
Content

MCP Composer

UI Demo

MCP Composer is a gateway service that centrally manages all your MCP servers. You can use it to consolidate all the MCP servers you need and open independent ports with different combinations of servers and tools for each service (like AI agents or tools) that requires access to MCP servers.

Key Features

  • Dynamic MCP Server Management: Dynamically manages connections to multiple MCP servers and their tools, enabling on-the-fly activation or deactivation of services.
  • Unified SSE Interface: Exposes a single Server-Sent Events (SSE) interface that provides access to all capabilities of the managed MCP servers.
  • Multiple Dynamic Endpoints: Supports dynamic creation and removal of multiple SSE endpoints to accommodate different AI agents or AI tools.
  • Independent Interface Configuration: Each SSE interface independently manages its own combination of MCP servers and tools, allowing for customized service provision.

System Architecture

MCP Composer Architecture Diagram

Key Terms

  • MCP Client: External tools or AI agents and AI workflows, such as Cursor, n8n, etc.
  • Gateway[A/B]: MCP server implementation bound to ServerKit and managed by the Composer, used to handle MCP Client connections.
  • Server Kit: Manages and controls information about Downstream MCP servers and which tools within servers should be enabled.
  • Downstream Controller: Responsible for controlling and managing connections to Downstream MCP servers.
  • Downstream MCP Server: An internal object connecting to a Downstream MCP server, implemented as an internal MCP client that links to the Downstream MCP server.
  • MCP Server: External MCP server services, such as: https://github.com/modelcontextprotocol/servers etc.
  • Composer: Provides APIs to control and orchestrate Gateways, Server Kits, and Downstream Controllers.

Requirements

  • Python >= 3.12
  • uv: A fast Python package installer and manager.

Installation

  1. Clone the repository:

    git clone https://github.com/htkuan/mcp-composer
    cd mcp-composer
    
  2. Install dependencies: Use uv to sync the project dependencies.

    make install
    # or directly use uv
    # uv sync
    

Configuration

Before running the application, you need to configure the target MCP servers.

  1. Copy the example configuration file:

    cp mcp_servers.example.json mcp_servers.json
    
  2. Edit mcp_servers.json and enter the details of the MCP servers you want to connect to.

  3. Set up environment variables:

    cp .env.example .env
    
  4. Edit the .env file to configure the following settings:

    • HOST: Server host address (default: 0.0.0.0)
    • PORT: Server port (default: 8000)
    • MCP_COMPOSER_PROXY_URL: MCP Composer proxy URL (default: http://localhost:8000)
    • MCP_SERVERS_CONFIG_PATH: Path to the MCP servers configuration file (default: ./mcp_servers.json)

Running

Use uv to run the FastAPI application:

make run
# or directly use uv
# uv run src/main.py

After the service starts, you can interact with the API through the API documentation in your browser (typically at http://127.0.0.1:8000/docs).

Development

The project includes a Makefile to simplify common development tasks:

  • Install dependencies: make install
  • Format and check code: make format (using Ruff)
  • Run the application: make run

Contributing

Contributions to this project are welcome! Please follow the standard GitHub Fork & Pull Request workflow. It's recommended to create an Issue for discussion before submitting a Pull Request.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Tavily Mcp
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Amap Maps高德地图官方 MCP Server
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
DeepChatYour AI Partner on Desktop
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Playwright McpPlaywright MCP server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Serper MCP ServerA Serper MCP Server
CursorThe AI Code Editor
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.