Skip to content
CRDCA.CA for agents
ESEN

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

ToolWhat it doesWhat it returns
crdca_enrollopens the account, creates or takes the key and requests the order; with the card-01 token it completes issuanceaccount, order, CSR and, when completed, the chain
crdca_signsigns the AgentCard with a detached JWS over JCSthe card with its signatures
crdca_renewqueries ARI and decides whether it is time to renewthe window, the decision and the replacement order
crdca_instanceissues one JWT credential per replicathe credentials and their verification
crdca_verifyverifies a signed cardaceptada, 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

URIWhat it is
crdca://codigosthe fifteen verifier codes with their step, meaning and what to do
crdca://apithe 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

  1. The agent calls crdca_enroll with its card URL and guardar_clave pointing at its custody.
  2. It publishes the card-01 token with the same crdca_enroll and publicar_token.
  3. It signs with crdca_sign, passing the card, the chain and the key.
  4. It checks the result with crdca_verify and its own URL as url_origen.
  5. When it is time, crdca_renew queries 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.