dumbris/mcpproxy 是一个从 https://github.com/dumbris/mcpproxy. 导入的 MCP 服务器候选
概览
dumbris/mcpproxy 是一个从 https://github.com/dumbris/mcpproxy. 导入的 MCP 服务器候选
概述(AI 翻译)
快速启动
使用PIP安装:
光标集成开发环境集成
要在Cursor IDE中使用mcpproxy,请将以下配置添加到你的~/.cursor/mcp.json中:
然后用你的实际(!)创建一个单独的~/.cursor/mcp_proxy.json。MCP服务器:
(仅举个配置示例,你可以使用任何MCP服务器)
重要:mcp_proxy.json必须与mcp.json不同文件,以避免循环代理连接。代理配置文件格式与Cursor的MCP配置相同,但包含你想要联合的实际MCP服务器。
谷歌ADK集成
要将mcpproxy与Google ADK一起使用,可以通过MCPToolset集成:
提高LLM结果的小贴士(复制粘贴到你的系统/开发提示):
一个位于AI代理与多个模型上下文协议(MCP)服务器之间的联邦网关,提供智能工具发现和动态注册。
🌐 网站:mcpproxy.app 📦 PyPI:pypi.org/project/smart-mcp-proxy 🔗 GitHub:github.com/Dumbris/mcpproxy
特色
- 灵活路由策略:两种模式 -
DYNAMIC(按需注册工具)或CALL_TOOL(仅代理执行)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Smart MCP Proxy
Quick Start
install with pip:
pip install smart-mcp-proxy
Cursor IDE Integration
To use mcpproxy in Cursor IDE, add this configuration to your ~/.cursor/mcp.json:
{
"mcpServers": {
"mcp-proxy": {
"command": "mcpproxy",
"env": {
"MCPPROXY_CONFIG_PATH": "/Users/user/.cursor/mcp_proxy.json"
}
}
}
}
Then create a separate ~/.cursor/mcp_proxy.json with your actual(!) MCP servers:
(just an example of configuration, you can use any MCP servers you want)
{
"mcpServers": {
"company-mcp": {
"command": "uvx",
"args": ["--from", "mcp-company-python@git+https://github.com/company/mcp-company.git", "company-mcp-server"],
"env": {
"COMPANY_TOKEN": "${COMPANY_TOKEN}",
"PORT": "9090"
}
},
"company-docs": {
"url": "http://localhost:8000/mcp/"
}
}
}
Important: The mcp_proxy.json must be a different file than mcp.json to avoid circular proxy connections. The proxy configuration file has the same format as Cursor’s MCP configuration but contains the actual MCP servers you want to federate.
Google ADK Integration
To use mcpproxy with Google ADK, you can integrate it using the MCPToolset:
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset, StdioServerParameters
proxy_tool = MCPToolset(
connection_params=StdioServerParameters(
command="mcpproxy",
args=[],
env={"MCPPROXY_CONFIG_PATH": "/Users/user/.cursor/mcp_proxy.json"}
)
)
Tip for better LLM results (copy-paste into your system/dev prompt):
When you see a tool named `retrieval_tools` in the MCP tool list, call it first.
It returns the most relevant tools for the user’s request, helping you answer more accurately and concisely.
A federating gateway that sits between AI agents and multiple Model Context Protocol (MCP) servers, providing intelligent tool discovery and dynamic registration.
🌐 Website: mcpproxy.app 📦 PyPI: pypi.org/project/smart-mcp-proxy 🔗 GitHub: github.com/Dumbris/mcpproxy
Features
- Flexible Routing Strategies: Two modes -
DYNAMIC(tools registered on-demand) orCALL_TOOL(proxy-only execution) - Dynamic Tool Discovery: Automatically discovers tools from multiple MCP servers
- Intelligent Search: Uses configurable embedding backends (BM25, HuggingFace, OpenAI) to find relevant tools
安装
uvx --from mcp-company-python@git+https://github.com/company/mcp-company.git company-mcp-server配置
{
"mcpServers": {
"mcp-proxy": {
"command": "mcpproxy",
"env": {
"MCPPROXY_CONFIG_PATH": "/Users/user/.cursor/mcp_proxy.json"
}
}
}
}
