/ai-catalog-cli:ai-catalog-clifrom ai-catalog-cli
Discovers, inspects, validates, and installs AI resources (MCP servers, A2A agents, agent skills) from AI Catalogs via the `ai-catalog` CLI. Use when searching a catalog, registering an MCP server, or installing agent skills.
Ships in ai-catalog-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
ai-catalog is a command-line tool for discovering, validating, and pulling resources from AI Catalogs — typed JSON documents (application/ai-catalog+json) that index MCP servers, A2A agents, agent skills, and other AI artifacts.
application/ai-catalog+json) that lists typed entries. Catalogs can nest other catalogs (fetched up to 4 levels deep).identifier (URN), a type (MIME type), and a url pointing to the artifact.catalog add or oci add, stored at ~/.ai-catalog/.Common entry types:
| Type | Artifact |
|---|---|
application/mcp-server-card+json | MCP server card |
application/a2a-agent-card+json | A2A agent card |
application/agent-skills+md | Agent skill (markdown) |
application/agent-skills+zip, +gzip, +json | Agent skill bundle or metadata |
application/agent-plugins+zip, +gzip | Agent plugin bundle |
application/ai-catalog+json | Nested catalog |
This CLI implements AI Catalog spec v0.9, a release candidate for v1.0. Catalogs it writes carry "specVersion": "0.9"; it still reads catalogs that declare a major version up to 1.
Identifiers are opaque strings. The recommended form is urn:air:{publisher}:{name}[:{kind}], for example urn:air:acme.com:engineering/code-review:skill: the publisher domain, a publisher-defined name that may contain / or ., and an optional single-segment kind. Never take the last : segment as the name.
Before searching, register at least one catalog:
ai-catalog catalog add <name> <url>
Example:
ai-catalog catalog add ai-tools https://raw.githubusercontent.com/Agent-Card/ai-catalog-cli/main/fixtures/spec-example.json
Accepts HTTP/HTTPS URLs, file:// paths, or a bare domain or website. For a domain or an https:// URL that is not itself a catalog, the CLI follows the spec's discovery procedure: a Link header with rel="ai-catalog", an HTML <link rel="ai-catalog">, then /.well-known/ai-catalog.json. Nested catalogs are fetched and cached automatically.
ai-catalog catalog add example example.com
ai-catalog search <keyword> # full-text search across all registered catalogs
ai-catalog search <keyword> -n 100 # override result limit (default 50)
ai-catalog search <pattern> --regex # treat keyword as a regular expression
ai-catalog search <keyword> --json # machine-readable output
Searches identifier, displayName, description, and tags. Works fully offline after the catalog is cached.
ai-catalog show <identifier> # table view
ai-catalog show <identifier> --json # full entry JSON
ai-catalog show <identifier> --scope <catalog-name> # scope to a registered catalog by name
ai-catalog show <identifier> --scope <url> # scope to any catalog by URI (file:// or http/https)
ai-catalog show <identifier> --media-type <mime> # filter/disambiguate by MIME type
--scope accepts either a registered catalog name or a URI directly. file:// URIs are read from disk; http:///https:// URIs are fetched and cached on the fly without registering.
--media-type on a catalog entry resolves its children and shows the single entry matching that type; None or application/ai-catalog+json shows the catalog entry itself.
ai-catalog pull <identifier> # write to current directory
ai-catalog pull <identifier> -o <dir> # write to a specific directory
ai-catalog pull <identifier> -o - # stream artifact bytes to stdout
ai-catalog pull <identifier> --scope <catalog-name-or-url> # narrow search to one catalog
ai-catalog pull <identifier> --media-type <mime> # required when <id> is a catalog entry
Important: if <identifier> resolves to a catalog entry (type application/ai-catalog+json), pull requires --media-type:
--media-type value | Result |
|---|---|
application/ai-catalog+json | Write the catalog JSON document itself |
<other> e.g. application/json | Pull the single child entry of that type (error if 0 or >1 match) |
| (omitted) | Error — suggests using --media-type |
--scope obeys the same URI rules as show (name or URI).
Without -o, the file is named after the identifier's {name} for urn:air identifiers, with / and . turned into _.
MCP server cards (application/mcp-server-card+json) contain a remotes array with endpoint URLs:
# Find the server
ai-catalog search <keyword>
# Stream the card through jq to get the remote URL
MCP_URL=$(ai-catalog pull <identifier> -o - | jq -r '.remotes[0].url')
Register that URL using the mechanism of the host you are running in. Claude Code provides a CLI for it:
claude mcp add --transport http <name> "$MCP_URL"
Other hosts, including Cursor, VS Code, and Codex, register MCP servers through
their own command or configuration file. Use the host's documented mechanism
rather than assuming a claude binary is on PATH.
Agent skills (application/agent-skills+md) are markdown files following the
Agent Skills standard. A skill must live in a directory
named after it, with the markdown as SKILL.md inside, so create the directory
before pulling:
NAME=<skill-name>
mkdir -p ~/.agents/skills/"$NAME"
ai-catalog pull <identifier> -o ~/.agents/skills/"$NAME"/SKILL.md
To install all skills matching a search:
ai-catalog search skill --json \
| jq -r '.entries[] | select(.type == "application/agent-skills+md") | .identifier' \
| while read -r id; do
# urn:air:{publisher}:{name}[:{kind}] -> {name}, safe as a directory name
name=$(printf '%s' "$id" | cut -d: -f4 | tr '/.' '--')
mkdir -p ~/.agents/skills/"$name"
ai-catalog pull "$id" -o ~/.agents/skills/"$name"/SKILL.md
done
~/.agents/skills/ is the cross-host location read by Cursor, Copilot, VS Code,
Codex, and Gemini CLI. Claude Code reads ~/.claude/skills/, which several other
hosts also honour. Substitute the directory your host scans.
A2A agent cards (application/a2a-agent-card+json) contain supportedInterfaces with the endpoint and protocol binding:
# Pull the agent card
ai-catalog pull <identifier> -o ./agent.json
# Extract endpoint and binding
AGENT_URL=$(jq -r '.supportedInterfaces[0].url' ./agent.json)
BINDING=$(jq -r '.supportedInterfaces[0].protocolBinding' ./agent.json)
# Send a message
a2acli --base-url "$AGENT_URL" --binding "$BINDING" send "<message>"
# Retrieve the result
a2acli --base-url "$AGENT_URL" --binding "$BINDING" get-task <task-id>
ai-catalog catalog list # list registered catalogs (--json supported)
ai-catalog catalog update <name> # re-fetch from source, skip if unchanged
ai-catalog catalog remove <name-or-url> # remove and garbage-collect cached objects
ai-catalog validate <path|-> # validate catalog JSON against the spec
ai-catalog validate --json <path|-> # machine-readable validation result
ai-catalog verify <path|-> # check signatures and artifacts
ai-catalog verify --json <path|-> # machine-readable verification report
ai-catalog format <path|-> # pretty-print a catalog document
validate is offline and structural. It reports the conformance level minimal or discoverable and any errors or warnings, never trusted. Exit code 0 = valid, 1 = invalid. With --json, match on each error's stable code, not its message.
verify also checks the trust manifests: each manifest's release binding, its did-web-v1 signature against the signer's did:web document, its validity period, and inline data against the entry digest. Only verify reports trusted. Each check is verified, failed, or unverifiable.
ai-catalog verify --offline --did-document did:web:example.com=did.json catalog.json
ai-catalog verify --strict catalog.json
--did-document DID=PATH supplies a DID document instead of fetching it (repeatable).--offline never fetches; checks that needed a fetch are unverifiable.--strict also exits 1 when a signed manifest could not be fully verified.The repository ships GitHub Actions that install a released CLI (checksum-verified) and validate a catalog, reporting each problem as an annotation:
- uses: actions/checkout@v7
- uses: Agent-Card/ai-catalog-cli/.github/actions/setup-ai-catalog@main
- uses: Agent-Card/ai-catalog-cli/.github/actions/validate@main
with:
path: .well-known/ai-catalog.json # or url: https://example.com/.well-known/ai-catalog.json
validate outputs valid, conformance_level, and report, and fails the step on an invalid catalog unless fail_on_invalid is false.
Use oci subcommands to work with OCI-packaged catalogs (e.g. from GHCR):
# Pack a catalog JSON into an OCI artifact envelope
ai-catalog oci pack <path|->
# Unpack that JSON artifact set back into a catalog
ai-catalog oci unpack <path|->
# Push a catalog to an OCI registry (requires `oras` on PATH)
ai-catalog oci push <path|-> <registry-target>
# e.g. ai-catalog oci push catalog.json ghcr.io/example/ai-catalog:latest
# --tag <tag> tag to give the catalog (default: latest)
# --plain-http use HTTP instead of HTTPS
# --insecure skip TLS verification
# --to-oci-layout-path <dir> copy to an image layout instead of a registry
# --cosign-key <key> sign trust manifests (--cosign-public-key attaches the public key)
# --sigstore-services <tlog,tsa> record signatures with public Sigstore services
# --signing-config <path> sign with a Cosign signing config instead
# Export a catalog to an OCI image layout directory
ai-catalog oci export-layout <path|-> <layout-dir>
# --tag <tag> (default: latest); takes the same signing options as push
# Read the catalog out of an OCI image layout
ai-catalog oci unpack-layout <layout-dir> [--ref-name <tag>]
# Import an OCI image layout into the local registry
ai-catalog oci add <name> <layout-dir>
# Search, inspect, and pull from OCI-sourced catalogs only
ai-catalog oci search <keyword>
ai-catalog oci show <identifier> [--media-type <mime>]
ai-catalog oci pull <identifier> -o <dir> [--media-type <mime>]
| Variable | Description | Default |
|---|---|---|
AI_CATALOG_CACHE_DIR | Override default cache directory | ~/.ai-catalog/ |
AI_CATALOG_COSIGN_BIN | Path to cosign binary | cosign |
AI_CATALOG_ORAS_BIN | Path to oras binary | oras |
COSIGN_PASSWORD | Password for encrypted Cosign private key | (none) |
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Validation or verification failures, parse failures, runtime errors |
| 2 | Usage errors (missing arguments, unknown options) |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub agent-card/ai-catalog-cli --plugin ai-catalog-cliOther plugins' skills for the same job