MCPcopy Index your code
hub / github.com/chatmcp/mcprouter

github.com/chatmcp/mcprouter @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
270 symbols 746 edges 58 files 185 documented · 69%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

mcprouter

OpenRouter for MCP Servers

mcp-infa

Start Proxy Server

  1. edit config file
cp .env.example.toml .env.toml

edit .env.toml as needed.

  1. start proxy server
go run main.go proxy
  1. 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
cp .env.example.toml .env.toml

edit .env.toml as needed.

  1. start api server
go run main.go api
  1. request api with curl
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

Extension points exported contracts — how you extend this code

Client (Interface)
Client is a client that can send and receive messages to and from the server. [2 implementers]
service/mcpclient/client.go
RedisHandler (Interface)
RedisHandler interface abstracts Redis and Cluster client operations
util/redis.go

Core symbols most depended-on inside this repo

Get
called by 30
util/redis.go
RespErr
called by 27
service/api/context.go
db
called by 23
model/base.go
String
called by 21
service/jsonrpc/response.go
JSONRPCError
called by 14
service/proxy/context.go
Set
called by 13
util/redis.go
GetAPIContext
called by 12
service/api/context.go
SendEventData
called by 10
service/proxy/writer.go

Shape

Function 119
Method 94
Struct 53
Interface 2
TypeAlias 2

Languages

Go100%

Modules by API surface

service/api/context.go20 symbols
service/proxy/context.go16 symbols
util/redis.go15 symbols
service/proxy/session.go14 symbols
handler/proxy/mcp.go13 symbols
service/mcpclient/stdio.go12 symbols
service/mcpclient/rest.go11 symbols
service/mcpclient/client.go11 symbols
model/tool.go10 symbols
model/server.go8 symbols
handler/proxy/messages.go8 symbols
util/db.go6 symbols

For agents

$ claude mcp add mcprouter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact