Agent Doctor
An MCP server that audits ERC-8004 agent registrations, diagnosing issues and providing fix lists.
README
Agent Doctor
An AI-agent-facing service that audits ERC-8004 agent registrations and tells owners exactly how to fix them.
Why: of 170,000+ agents registered in the ERC-8004 registries, only 3–15%
expose BOTH a valid registration file AND a live declared endpoint
(arXiv:2606.26028). Agent Doctor diagnoses
that gap: it resolves the on-chain identity, fetches and validates the
registration file, probes every declared endpoint for liveness, verifies the
ENSIP-25 bidirectional ENS link, and returns a graded report (A–F) with a
concrete, ordered fix list.
What it checks
| Check | Meaning |
|---|---|
identity.resolve |
tokenURI(agentId) on the IdentityRegistry (0x8004A169FB4a3325136EB29fA0ceB6D2e539a432, same address on Ethereum, Base, Arbitrum, Optimism, Polygon, Linea) returns a non-empty agentURI |
registration.fetch |
the agentURI (https / ipfs / data:) serves valid JSON |
registration.structure / core_fields / services |
registration-v1 shape: type, name, description, image, well-formed services[] (lenient — soft fields warn, not fail) |
registration.registrations |
registrations[] actually references this chain + registry + agentId (eip155:{chainId}:{registry}) |
endpoint.* |
liveness probe per declared service — generic HTTP GET; A2A additionally looks for the agent card (endpoint itself, then /.well-known/agent-card.json); MCP is reachability-only (no handshake in MVP); ENS/DID/email/agentWallet are identifiers, skipped here |
ens.*.bidirectional |
ENSIP-25: the registration file references the ENS name and the name carries the text record agent-registration[<ERC-7930 registry>][<agentId>] — either side alone fails |
Grades: A all pass · B warnings only · C endpoint/ENS failures ·
D broken registration file · F identity unresolvable.
Quickstart
cd agent-doctor
python3 -m venv .venv
.venv/bin/pip install web3 fastapi uvicorn httpx mcp pytest
CLI
.venv/bin/python -m agent_doctor check --chain base --agent-id 42
.venv/bin/python -m agent_doctor check --chain base --agent-id 42 --ens myagent.eth
.venv/bin/python -m agent_doctor check --ens myagent.eth # best-effort discovery
.venv/bin/python -m agent_doctor check --chain base --agent-id 42 --json
Exit code 0 for grades A/B, 1 otherwise (CI-friendly).
HTTP API
.venv/bin/uvicorn agent_doctor.api:app --port 8004
curl 'http://127.0.0.1:8004/check?chain=base&agentId=42'
curl 'http://127.0.0.1:8004/check?ens=myagent.eth'
curl 'http://127.0.0.1:8004/healthz'
MCP (stdio)
.venv/bin/python -m agent_doctor.mcp_server
Exposes one tool, diagnose_agent(chain, agent_id, ens, timeout). Claude Code
registration example:
claude mcp add agent-doctor -- /path/to/agent-doctor/.venv/bin/python -m agent_doctor.mcp_server
Configuration
AGENT_DOCTOR_RPC_<CHAIN>(e.g.AGENT_DOCTOR_RPC_BASE) — override the default publicnode RPCs; ENS always resolves on Ethereum mainnet.AGENT_DOCTOR_IPFS_GATEWAY— defaulthttps://ipfs.io/ipfs/.AGENT_DOCTOR_HTTP_TIMEOUT— default 10 s.
Tests
.venv/bin/python -m pytest # unit tests (offline)
.venv/bin/python -m pytest --live # + live read-only test against the real Base registry
Fixtures include the ENSIP-25 worked example: registry
0x8004A169…a432 on eip155:1, agentId 42 →
agent-registration[0x000100000101148004a169fb4a3325136eb29fa0ceb6d2e539a432][42].
Register Agent Doctor itself (owner-only steps)
The repo ships its own dogfood identity in identity/:
registration.json (valid per our own validator), mint_identity.py
(unsigned tx builder — never touches keys), ens_records.py (exact ENSIP-25
record printer). To go live:
- Registration file is hosted — this repo is public, so the canonical
agentURI is
https://raw.githubusercontent.com/Maxwell012/agent-doctor/main/identity/registration.json. Theagentdoctor.example.comservice endpoints inside it are still placeholders — replace them once the HTTP API is deployed somewhere real. - Fund a wallet on Base (a few dollars of ETH for gas).
- Mint the identity — build the unsigned tx and sign it in your own wallet:
Function:.venv/bin/python identity/mint_identity.py --agent-uri https://raw.githubusercontent.com/Maxwell012/agent-doctor/main/identity/registration.json --from 0xYourAddressregister(string agentURI)on0x8004A169FB4a3325136EB29fA0ceB6D2e539a432(Base, chainId 8453). Read the mintedagentIdfrom theRegisteredevent, then updateregistrations[].agentIdinregistration.json(currently a0placeholder) and re-upload. - Buy the ENS name —
agent-doctor.eth(checked free on mainnet 2026-07-13); register it in the ENS app, set its ETH address record to the minting wallet. - Set the ENSIP-25 text record (bidirectional link):
Set the printed key to value.venv/bin/python identity/ens_records.py --ens <yourname>.eth --chain base --agent-id <agentId>1in the ENS app; also update the ENSservices[]entry inregistration.jsonif the name differs from the placeholder. Optionally set profile text records (avatar,description,url). - Optional: buy the $1 verification certificate at veral.tech for an extra trust signal.
- Self-check until grade A:
.venv/bin/python -m agent_doctor check --chain base --agent-id <agentId> --ens <yourname>.eth
Design notes / known limits (MVP)
- Read-only chain access; no keys, no signing, no state.
- The deployed registry proxy does not answer
totalSupply()/ enumeration (observed 2026-07-09), so ENS-only diagnosis without an agentId is best-effort and warns instead of guessing. - MCP probe is reachability-only; a real MCP handshake (initialize/tools-list) is a natural next step.
- Registration schema is validated leniently on purpose — the EIP-8004 registration-v1 field list is not a closed schema.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。