{"name":"MetaMCP: Unifying Model Context Protocol Servers with an All-in-One Gateway","description":"MetaMCP is a powerful, self-hosted solution that acts as an aggregator, orchestrator, middleware, and gateway for Model Context Protocol (MCP) servers. It allows developers to dynamically combine multiple MCP servers into a single, unified endpoint, enhancing tool management and agent development. This TypeScript-based project simplifies the deployment and management of AI tools within a Dockerized environment.","github":"https://github.com/metatool-ai/metamcp","url":"https://osrepos.com/repo/metatool-ai-metamcp","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/metatool-ai-metamcp","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/metatool-ai-metamcp.md","json":"https://osrepos.com/repo/metatool-ai-metamcp.json","topics":["mcp","model-context-protocol","gateway","middleware","orchestration","self-hosted","TypeScript","AI Tools"],"keywords":["mcp","model-context-protocol","gateway","middleware","orchestration","self-hosted","TypeScript","AI Tools"],"stars":null,"summary":"MetaMCP is a powerful, self-hosted solution that acts as an aggregator, orchestrator, middleware, and gateway for Model Context Protocol (MCP) servers. It allows developers to dynamically combine multiple MCP servers into a single, unified endpoint, enhancing tool management and agent development. This TypeScript-based project simplifies the deployment and management of AI tools within a Dockerized environment.","content":"## Introduction\n\nMetaMCP is an innovative project designed to streamline the management and deployment of Model Context Protocol (MCP) servers. It functions as a comprehensive proxy, enabling dynamic aggregation of various MCP servers into a single, unified endpoint. This powerful tool also allows for the application of custom middlewares, offering enhanced control over observability, security, and tool selection. Built with TypeScript and packaged for Docker, MetaMCP provides a robust infrastructure for hosting dynamically composed MCP servers and building advanced AI agents.\n\n## Installation\n\nGetting started with MetaMCP is straightforward, especially using Docker Compose, which is the recommended method.\n\n1.  **Clone the repository:**\n\n    bash\n    git clone https://github.com/metatool-ai/metamcp.git\n    cd metamcp\n    \n\n2.  **Prepare your environment file:**\n\n    bash\n    cp example.env .env\n    \n\n3.  **Start MetaMCP with Docker Compose:**\n\n    bash\n    docker compose up -d\n    \n\n    *Note: If you modify `APP_URL` environment variables, ensure you only access MetaMCP from the specified `APP_URL` as it enforces a CORS policy. Also, consider renaming the `metamcp_postgres_data` volume in `docker-compose.yml` if it conflicts with existing Docker volumes.* For more detailed development setup, including Dev Containers, refer to the [official documentation](https://docs.metamcp.com).\n\n## Examples\n\nConnecting your MCP clients to MetaMCP is flexible, supporting various configurations.\n\n### Connecting via `mcp.json` (e.g., Cursor)\n\nFor clients that support `mcp.json` configuration, you can point them directly to your MetaMCP endpoint:\n\n\n{\n  \"mcpServers\": {\n    \"MetaMCP\": {\n      \"url\": \"http://localhost:12008/metamcp/<YOUR_ENDPOINT_NAME>/sse\"\n    }\n  }\n}\n\n\n### Connecting STDIO-only Clients (e.g., Claude Desktop) with `mcp-proxy`\n\nFor clients that only support STDIO servers, like Claude Desktop, `mcp-proxy` is the recommended solution to bridge the connection to MetaMCP's remote endpoints (SSE, Streamable HTTP, OpenAPI).\n\n**Using Streamable HTTP:**\n\n\n{\n  \"mcpServers\": {\n    \"MetaMCP\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"mcp-proxy\",\n        \"--transport\",\n        \"streamablehttp\",\n        \"http://localhost:12008/metamcp/<YOUR_ENDPOINT_NAME>/mcp\"\n      ],\n      \"env\": {\n        \"API_ACCESS_TOKEN\": \"<YOUR_API_KEY_HERE>\"\n      }\n    }\n  }\n}\n\n\n**Using SSE:**\n\n\n{\n  \"mcpServers\": {\n    \"ehn\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"mcp-proxy\",\n        \"http://localhost:12008/metamcp/<YOUR_ENDPOINT_NAME>/sse\"\n      ],\n      \"env\": {\n        \"API_ACCESS_TOKEN\": \"<YOUR_API_KEY_HERE>\"\n      }\n    }\n  }\n}\n\n\n*Remember to replace `<YOUR_ENDPOINT_NAME>` and `<YOUR_API_KEY_HERE>` with your actual values. For API key authentication, using the `Authorization: Bearer <API_KEY>` header is generally the best practice.* For more details, refer to [issue #76](https://github.com/metatool-ai/metamcp/issues/76#issuecomment-3046707532).\n\n## Why Use MetaMCP?\n\nMetaMCP offers a compelling set of features for developers and organizations working with Model Context Protocol servers:\n\n*   **Unified Endpoint Management**: Group multiple MCP servers into namespaces and expose them through a single, authenticated MetaMCP endpoint (SSE or Streamable HTTP, OpenAPI). This simplifies client connections and tool discovery.\n*   **Customizable Tool Selection**: Selectively pick tools from aggregated MCP servers and apply pluggable middlewares for enhanced control over observability, security, and more. You can also override tool metadata and attach custom annotations.\n*   **Enhanced Inspection**: Utilize MetaMCP as an advanced MCP inspector with saved server configurations, allowing for immediate debugging of your MetaMCP endpoints.\n*   **Robust Authentication**: Supports API key authentication, standard OAuth in MCP Spec 2025-06-18, and OpenID Connect (OIDC) for enterprise SSO integration (Auth0, Keycloak, Azure AD, Google, Okta). It also features multi-tenancy and separate registration controls for flexible deployment.\n*   **Traffic Management**: Implement MCP Rate Limiting at both endpoint and user levels to protect your services from overload and manage resource consumption effectively.\n*   **Self-Hosted Flexibility**: Designed for self-hosting, MetaMCP provides full control over your AI tool infrastructure, allowing for custom Dockerfile configurations to manage dependencies and cold start issues.\n\n## Links\n\n*   **GitHub Repository**: [https://github.com/metatool-ai/metamcp](https://github.com/metatool-ai/metamcp){:target=\"_blank\"}\n*   **Official Documentation**: [https://docs.metamcp.com](https://docs.metamcp.com){:target=\"_blank\"}\n*   **Discord Community**: [https://discord.gg/mNsyat7mFX](https://discord.gg/mNsyat7mFX){:target=\"_blank\"}\n*   **Demo Video**: [https://youtu.be/Cf6jVd2saAs](https://youtu.be/Cf6jVd2saAs){:target=\"_blank\"}","metrics":{"detailViews":2,"githubClicks":1},"dates":{"published":null,"modified":"2026-08-19T20:26:41.000Z"}}