Skip to main content

Generate Capability Cards for /.well-known/capability-card.json from OpenAPI or MCP metadata.

Project description

capcard

capcard is the open-source CLI for generating, validating, and publishing Capability Cards.

A Capability Card is a machine-readable JSON document published at /.well-known/capability-card.json so APIs and MCP servers can be discovered by agents.

Public repo: https://github.com/Capability-Index/capcard

What You Can Do With It

  • generate a Capability Card from an OpenAPI spec or MCP manifest
  • use Anthropic, OpenAI, Gemini, or deterministic no-key generation
  • validate the card against the public schema
  • publish it into a deployable /.well-known/ path
  • host it on GitHub Pages, Vercel, Netlify, Cloudflare Pages, or any static server

Install

pip install git+https://github.com/Capability-Index/capcard.git

Once the first PyPI release is published, this will also work:

pip install capcard

60-Second Quickstart

Fewest clicks

capcard init https://example.com/openapi.yaml --provider auto
capcard validate capability-card.json
capcard publish capability-card.json --target github-pages --site-dir .

That gives you:

  • capability-card.json
  • ./.well-known/capability-card.json
  • ./.nojekyll
  • ./index.html if one does not already exist

Generation Modes

1. Automatic provider selection

If one of these keys is present, capcard will use it automatically:

  • ANTHROPIC_API_KEY
  • OPENAI_API_KEY
  • GEMINI_API_KEY
export OPENAI_API_KEY=your_key_here
capcard enrich https://example.com/openapi.yaml --provider auto --output capability-card.json

2. Explicit provider selection

capcard enrich https://example.com/openapi.yaml --provider anthropic --output capability-card.json
capcard enrich https://example.com/openapi.yaml --provider openai --output capability-card.json
capcard enrich https://example.com/openapi.yaml --provider gemini --output capability-card.json

3. Deterministic no-key mode

If you do not want to use an LLM provider, or do not have an API key yet:

capcard enrich https://example.com/openapi.yaml --provider deterministic --output capability-card.json

This produces a valid starter Capability Card from the spec metadata alone.

Commands

capcard init

Create a starter capability-card.json and optionally publish it.

capcard init https://example.com/openapi.yaml
capcard init https://example.com/openapi.yaml --provider deterministic
capcard init https://example.com/openapi.yaml --publish-target vercel --site-dir ./public

capcard enrich

Generate a Capability Card without publishing it.

capcard enrich ./openapi.yaml --provider auto --output capability-card.json
capcard enrich ./mcp-manifest.json --provider deterministic --pretty

capcard validate

Validate a local Capability Card JSON file.

capcard validate capability-card.json

capcard publish

Copy a validated card into a deployable /.well-known/ path.

capcard publish capability-card.json --target static-dir --site-dir ./public
capcard publish capability-card.json --target github-pages --site-dir .
capcard publish capability-card.json --target vercel --site-dir ./public
capcard publish capability-card.json --target netlify --site-dir ./dist
capcard publish capability-card.json --target cloudflare-pages --site-dir ./dist

Hosting Guides

Public Repo Publishing Model

The canonical public repo is:

  • https://github.com/Capability-Index/capcard

Source of truth currently lives in the private capindex repo and is exported into this public repo. Public-safe files are prepared under oss/capcard/ and synced outward.

Scope Boundary

Open source:

  • Capability Card schema
  • capcard CLI
  • public docs and examples

Not open source:

  • CapIndex hosted index
  • crawler infrastructure
  • ranking logic
  • private enrichment workflows

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

capcard-0.2.0.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

capcard-0.2.0-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file capcard-0.2.0.tar.gz.

File metadata

  • Download URL: capcard-0.2.0.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for capcard-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f0be4f5513de3411ce8237ec46b5a7df11cf5c9699d3ead785263c3e740a4564
MD5 210fb474ecf3dd13e707b47770b86ca6
BLAKE2b-256 2f6225a65cdf37ec49371d54a1138c722208fafe7ca0aa5660213964cbbb6daa

See more details on using hashes here.

Provenance

The following attestation bundles were made for capcard-0.2.0.tar.gz:

Publisher: publish-pypi.yml on Capability-Index/capcard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file capcard-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: capcard-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for capcard-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 595bbdac312cdab22dc86e77a5c0b0b765be8d9bf41422519b5140a0c2b4888e
MD5 6651421c44bc70ab814e3913bbd137eb
BLAKE2b-256 9b2a2e6ced5dbbec0b9c4a8d82f7a65b8d8759655c8f2f3dde0e312cba2d7d74

See more details on using hashes here.

Provenance

The following attestation bundles were made for capcard-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on Capability-Index/capcard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page