mcp2anp CLAUDE.md

mcp2anp CLAUDE.md is an instructions file for coding agents from agent-network-protocol/mcp2anp. It costs 639 tokens per session, scanned A, original, MIT.

Repository instructions for mcp2anp, a bridge that lets MCP-compatible AI clients access ANP networks. They cover setup, commands, authentication, and local or remote server operation.

In plain words
What is it for?
Use them to install dependencies, start the local or HTTP server, run examples and tests, and follow the project's authentication, session, logging, and documentation conventions.
Why use it?
They give an AI coding agent the project context and working commands, reducing guesswork when changing or running the bridge.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/agent-network-protocol/mcp2anp/claude-md
Clone the repo
git clone --depth 1 https://github.com/agent-network-protocol/mcp2anp

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp2anp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/agent-network-protocol/mcp2anp/claude-md.svg)](https://agentmods.dev/instructions/agent-network-protocol/mcp2anp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/agent-network-protocol/mcp2anp/claude-md"><img src="https://agentmods.dev/badge/instructions/agent-network-protocol/mcp2anp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 639 This file is loaded in full into every session.
When invoked 639 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00639 $0.00639
Opus 5 $0.00319 $0.00319
Sonnet 5 $0.00128 $0.00128
Haiku 4.5 $0.00064 $0.00064

Measured 4d ago against content hash 96f1f83b2ccc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp2anp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 52 lines

What it actually says

CLAUDE.md

本文件为 Claude Code 在该仓库工作的提示摘要。

项目速览

  • 定位:MCP ↔ ANP 桥接服务,让支持 MCP 的客户端(Claude Desktop、Cursor 等)能够访问 ANP 网络。
  • 工具集:仅暴露 anp.fetchDocanp.invokeOpenRPC 两个工具;DID 凭证在服务器启动时通过环境变量加载(或退回到 docs/did_public/ 的公共凭证)。
  • 代码结构
    • mcp2anp/server.py:stdio 传输模式的 MCP 服务器。
    • mcp2anp/server_remote.py:FastMCP HTTP 传输实现,依靠 ServerSession 管理会话。
    • mcp2anp/core/handlers.pyANPHandler 封装工具逻辑。
    • mcp2anp/utils/:日志、Pydantic 模型等通用工具。
    • docs/:最新的架构、远程部署、会话与鉴权文档。

常用命令

# 安装依赖(需先 uv venv --python 3.11)
uv sync

# 启动本地 stdio 服务器
uv run python -m mcp2anp.server --log-level INFO

# 启动远程 HTTP 服务器
uv run python -m mcp2anp.server_remote --host 0.0.0.0 --port 9880

# 运行官方示例
uv run python examples/mcp_client_demo.py

# 运行测试
uv run pytest

约定与注意事项

  • 认证通过环境变量控制:ANP_DID_DOCUMENT_PATHANP_DID_PRIVATE_KEY_PATH;未提供时使用公共凭证。
  • 远程模式的访问控制需通过 set_auth_callback() 自定义回调实现(详见 docs/REMOTE_SERVER.mdAUTH_EXAMPLE.md)。
  • 会话隔离依赖 FastMCP 的 ServerSession,状态存储在 SESSION_STOREWeakKeyDictionary);无需手写 SessionManager。
  • 日志使用 structlog;保持新日志字段与现有格式一致。
  • 文档采用 Google Python 风格、注释与日志使用英文。

推荐阅读顺序

  1. README.md – 项目背景、快速开始。
  2. docs/usage.md – 工具调用方式与最佳实践。
  3. docs/REMOTE_SERVER.md – 远程部署、鉴权示例与运维建议。
  4. docs/STATEFUL_SESSION.md – 会话模型与调试技巧。
  5. spec.md – 更详细的设计说明。

协作时请优先维护上述文档的准确性,与代码变更保持同步。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 52 lines · 639 tokens per session scan A 96f1f83b2ccc

Subscribe to this mod's changes

mcp2anp CLAUDE.md is an instructions file published in the GitHub repository agent-network-protocol/mcp2anp (7 stars, last pushed 7mo ago), licensed MIT. It adds 639 tokens to every session, about $0.0032 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens