The MCP2ANP Bridge Server enables MCP clients to access ANP (Agent Network Protocol) agents as local tools through protocol conversion. It bridges ANP's crawler-style interaction paradigm into MCP tool-based interactions, allowing MCP clients like Claude Desktop and IDEs to interact with ANP agents without modification.
Core Capabilities:
DID Authentication: Configure and manage local DID documents and private keys for secure authentication with ANP services
Fetch ANP Documents: Retrieve and parse ANP documents from URLs (the sole entry point to the ANP ecosystem), extracting content, type information, and discoverable links
Invoke OpenRPC Methods: Execute JSON-RPC 2.0 methods on OpenRPC endpoints exposed by ANP agents for structured remote procedure calls
Key Features:
Operates entirely locally without requiring remote servers
Supports complete multi-step workflows like hotel booking, travel planning, and agent discovery
Provides three core tools:
anp.setAuth,anp.fetchDoc, andanp.invokeOpenRPC
Provides local DID (Decentralized Identifier) authentication management using local DID documents and private keys for secure ANP agent interactions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP2ANP Bridge Serverfetch the documentation for the weather agent"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP2ANP
MCP ↔ ANP 桥接服务,让支持 MCP 的客户端像调用本地工具一样使用 ANP 智能体。
快速开始
第一步:获取 API Key
在使用 MCP2ANP 之前,你需要先获取一个 API Key:
访问 DID-HOST 并登录账户
新建 DID Card,在创建流程中勾选"生成 API Key"
将生成的私钥与 API Key 安全保存(它们仅显示一次,丢失后无法恢复)
验证 API Key(可选):
curl -sS -H "X-API-Key: YOUR_API_KEY" \
"https://didhost.cc/api/v1/mcp-sk-api-keys/verify" | jq .第二步:使用官方托管(推荐)
在 Claude 中直接使用官方托管端点,无需安装和配置:
claude mcp add --transport http mcp2anp-remote https://agent-connect.ai/mcp2anp/mcp \
--header "X-API-Key: YOUR_API_KEY"将 YOUR_API_KEY 替换为你在第一步中获取的 API Key。
第三步:本地启动服务器(可选)
如果你需要自托管服务器,可以按照以下步骤操作:
3.1 安装依赖
git clone git@github.com:agent-network-protocol/mcp2anp.git
cd mcp2anp
uv venv --python 3.11
uv sync3.2 配置 DID 凭证
方式 1: 使用默认凭证(开发测试)
直接启动,使用项目提供的默认公共 DID 凭证:
uv run python -m mcp2anp.server方式 2: 通过环境变量配置(推荐生产环境)
# 设置 DID 文件路径
export ANP_DID_DOCUMENT_PATH="docs/did_public/public-did-doc.json"
export ANP_DID_PRIVATE_KEY_PATH="docs/did_public/public-private-key.pem"
# 启动服务
uv run python -m mcp2anp.server --log-level INFO方式 3: 在 Claude 中添加本地服务器
# 将仓库根目录赋值给变量(替换为你的实际路径)
MCP2ANP_DIR=/Users/yourname/mcp2anp
claude mcp add mcp2anp \
--env ANP_DID_DOCUMENT_PATH=$MCP2ANP_DIR/docs/did_public/public-did-doc.json \
--env ANP_DID_PRIVATE_KEY_PATH=$MCP2ANP_DIR/docs/did_public/public-private-key.pem \
-- uv run --directory $MCP2ANP_DIR python -m mcp2anp.server第四步:运行官方 Demo
运行官方演示脚本,查看完整的使用示例:
uv run python examples/mcp_client_demo.pyDemo 会演示:
列出可用工具
调用
anp.fetchDoc获取智能体描述文档调用
anp.invokeOpenRPC执行 OpenRPC 方法
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.