# mcprouter

> MCP Server

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.

## Overview

- **Category:** Communication
- **Language:** Go
- **Stars:** 309
- **Forks:** 30
- **Owner:** chatmcp
- **GitHub:** https://github.com/chatmcp/mcprouter
- **Homepage:** https://mcp.so
- **Created:** 2025-03-13T14:57:50+00:00
- **Updated:** 2025-03-28T20:23:42+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-server-api-proxy-configuration-router

## Setup

## Setup

**Start Proxy Server**

1.  edit config file

```shell
cp .env.example.toml .env.toml
```

edit `.env.toml` as needed.

2.  start proxy server

```shell
go run main.go proxy
```

3.  add Proxy URL to MCP Client like Cursor

`http://localhost:8025/sse/fetch`

make sure you have set `mcp_server_commands.fetch` in `.env.toml`

**Start API Server**

1.  edit config file

```shell
cp .env.example.toml .env.toml
```

edit `.env.toml` as needed.

2.  start api server

```shell
go run main.go api
```

3.  request api with curl

```shell
curl -X POST http://127.0.0.1:8027/v1/list-tools \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer fetch'
```

make sure you have set `mcp_server_commands.fetch` in `.env.toml`

## Tools

## Available Tools

1. Proxy Server (OpenRouter for MCP Servers)
2. API Server (Provides an API endpoint for interacting with the MCP server)
