mcp-connector
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMCP Connector
MCP 连接器
Connect to any MCP (Model Context Protocol) server and interact with its tools, resources, and prompts.
连接至任意MCP(Model Context Protocol)服务器,与其工具、资源和提示词进行交互。
Supported Transports
支持的传输方式
- stdio — Launch a local MCP server as a subprocess (e.g. )
npx @modelcontextprotocol/server-filesystem /path - sse — Connect to a remote MCP server via HTTP Server-Sent Events
- streamable-http — Connect via the newer streamable HTTP transport (POST with SSE response)
- stdio — 将本地MCP服务器作为子进程启动(例如 )
npx @modelcontextprotocol/server-filesystem /path - sse — 通过HTTP Server-Sent Events连接远程MCP服务器
- streamable-http — 通过较新的流式HTTP传输方式连接(带SSE响应的POST请求)
Usage Flow
使用流程
- Browse available servers with (or filter by category)
mcp_browse - Connect by name from the registry:
mcp_connect(name="coingecko") - Discover available tools/resources with or
mcp_list_toolsmcp_list_resources - Use them via or
mcp_call_toolmcp_read_resource - Disconnect when done with
mcp_disconnect
- 使用浏览可用服务器(或按类别筛选)
mcp_browse - 通过注册表中的名称连接:
mcp_connect(name="coingecko") - 使用或
mcp_list_tools发现可用的工具/资源mcp_list_resources - 通过或
mcp_call_tool使用它们mcp_read_resource - 使用完毕后通过断开连接
mcp_disconnect
Pre-configured Registry
预配置注册表
A curated list of MCP servers is maintained in . Connect to any of them by name — no URL or transport details needed:
config/mcp_servers.yamlmcp_connect(name="coingecko") # Crypto market data
mcp_connect(name="exa") # Neural web search
mcp_connect(name="dexpaprika") # DEX data across chainsUse to see all available servers, or filter by category:
mcp_browse()mcp_browse(category="blockchain")
mcp_browse(category="developer")Some servers require environment variables (API keys). The tool will tell you which ones are missing.
我们在中维护了一份精选的MCP服务器列表。只需通过名称即可连接其中任意服务器——无需提供URL或传输细节:
config/mcp_servers.yamlmcp_connect(name="coingecko") # 加密货币市场数据
mcp_connect(name="exa") # 神经网络网页搜索
mcp_connect(name="dexpaprika") # 跨链DEX数据使用查看所有可用服务器,或按类别筛选:
mcp_browse()mcp_browse(category="blockchain")
mcp_browse(category="developer")部分服务器需要环境变量(API密钥)。工具会提示您缺少哪些变量。
Ad-hoc Connections
临时连接
You can still connect to any MCP server not in the registry by providing transport details:
您仍可通过提供传输细节,连接至注册表中未收录的任意MCP服务器:
stdio (local subprocess)
stdio(本地子进程)
mcp_connect(
name="fs",
transport="stdio",
command="npx",
args=["-y", "@modelcontextprotocol/server-filesystem", "/workspace"]
)mcp_connect(
name="fs",
transport="stdio",
command="npx",
args=["-y", "@modelcontextprotocol/server-filesystem", "/workspace"]
)SSE (HTTP Server-Sent Events)
SSE(HTTP Server-Sent Events)
mcp_connect(
name="remote-tools",
transport="sse",
url="https://mcp.example.com/sse"
)mcp_connect(
name="remote-tools",
transport="sse",
url="https://mcp.example.com/sse"
)Streamable HTTP
Streamable HTTP
mcp_connect(
name="api-server",
transport="streamable-http",
url="https://mcp.example.com/mcp"
)mcp_connect(
name="api-server",
transport="streamable-http",
url="https://mcp.example.com/mcp"
)Using Connected Servers
使用已连接的服务器
Call a tool
调用工具
mcp_call_tool(
server="coingecko",
tool="get_price",
arguments={"coin": "bitcoin"}
)mcp_call_tool(
server="coingecko",
tool="get_price",
arguments={"coin": "bitcoin"}
)Read a resource
读取资源
mcp_read_resource(
server="remote-tools",
uri="file:///data/config.json"
)mcp_read_resource(
server="remote-tools",
uri="file:///data/config.json"
)Notes
注意事项
- Connections persist for the duration of the session
- Multiple servers can be connected simultaneously
- Server names must be unique — reconnecting with the same name replaces the old connection
- Environment variables can be passed to stdio servers via the parameter
env - Registry entries are in — add new servers there (no code changes needed)
config/mcp_servers.yaml
- 连接在会话期间保持有效
- 可同时连接多个服务器
- 服务器名称必须唯一——使用相同名称重新连接会替换旧连接
- 可通过参数将环境变量传递给stdio服务器
env - 注册表条目位于中——可在此添加新服务器(无需修改代码)
config/mcp_servers.yaml