MCP server for AgentCard v1.0 — the framework-neutral A2A identity standard
Project description
agentcard-mcp
AgentCard v1.0 identity layer for agent-to-agent (A2A) communication.
Give any Claude / LLM agent a machine-readable identity using the open AgentCard standard.
What is AgentCard?
AgentCard is to A2A communication what HTTP headers are to the web: a standardised, machine-parseable capability declaration that works with any framework (LangChain, CrewAI, AutoGen, MCP, custom).
{
"agent_id": "01HZQK3P8EMXR9V7T5N2W4J6C0",
"name": "WebSearchAgent",
"version": "1.0.0",
"capabilities": [
{"id": "web.search", "description": "Search the web for current information."},
{"id": "web.scrape", "description": "Extract content from web pages."}
],
"endpoint": {
"protocol": "https",
"url": "https://my-agent.example.com/api"
},
"pricing": {
"base_cost_joules": 2.854e-21
}
}
Installation
pip install agentcard-mcp
Quick Start — Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"agentcard": {
"command": "python",
"args": ["-m", "agentcard_mcp"]
}
}
}
Then restart Claude Desktop and ask:
"Register my identity as a code assistant using AgentCard."
Tools
agentcard_declare
Register your AgentCard identity for this session.
Input: card_json (string) — JSON conforming to AgentCard v1.0 schema.
Required fields:
agent_id — 26-char Crockford Base32 ULID (e.g. 01HZQK3P8EMXR9V7T5N2W4J6C0)
name — Display name (1–128 chars)
version — Semantic version (e.g. "1.0.0")
capabilities — Array with ≥1 entry, each with dot-namespaced "id"
endpoint — { "protocol": "https"|"http"|"grpc"|"stdio"|"mcp", "url": "..." }
agentcard_resolve
Look up a registered agent's AgentCard by name or agent_id.
Input: query (string) — partial name (case-insensitive) or exact 26-char ULID.
agentcard_validate
Validate any JSON against the AgentCard v1.0 schema.
Checks:
- 26-char Crockford Base32 ULID format
- Semver 2.0 version string
- Dot-namespaced capability ids (
^[a-z0-9][a-z0-9._-]*$) - Landauer floor physics check on pricing (
base_cost_joules ≥ 2.854e-21 J)
agentcard_list
List all AgentCards registered in this session.
Resources
| URI | Description |
|---|---|
agentcard://schema |
Canonical AgentCard v1.0 JSON Schema |
agentcard://registry |
All declared cards as JSON array |
Usage Examples
Declare an identity
User: Register my identity as a data analysis agent.
Claude uses agentcard_declare({
"agent_id": "01HZQK3P8EMXR9V7T5N2W4J6C0",
"name": "DataAnalysisAgent",
"version": "1.0.0",
"capabilities": [
{"id": "data.analyze", "description": "Analyze datasets and produce insights."},
{"id": "data.visualize", "description": "Create charts and visualizations."}
],
"endpoint": {"protocol": "mcp", "url": "mcp://claude-desktop/data-agent"}
})
→ ✓ AgentCard declared — agent_id=01HZQK3P8EMXR9V7T5N2W4J6C0, name='DataAnalysisAgent', capabilities=2
Validate a peer's card
User: Is this AgentCard valid? [paste JSON]
Claude uses agentcard_validate(card_json)
→ VALID ✓
agent_id : 01HZQK3P8EMXR9V7T5N2W4J6C0
capabilities: 2 — [data.analyze, data.visualize]
endpoint : mcp://claude-desktop/data-agent
Resolve a peer agent
User: What can the researcher agent do?
Claude uses agentcard_resolve("researcher")
→ { "agent_id": "...", "capabilities": [...], ... }
AgentCard Schema Highlights
| Field | Type | Description |
|---|---|---|
agent_id |
string | 26-char Crockford Base32 ULID — globally unique |
name |
string | Display name 1–128 chars |
version |
string | Semantic version (semver 2.0) |
capabilities[].id |
string | Dot-namespaced (web.search, tool.python) |
endpoint.protocol |
enum | http, https, grpc, stdio, mcp |
pricing.base_cost_joules |
float | ≥ Landauer floor (2.854e-21 J) or 0 |
metadata.pacr:trust_tier |
enum | untrusted | basic | established | verified | banned |
Full schema: agentcard://schema
Framework Adapters
| Framework | Package | Import |
|---|---|---|
| LangChain | pip install agentcard-adapters[langchain] |
from agentcard_adapters import tool_to_agentcard |
| CrewAI | pip install agentcard-adapters[crewai] |
from agentcard_adapters import agent_to_agentcard |
| AutoGen | pip install agentcard-adapters[autogen] |
from agentcard_adapters.autogen_adapter import agent_to_agentcard |
Development
pip install -e ".[dev]"
pytest tests/
License
Apache 2.0 + CC-BY 4.0 (spec).
Patent non-reservation: NOTICE.
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentcard_mcp-0.1.0.tar.gz.
File metadata
- Download URL: agentcard_mcp-0.1.0.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e3622e8f815d4fa1db96cdf074bc41fe66cd56656329fd24b6bfca9663dfc8f
|
|
| MD5 |
60b83ded727e9c359ce06d7d6e5598d7
|
|
| BLAKE2b-256 |
2ef8ad76894acc9637bf6f84dbb97de5e0cb3c2f85060d69cad3abb664b407f2
|
File details
Details for the file agentcard_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentcard_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7596502d220f788070a80e2971288de521fd92f8f43d6fea3575d8456a4ade2
|
|
| MD5 |
ba27866a71f4865a665d396932166500
|
|
| BLAKE2b-256 |
011f7a6235a50a1dec58123268449c28fa605dc8a9482883ec8d4bbe89693485
|