MetaMCP MCP server

Centralizes management of multiple AI services, providing secure API key handling and unified access for streamlined interactions across diverse platforms.
Back to servers
Setup instructions
Provider
James Zhang
Release date
Feb 21, 2025
Language
TypeScript
Package
Stats
13.6K downloads
134 stars

MetaMCP MCP Server is a proxy server that combines multiple MCP servers into one. It retrieves tool, prompt, and resource configurations from MetaMCP App and routes requests to the appropriate underlying server, allowing you to manage multiple MCP servers through a single interface.

Installation Options

Using API Key Directly

The simplest way to install and run MetaMCP MCP Server is using the API key directly:

npx -y @metamcp/mcp-server-metamcp@latest --metamcp-api-key <your-api-key>

Manual Installation for Claude Desktop

If you want to install it for Claude Desktop manually, you can add this configuration:

{
  "mcpServers": {
    "MetaMCP": {
      "command": "npx",
      "args": ["-y", "@metamcp/mcp-server-metamcp@latest"],
      "env": {
        "METAMCP_API_KEY": "<your api key>"
      }
    }
  }
}

Usage Options

Using as a stdio Server (Default)

The default mode uses stdio for communication:

mcp-server-metamcp --metamcp-api-key <your-api-key>

Using as an SSE Server

To run as a Server-Sent Events (SSE) server:

mcp-server-metamcp --metamcp-api-key <your-api-key> --transport sse --port 12006

This starts an Express.js web server that listens for SSE connections on the /sse endpoint and accepts messages on the /messages endpoint.

Using as a Streamable HTTP Server

For HTTP-based communication:

mcp-server-metamcp --metamcp-api-key <your-api-key> --transport streamable-http --port 12006

You can add the --stateless flag for stateless operation if needed.

Docker Compatibility

When running in Docker and connecting to services on the host machine:

mcp-server-metamcp --metamcp-api-key <your-api-key> --transport sse --port 12006 --use-docker-host

This transforms any localhost or 127.0.0.1 URLs to host.docker.internal, allowing proper connection to host services.

Configuration Options

Stderr Handling

For stdio transport, you can control how stderr is handled:

# See stderr output from child processes
mcp-server-metamcp --metamcp-api-key <your-api-key> --stderr inherit

# Capture stderr (default is ignore)
mcp-server-metamcp --metamcp-api-key <your-api-key> --stderr pipe

# Using environment variable
METAMCP_STDERR=inherit mcp-server-metamcp --metamcp-api-key <your-api-key>

Available options:

  • ignore (default): Ignore stderr from child processes
  • inherit: Pass through stderr to the parent
  • pipe: Capture stderr in a pipe
  • overlapped: Use overlapped I/O (Windows-specific)

Command Line Reference

Options:
  --metamcp-api-key <key>       API key for MetaMCP (can also be set via METAMCP_API_KEY env var)
  --metamcp-api-base-url <url>  Base URL for MetaMCP API (can also be set via METAMCP_API_BASE_URL env var)
  --report                      Fetch all MCPs, initialize clients, and report tools to MetaMCP API
  --transport <type>            Transport type to use (stdio, sse, or streamable-http) (default: "stdio")
  --port <port>                 Port to use for SSE or Streamable HTTP transport, defaults to 12006 (default: "12006")
  --require-api-auth            Require API key in SSE or Streamable HTTP URL path
  --stateless                   Use stateless mode for Streamable HTTP transport
  --use-docker-host             Transform localhost URLs to use host.docker.internal (can also be set via USE_DOCKER_HOST env var)
  --stderr <type>               Stderr handling for STDIO transport (overlapped, pipe, ignore, inherit) (default: "ignore")
  -h, --help                    display help for command

Environment Variables

Configure the server using these environment variables:

  • METAMCP_API_KEY: Your MetaMCP API key
  • METAMCP_API_BASE_URL: Base URL for the MetaMCP API
  • USE_DOCKER_HOST: Set to "true" for Docker compatibility
  • METAMCP_STDERR: Controls stderr handling (overlapped, pipe, ignore, inherit)

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "MetaMCP" '{"command":"npx","args":["-y","@metamcp/mcp-server-metamcp@latest"],"env":{"METAMCP_API_KEY":"<your api key>"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "MetaMCP": {
            "command": "npx",
            "args": [
                "-y",
                "@metamcp/mcp-server-metamcp@latest"
            ],
            "env": {
                "METAMCP_API_KEY": "<your api key>"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "MetaMCP": {
            "command": "npx",
            "args": [
                "-y",
                "@metamcp/mcp-server-metamcp@latest"
            ],
            "env": {
                "METAMCP_API_KEY": "<your api key>"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later