Skip to main content

Discovers Claude Code capabilities — skills, agents, plugins, MCP servers, hooks — into typed catalogs and an environment report.

Project description

capdisc

PyPI Python versions CI License: MIT

Discovers Claude Code capabilities — skills, agents, plugins, MCP servers, hooks — into typed Pydantic catalogs and an environment report.

Install

uv add claude-code-capabilities
# or
pip install claude-code-capabilities

CLI

capdisc            # scan this machine, write discovery-report.json + .html
capdisc --oauth     # also allow the interactive OAuth flow for HTTP MCP servers
                    # with a pre-registered client (forces a fresh MCP harvest)

Both files are written to ~/.claude/capdisc/ by default. Configure paths and MCP auth via env vars (CAPDISC_ prefix), a .env file, or ~/.claude/capdisc/config.json/config.yaml — see DiscoverySettings in settings.py for every field.

Library

Scan the machine into a typed catalog:

from pathlib import Path
from capdisc.discovery import scan_environment
from capdisc.scope import ScopeRoots

roots = ScopeRoots.discover(start=Path.cwd(), home_dir=Path.home())
catalog = scan_environment(roots)
for entry in catalog.entries:
    ...  # CatalogSkill | CatalogTool | CatalogMcpServer | CatalogPlugin

Build and persist the full environment report (what the CLI does):

from capdisc.report import build_report, write_report

report = build_report(oauth=False)
write_report(report)  # -> ~/.claude/capdisc/discovery-report.{json,html}

Inspect the on-disk scope inventory directly — every skill/agent/command/hook found, its precedence, and which ones actually win a collision:

from capdisc.scope import ScopeInventory, ScopeRoots

inventory = ScopeInventory.scan(ScopeRoots.discover(start=Path.cwd(), home_dir=Path.home()))
print(len(inventory.artifacts), "captured,", len(inventory.effective), "in effect")
for hooks in inventory.hook_configs:
    ...  # HookConfig, unified from settings.json and component frontmatter

MCP servers

Read the last harvested tool inventory (fast, no network — served from a 12h cache):

from capdisc.mcp_harvest import read_mcp_cache, cache_is_stale

servers = read_mcp_cache()  # [] if there's no cache yet
if cache_is_stale():
    ...  # trigger a refresh (below) before trusting this

Force a fresh harvest — connects to every configured server concurrently (bounded) and lists their real tool schemas:

from capdisc.mcp_harvest import refresh_mcp_cache

servers = refresh_mcp_cache(oauth=False)  # also (re)writes the cache
for server in servers:
    print(server.ref, [t.name for t in server.tools])

Bearer/OAuth auth for HTTP servers is opt-in via settings, bound to an exact hostname so a same-named server elsewhere can never receive a credential meant for another:

export CAPDISC_MCP_BEARER_ENV='{"github": {"env": "GH_TOKEN", "host": "api.githubcopilot.com"}}'

report.EnvironmentReport captures the full discovery harvest (scan roots, on-disk inventory, skills, builtin tools, plugins with per-component token cost, MCP servers). mcp_harvest and mcp_catalog enumerate connected MCP servers; plugin_catalog reads installed plugins; scope resolves which roots to scan.

The package ships py.typed.

Tests

uv run pytest
uv run mypy src
uv run ruff check .

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

claude_code_capabilities-0.1.2.tar.gz (161.7 kB view details)

Uploaded Source

Built Distribution

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

claude_code_capabilities-0.1.2-py3-none-any.whl (74.7 kB view details)

Uploaded Python 3

File details

Details for the file claude_code_capabilities-0.1.2.tar.gz.

File metadata

  • Download URL: claude_code_capabilities-0.1.2.tar.gz
  • Upload date:
  • Size: 161.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for claude_code_capabilities-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5e0ac6ceabd2364efca145b7a599f46da75159300c02d56ef1c81d99db2c911b
MD5 145adf05704c33b056aa9cb540ddf98f
BLAKE2b-256 d1300403bbc23672378868382df4b3f70da3252f61a54ced331746cd40891eaf

See more details on using hashes here.

File details

Details for the file claude_code_capabilities-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_code_capabilities-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7fdd4f3d1665d185d39cdb9c8635a16d29445797cacf3ffd5a3d037b1abd44f5
MD5 27cc91027368d4da3284866213c9aa1c
BLAKE2b-256 ba1e77c2bf92e4ebd0721b8f2bc7672f236a26a9ce9d81b86f14ddf1487e4da2

See more details on using hashes here.

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