Discovers Claude Code capabilities — skills, agents, plugins, MCP servers, hooks — into typed catalogs and an environment report.
Project description
capdisc
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_code_capabilities-0.1.4.tar.gz.
File metadata
- Download URL: claude_code_capabilities-0.1.4.tar.gz
- Upload date:
- Size: 150.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e172cacd38b8d36f6edcbcb607a4c0082397abb5e3e038fb7f0247e261275ba3
|
|
| MD5 |
f1b5c45e33d3e05d2561845351345bc6
|
|
| BLAKE2b-256 |
1047968718b6a4bcab90166f2f37e0872733ecdc55fdbbeb144463d4d81f4316
|
Provenance
The following attestation bundles were made for claude_code_capabilities-0.1.4.tar.gz:
Publisher:
publish.yml on Magic-Man-us/claude-code-capabilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_code_capabilities-0.1.4.tar.gz -
Subject digest:
e172cacd38b8d36f6edcbcb607a4c0082397abb5e3e038fb7f0247e261275ba3 - Sigstore transparency entry: 2195378136
- Sigstore integration time:
-
Permalink:
Magic-Man-us/claude-code-capabilities@f32248f20cecb281eb6e531e2399872e955a3433 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Magic-Man-us
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f32248f20cecb281eb6e531e2399872e955a3433 -
Trigger Event:
release
-
Statement type:
File details
Details for the file claude_code_capabilities-0.1.4-py3-none-any.whl.
File metadata
- Download URL: claude_code_capabilities-0.1.4-py3-none-any.whl
- Upload date:
- Size: 74.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e28f4aef37f675081b755436e459dc2c96b4c16f146aa4a1c55912942c3db1a6
|
|
| MD5 |
72fde45e43ff23ef4b1d1f848545c028
|
|
| BLAKE2b-256 |
7595d9238889b8038b77cef6e01a26a3dc17dd981e99dc41290e2341fa26714c
|
Provenance
The following attestation bundles were made for claude_code_capabilities-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on Magic-Man-us/claude-code-capabilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_code_capabilities-0.1.4-py3-none-any.whl -
Subject digest:
e28f4aef37f675081b755436e459dc2c96b4c16f146aa4a1c55912942c3db1a6 - Sigstore transparency entry: 2195378144
- Sigstore integration time:
-
Permalink:
Magic-Man-us/claude-code-capabilities@f32248f20cecb281eb6e531e2399872e955a3433 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Magic-Man-us
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f32248f20cecb281eb6e531e2399872e955a3433 -
Trigger Event:
release
-
Statement type: