Use CRDCA from an agent with MCP
The CRDCA MCP server exposes the client's four operations and verification as tools, so an agent can use them without writing code.
CRDCA ships an MCP (Model Context Protocol) server that speaks over standard input and output. An agent that already speaks MCP —Claude Desktop, Cursor, any client of the protocol— can enroll a card, sign it, renew it and verify someone else's without writing a line of code.
Start it
pip install crdca
crdca-mcp --lista
--lista prints the five tools and the two resources and exits. Without a flag the process listens on standard input, which is what an MCP client does when it starts it.
Configure it in a client
The block is the same everywhere: one command and no arguments.
{
"mcpServers": {
"crdca": {
"command": "crdca-mcp"
}
}
}
If the binary is not on the client's PATH, give the absolute interpreter path and the module:
{
"mcpServers": {
"crdca": {
"command": "python3",
"args": ["-m", "crdca.mcp"]
}
}
}
The five tools
| Tool | What it does | What it returns |
|---|---|---|
crdca_enroll | opens the account, creates or takes the key and requests the order; with the card-01 token it completes issuance | account, order, CSR and, when completed, the chain |
crdca_sign | signs the AgentCard with a detached JWS over JCS | the card with its signatures |
crdca_renew | queries ARI and decides whether it is time to renew | the window, the decision and the replacement order |
crdca_instance | issues one JWT credential per replica | the credentials and their verification |
crdca_verify | verifies a signed card | aceptada, the codes and the level |
crdca_verify does the local check: the JWS signature against x5c[0], that kid is the SPKI fingerprint of the leaf, that the SAN URI is the origin URL and that the leaf is valid now. What needs shared inputs —the chain against the trust package, the inclusion proof and the status list— is declared under no_verificado instead of being faked: that is what the full middleware or the authz filter are for.
The two resources
| URI | What it is |
|---|---|
crdca://codigos | the fifteen verifier codes with their step, meaning and what to do |
crdca://api | the 45 routes of the five services, with method, type and rate limit |
A resource is data the model reads without spending a call: it lets the agent know what an R07 means before deciding what to do with a rejection.
A full run
- The agent calls
crdca_enrollwith its card URL andguardar_clavepointing at its custody. - It publishes the
card-01token with the samecrdca_enrollandpublicar_token. - It signs with
crdca_sign, passing the card, the chain and the key. - It checks the result with
crdca_verifyand its own URL asurl_origen. - When it is time,
crdca_renewqueries ARI and renews at half life.
The four steps are the same ones the CLI does: the MCP server has no second logic, it calls the same SDK functions.