mcprouter

The mcprouter repository provides a proxy and API server for MCP (Managed Configuration Protocol) servers, enabling interaction with MCP clients like Cursor by routing requests and managing configurations through a defined API.

243
30

mcprouter

OpenRouter for MCP Servers

mcp-infa

This project, mcprouter, acts as an OpenRouter for MCP (Model Configuration Protocol) servers. It provides a proxy and API server to facilitate communication with MCP servers, enhancing flexibility and control.

Start Proxy Server

  1. Configure the proxy by copying .env.example.toml to .env.toml and modifying the latter with your desired settings.
cp .env.example.toml .env.toml
  1. Launch the proxy server using the command:
go run main.go proxy
  1. Integrate the proxy with your MCP client (e.g., Cursor) by setting the proxy URL to http://localhost:8025/sse/fetch. Ensure that mcp_server_commands.fetch is correctly configured in your .env.toml file.

Start API Server

  1. Configure the API server by copying .env.example.toml to .env.toml and modifying the latter with your desired settings.
cp .env.example.toml .env.toml
  1. Start the API server using:
go run main.go api
  1. Interact with the API using curl commands, such as:
curl -X POST http://127.0.0.1:8027/v1/list-tools \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer fetch'

Verify that mcp_server_commands.fetch is appropriately set in .env.toml.

Repository

CH
chatmcp

chatmcp/mcprouter

Created

March 13, 2025

Updated

March 28, 2025

Language

Go

Category

Communication