Agent Anycast MCP服务器
将任何AI工具变成对等代理中心。 在任何网络上发现、通信和编排AI代理——加密、去中心化、零配置。
 
uvx agentanycast-mcp适用于Claude Desktop、Claude Code、Cursor、VS Code、Windsurf、JetBrains、Gemini CLI、Amazon Q、Cline、Continue、Zed、Roo Code和ChatGPT。
设置
选择您的平台并在下面添加配置。这就是整个设置——守护进程下载并在第一次运行时自动启动。
Claude Desktop
添加 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)或 %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"agentanycast": {
"command": "uvx",
"args": ["agentanycast-mcp"]
}
}
}Claude Code
claude mcp add agentanycast -- uvx agentanycast-mcpCursor
添加 .cursor/mcp.json 在项目根目录中:
{
"mcpServers": {
"agentanycast": {
"command": "uvx",
"args": ["agentanycast-mcp"]
}
}
}VS Code + Copilot
添加 .vscode/mcp.json:
{
"servers": {
"agentanycast": {
"command": "uvx",
"args": ["agentanycast-mcp"]
}
}
}Windsurf
添加 ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"agentanycast": {
"command": "uvx",
"args": ["agentanycast-mcp"]
}
}
}JetBrains AI
设置->工具->AI->MCP服务器->添加:
{
"servers": {
"agentanycast": {
"command": "uvx",
"args": ["agentanycast-mcp"]
}
}
}Gemini CLI
添加 ~/.gemini/settings.json:
{
"mcpServers": {
"agentanycast": {
"command": "uvx",
"args": ["agentanycast-mcp"]
}
}
}Amazon Q Developer
添加 ~/.aws/amazonq/mcp.json:
{
"mcpServers": {
"agentanycast": {
"command": "uvx",
"args": ["agentanycast-mcp"]
}
}
}Cline
添加到临床MCP设置(VS代码: Ctrl+Shift+P ->“临床:MCP服务器”):
{
"mcpServers": {
"agentanycast": {
"command": "uvx",
"args": ["agentanycast-mcp"]
}
}
}Continue
添加 ~/.continue/config.json:
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "uvx",
"args": ["agentanycast-mcp"]
}
}
]
}
}Zed
添加到Zed设置(~/.config/zed/settings.json):
{
"context_servers": {
"agentanycast": {
"command": {
"path": "uvx",
"args": ["agentanycast-mcp"]
}
}
}
}Roo Code
添加到Roo Code MCP设置(VS代码: Ctrl+Shift+P ->“房间代码:MCP服务器”):
{
"mcpServers": {
"agentanycast": {
"command": "uvx",
"args": ["agentanycast-mcp"]
}
}
}ChatGPT (HTTP mode)
使用HTTP传输部署服务器:
agentanycast-mcp --transport http --port 8080
# or: docker run -p 8080:8080 agentanycast/mcp-server然后添加 http://your-server:8080/mcp 在ChatGPT开发人员设置中。
你能做什么
连接后,询问您的AI助手:
- *“寻找能够翻译日语的代理商”* --在P2P网络上发现代理
- *“将“本文摘要”发送给翻译代理”* --加密任务交付
- *“现在连接了哪些代理?”* --列出连接的对等体
- *“我的同伴ID是什么?”* --显示节点的身份和DID
可用工具
| 工具 | 说明 | 示例提示 |
|---|---|---|
discover_agents | 按技能查找代理 | *“找到可以翻译的代理”* |
send_task | 将加密任务发送给代理 | *“向对等体12D3KooW发送‘你好’…”* |
get_task_status | 检查已发送任务的结果 | *“那项任务的结果是什么?”* |
get_agent_card | 获取代理的能力 | *“那个代理人能做什么?”* |
list_connected_peers | 列出所有连接的P2P对等体 | *“谁在线?”* |
get_node_info | 获取此节点的对等ID、DID和状态 | *“我的经纪人信息是什么?”* |
配置
环境变量
将这些设置在 "env" MCP配置的一部分:
| 变量 | 描述 | 默认值 |
|---|---|---|
AGENTANYCAST_RELAY | 用于跨网络P2P的中继服务器多地址 | 无(仅限局域网) |
AGENTANYCAST_HOME | 守护进程状态的数据目录 | ~/.agentanycast |
跨网络通信的中继示例:
{
"mcpServers": {
"agentanycast": {
"command": "uvx",
"args": ["agentanycast-mcp"],
"env": {
"AGENTANYCAST_RELAY": "/ip4/relay.agentanycast.io/tcp/4001/p2p/12D3KooW..."
}
}
}
}CLI参数
agentanycast-mcp [--transport stdio|http] [--port 8080] [--relay MULTIADDR] [--home DIR]CLI参数优先于环境变量。
运作原理
Your AI Tool (Claude, Cursor, VS Code, ...)
|
| MCP protocol (stdio or HTTP)
v
AgentAnycast MCP Server
|
| gRPC (Unix domain socket)
v
AgentAnycast Daemon (Go)
|
| libp2p (TCP/QUIC + Noise_XX encryption + NAT traversal)
v
Remote AI Agents (anywhere in the world)- 零配置 --
uvx agentanycast-mcp处理一切。守护进程是自动下载和管理的。 - API密钥为零 --代理由加密对等体ID(Ed25519)标识,而不是帐户或令牌。
- 端到端加密 --Noise_XX协议。即使是中继服务器也只能看到密文。
- NAT穿透 --在防火墙后工作,具有自动打孔和中继回退功能。
是什么让这与众不同
这是唯一连接到的MCP服务器 分散式对等网络 AI代理。其他MCP服务器连接到特定的SaaS API。AgentAnycast将您连接到任何地方的任何AI代理,没有可以读取您消息的中介。
故障排除
守护进程无法启动
- 检查端口4001(TCP)是否未使用:
lsof -i :4001 - 尝试干净的状态:
rm -rf ~/.agentanycast && uvx agentanycast-mcp
在discover上找不到代理
- 代理必须位于同一局域网(mDNS)上或连接到同一中继
- 集
AGENTANYCAST_RELAY跨网络连接
连接超时
- 在严格的防火墙后面?设置中继地址。中继提供回退连接。
- 检查守护进程日志:
cat ~/.agentanycast/daemon.log
未找到“uvx”
- 安装紫外线:
curl -LsSf https://astral.sh/uv/install.sh | sh - 或直接安装:
pip install agentanycast-mcp
工具调用失败
- 添加MCP配置后重新启动AI工具
- 验证配置JSON语法(无尾随逗号)
链接
- Agent纽约广播公司 --主要项目、文件、示例
- 开发包 --用Python构建P2P代理
- TypeScript 软件开发工具包 --在TypeScript中构建P2P代理
