Skip to main content
Glama

MCP2ANP

MCP ↔ ANP 桥接服务,让支持 MCP 的客户端像调用本地工具一样使用 ANP 智能体。

快速开始

第一步:获取 API Key

在使用 MCP2ANP 之前,你需要先获取一个 API Key:

  1. 访问 DID-HOST 并登录账户

  2. 新建 DID Card,在创建流程中勾选"生成 API Key"

  3. 将生成的私钥与 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 sync

3.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.py

Demo 会演示:

  • 列出可用工具

  • 调用 anp.fetchDoc 获取智能体描述文档

  • 调用 anp.invokeOpenRPC 执行 OpenRPC 方法

Available Tools

3 tools
anp.fetchDocA

抓取并解析 ANP 文档,提取可跟进的链接。这是访问 ANP 生态系统中 URL 的唯一允许方法。返回文档内容、类型信息和发现的链接。

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes要抓取的 ANP 文档的 URL

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It describes the core functionality (fetching, parsing, extracting links) and output structure (document content, type information, discovered links), but lacks details about error handling, rate limits, authentication requirements, or performance characteristics. The description adds value beyond what's in the schema but doesn't provide comprehensive behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with three sentences that each earn their place: first states the core functionality, second establishes the exclusive usage context, third specifies the return values. No wasted words, front-loaded with the most important information about what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with no annotations and no output schema, the description provides adequate context about functionality and usage boundaries. However, it lacks details about the return format structure, error conditions, or what constitutes 'ANP 文档' versus other URLs. The description is complete enough for basic understanding but has gaps for comprehensive tool usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100% with the single 'url' parameter well-documented in the schema. The description doesn't add any parameter-specific information beyond what the schema already provides about the URL parameter. This meets the baseline of 3 when the schema does the heavy lifting for parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('抓取并解析' - fetch and parse) and resource ('ANP 文档' - ANP document), and distinguishes it from siblings by explicitly stating it's the '唯一允许方法' (only allowed method) for accessing URLs in the ANP ecosystem. This provides clear differentiation from 'anp.invokeOpenRPC' and 'anp.setAuth' which have different functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance by stating this is the '唯一允许方法' (only allowed method) for accessing URLs in the ANP ecosystem, creating a clear boundary for when to use this tool versus alternatives. It establishes this as the mandatory approach for ANP document access, though it doesn't specify when NOT to use it for non-ANP URLs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

anp.invokeOpenRPCC

使用 JSON-RPC 2.0 协议调用 OpenRPC 端点上的方法。此工具处理与暴露 OpenRPC 接口的 ANP 智能体的结构化交互。

ParametersJSON Schema
NameRequiredDescriptionDefault
endpointYesOpenRPC 端点 URL
idNo用于跟踪的可选请求 ID
methodYes要调用的 RPC 方法名称
paramsNo传递给方法的参数

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While it mentions the protocol (JSON-RPC 2.0) and that it handles '结构化交互' (structured interactions), it lacks critical behavioral details: authentication requirements, error handling, rate limits, whether it's idempotent, or what the response format looks like. For a tool that makes remote calls, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two sentences that convey the core functionality. The first sentence states the purpose clearly, and the second adds context about interacting with ANP agents. There's no wasted text, though it could be slightly more front-loaded with the most critical information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of making JSON-RPC calls, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns, error conditions, authentication needs, or provide examples of typical usage. For a 4-parameter tool that performs remote procedure calls, this leaves too many unknowns for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description doesn't add any meaningful parameter semantics beyond what's in the schema - it doesn't explain how parameters should be structured, provide examples, or clarify relationships between parameters. The baseline of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '使用 JSON-RPC 2.0 协议调用 OpenRPC 端点上的方法' (invoke methods on OpenRPC endpoints using JSON-RPC 2.0 protocol). It specifies the verb ('调用' - invoke) and resource ('OpenRPC 端点上的方法' - methods on OpenRPC endpoints), but doesn't explicitly differentiate from sibling tools like anp.fetchDoc or anp.setAuth, which appear to have different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal usage guidance. It mentions '此工具处理与暴露 OpenRPC 接口的 ANP 智能体的结构化交互' (this tool handles structured interactions with ANP agents exposing OpenRPC interfaces), which gives some context about when to use it, but offers no explicit guidance on when to choose this tool versus alternatives like anp.fetchDoc or anp.setAuth, nor any prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

anp.setAuthA

设置 DID 认证上下文。使用本地 DID 文档和私钥文件建立认证,后续的 fetchDoc 和 invokeOpenRPC 调用将自动使用这些凭证。

ParametersJSON Schema
NameRequiredDescriptionDefault
did_document_pathYesDID 文档 JSON 文件的路径
did_private_key_pathYesDID 私钥 PEM 文件的路径

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: it establishes authentication context that persists for subsequent calls, specifies the credential sources (local DID document and private key files), and indicates this is a setup/configuration operation rather than a data operation. However, it doesn't mention potential side effects like error conditions or what happens if authentication fails.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and well-structured in just two sentences. The first sentence states the core purpose, and the second sentence explains the usage context and benefit. Every word serves a clear purpose with zero wasted information, making it easy for an AI agent to parse and understand.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 2-parameter authentication setup tool with no annotations and no output schema, the description provides excellent context about what the tool does and how it integrates with sibling tools. It clearly explains the tool's role in the authentication flow. The only minor gap is the lack of information about return values or error conditions, but given the tool's straightforward nature, this is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% description coverage, so the schema already fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. This meets the baseline of 3 when schema coverage is high, but doesn't provide additional semantic context about how these parameters interact or their format requirements.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('设置 DID 认证上下文', '建立认证') and identifies the resource (authentication context). It explicitly distinguishes from sibling tools by mentioning that subsequent calls to 'fetchDoc' and 'invokeOpenRPC' will automatically use these credentials, establishing clear differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: it specifies when to use this tool ('使用本地 DID 文档和私钥文件建立认证') and names the specific sibling tools ('fetchDoc' and 'invokeOpenRPC') that will benefit from this authentication setup. This creates clear context for when this tool should be invoked versus when to use the sibling tools directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.7/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count4/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Dynamically generates MCP tools from OpenAPI specifications, enabling AI assistants to interact with any REST API through natural language. Supports multiple APIs with authentication, parameter validation, and integration with Claude Desktop and LangChain.
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    18
    3
    MIT
  • A
    license
    Not graded
    quality
    F
    maintenance
    Bridges 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.
    36
    Apache 2.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agent-network-protocol/mcp2anp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server