MCP Aggregator logo

MCP Aggregator

by nazar256

The MCP Aggregator combines multiple MCP servers into a single interface, primarily to overcome limitations in applications like Cursor. It acts as a bridge between MCP clients and backend MCP servers.

View on GitHub

Last updated: N/A

What is MCP Aggregator?

The MCP Aggregator is a tool that allows you to combine multiple MCP servers into a single interface. It functions as both an MCP server (for clients like Cursor) and an MCP client (for backend MCP servers).

How to use MCP Aggregator?

The aggregator can be configured using a JSON config file and environment variables. You need to configure the aggregator with the details of your backend MCP servers. Then, configure your MCP client (e.g., Cursor) to point to the aggregator. Installation options include using an install script, go install, Docker, or the Makefile. The README provides detailed instructions for each method.

Key features of MCP Aggregator

  • Provides a stdio interface for MCP clients

  • Connects to multiple backend MCP servers

  • Prefixes methods from backend servers

  • Automatically sanitizes tool names for Cursor compatibility

  • Configurable via environment variables and JSON config file

  • Debug logging with configurable levels

  • Tool Filtering

Use cases of MCP Aggregator

  • Overcoming MCP server limits in applications like Cursor

  • Centralizing access to multiple MCP servers

  • Simplifying MCP server configuration for clients

  • Filtering and managing available tools from different MCP servers

FAQ from MCP Aggregator

Why combine MCP servers into one?

The primary reason is to work around limitations of applications like Cursor, which may have restrictions on the number of MCP servers that can be used simultaneously.

How does tool name sanitization work?

The aggregator replaces dashes in tool names with underscores to ensure compatibility with Cursor. It maps the sanitized names back to the original names when forwarding requests.

What is tool filtering?

Tool filtering allows you to specify which tools from each backend MCP server should be exposed through the aggregator. This can help manage the number of tools, avoid name conflicts, and improve performance.

What environment variables are available?

Key environment variables include MCP_CONFIG (path to the config file), MCP_LOG_LEVEL (logging level), MCP_LOG_FILE (path to the log file), MCP_PROTOCOL_VERSION (force protocol version), and MCP_CURSOR_MODE (Cursor compatibility adjustments).

How do I configure the aggregator with Docker?

You can use the docker run command with appropriate volume mappings and environment variables. The README provides example commands for running the aggregator with Docker.