关于 @anycast/mcp
@anycast/mcp 是用于管理 Anycast Platform 的 MCP 服务,涵盖 Agent、网络连接、分组、令牌和 Webhook。它向兼容 MCP 的客户端提供操作工具及资源。
主要功能
- 01管理 Agent 和注册令牌
- 02将 Agent 编入分组
- 03查看 P2P 连接和统计数据
- 04管理 Webhook 目的地与事件
- 05读取 Agent、连接和统计资源
适用场景
- 01检查在线 Agent 及连接历史
- 02创建或撤销 Agent 注册令牌
- 03查看 P2P 连接数量和带宽
- 04设置 Webhook 事件接收目的地
MCP 相关
向 MCP 客户端提供 19 个工具和资源,用于管理 Anycast Platform 的 Agent、连接、分组、令牌和 Webhook。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
18收录的工具列表 · 更新于 3 周前
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| status | enum | 否 | 按 Agent 状态筛选ONLINE | OFFLINE | CONNECTING |
| search | string | 否 | 按 Agent 名称搜索 |
| limit | number | 否 | 最大结果数(默认 20) |
详细介绍
@anycast/mcp
将 AI 助手连接到 Anycast 网络。直接从 Claude、Cursor 或任何兼容 MCP 的客户端管理 Agent、P2P 连接和 Webhook 投递。
适用于 Anycast Platform 的 MCP(Model Context Protocol)服务。让 Claude、Cursor 和 Copilot 等 AI 助手管理 Agent、Webhook 和 P2P 连接。
安装
npm install -g @anycast/mcp
配置
设置 Anycast API 密钥:
export ANYCAST_API_KEY=your-api-key-here
export ANYCAST_API_URL=https://agents.anycast.com # optional
在 Claude Desktop 中使用
添加到你的 claude_desktop_config.json:
{
"mcpServers": {
"anycast": {
"command": "anycast-mcp",
"env": {
"ANYCAST_API_KEY": "your-api-key-here",
"ANYCAST_API_URL": "https://agents.anycast.com"
}
}
}
}
在 Claude Code 中使用
添加到项目的 .claude/settings.json:
{
"mcpServers": {
"anycast": {
"command": "npx",
"args": ["@anycast/mcp"],
"env": {
"ANYCAST_API_KEY": "your-api-key-here"
}
}
}
}
在 Cursor 中使用
添加到 Cursor 设置 > MCP 服务:
{
"anycast": {
"command": "anycast-mcp",
"env": {
"ANYCAST_API_KEY": "your-api-key-here"
}
}
}
可用工具
Agent
| 工具 | 描述 |
|---|---|
list_agents | 列出所有 Agent 及其状态、IP 和版本 |
get_agent | 按 ID 获取 Agent 详情 |
update_agent | 更新 Agent 名称或标签 |
delete_agent | 删除 Agent(会断开连接) |
get_agent_connections | 获取某个 Agent 的连接历史 |
令牌
| 工具 | 描述 |
|---|---|
list_tokens | 列出注册令牌(仅显示前缀) |
create_token | 创建新的注册令牌 |
revoke_token | 撤销令牌 |
群组
| 工具 | 描述 |
|---|---|
list_groups | 列出 Agent 群组 |
create_group | 创建新群组 |
add_agent_to_group | 将 Agent 添加到群组 |
remove_agent_from_group | 从群组中移除 Agent |
连接
| 工具 | 描述 |
|---|---|
get_discovery | 获取会合服务 URL |
list_connections | 列出 P2P 连接 |
get_connection_stats | 带宽和连接数量 |
Webhook(Ramps)
| 工具 | 描述 |
|---|---|
list_destinations | 列出 Webhook 目标 |
create_destination | 创建 Webhook 目标 |
list_events | 列出 Webhook 事件 |
资源
| URI | 描述 |
|---|---|
anycast://agents | 所有已注册的 Agent |
anycast://connections | 最近的连接(24 小时) |
anycast://stats | 平台统计数据 |
示例
询问 Claude:
“列出我所有在线的 Agent”
“创建一个名为 'production'、使用次数上限为 50 的注册令牌”
“显示过去一周的连接统计数据”
“在 https://api.example.com/webhooks 创建一个 Webhook 目标”
“'production' 群组中有哪些 Agent?”
许可证
MIT
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。