MCP2ANP Bridge Server
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 "Deploy 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 Server fetch 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 方法
Available Tools
3 toolsanp.fetchDocA
抓取并解析 ANP 文档,提取可跟进的链接。这是访问 ANP 生态系统中 URL 的唯一允许方法。返回文档内容、类型信息和发现的链接。
Inputs: url (required).
anp.invokeOpenRPCC
使用 JSON-RPC 2.0 协议调用 OpenRPC 端点上的方法。此工具处理与暴露 OpenRPC 接口的 ANP 智能体的结构化交互。
Inputs: endpoint (required), method (required), id, params.
anp.setAuthA
设置 DID 认证上下文。使用本地 DID 文档和私钥文件建立认证,后续的 fetchDoc 和 invokeOpenRPC 调用将自动使用这些凭证。
Inputs: did_document_path (required), did_private_key_path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: fetchDoc retrieves and parses documents, invokeOpenRPC handles structured RPC calls, and setAuth manages authentication. There is no overlap in functionality, and the descriptions make their unique roles explicit.
All tools follow a consistent 'anp.verbNoun' pattern (anp.fetchDoc, anp.invokeOpenRPC, anp.setAuth), using snake_case for multi-word names. This predictable naming scheme enhances readability and agent usability.
With only 3 tools, the server feels slightly thin but reasonable for its bridging purpose. It covers core operations (fetch, invoke, auth) without bloat, though additional utilities might be expected in a bridge server. The count is appropriate but minimal.
The tools provide essential coverage for interacting with ANP ecosystems: fetching documents, invoking RPC methods, and setting authentication. Minor gaps might include tools for managing sessions or handling errors, but the core workflow is well-supported without dead ends.
Maintenance
Related MCP Connectors
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude Desktop and other MCP clients to interact with any OAuth2-authenticated OpenAPI-based API through automatic tool generation from OpenAPI specifications, with built-in token management and authentication handling.3 npm3MIT
- AlicenseNot gradedqualityFmaintenanceBridges Agent Communication Protocol (ACP) agents with Model Context Protocol (MCP) applications, allowing MCP clients such as Claude Desktop to discover and invoke ACP agents as tools and resources.36Apache 2.0
- AlicenseNot gradedqualityDmaintenanceConnects MCP-powered AI agents to the decentralized Agent Network Protocol (ANP) for DID-based identity, agent discovery, and secure agent-to-agent communication.16 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to automate both web browsers and native desktop applications through a unified interface, supporting tasks like browsing, clicking, typing, and file clipboard operations via exposed MCP tools.1Apache 2.0