CM

chatmcp/mcprouter

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

309 stars 41 forks 质量 32 趋势 0NOASSERTION

MCP服务器的API路由器

概览

3. 向MCP客户端添加代理URL,比如光标 确保你在 .env.toml 里设置了 mcp_server_commands.fetch 确保你在 .env.toml 里设置了 mcp_server_commands.fetch

概述(AI 翻译)

面向MCP服务器的OpenRouter

启动代理服务器

  1. 编辑配置文件

根据需要编辑.env.toml。

  1. 启动代理服务器

  2. 向MCP客户端添加代理URL,比如光标

http://localhost:8025/sse/fetch

确保你在 .env.toml 中设置了 mcp_server_commands.fetch

启动API服务器

  1. 编辑配置文件

根据需要编辑.env.toml。

  1. 启动 API 服务器

  2. 请求带 curl 的 API

确保你在 .env.toml 中设置了 mcp_server_commands.fetch

本页由 AI 翻译,技术细节请以原文为准。

README

mcprouter

OpenRouter for MCP Servers

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

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →