Declarative MCP server for the Cartograph widget library
Project description
cartograph-mcp
mcp-name: io.github.benteigland11/cartograph
An MCP server for Cartograph that exposes the daily widget workflow for agents without mirroring the entire CLI. Search, inspect, install, create, validate, check in, and configure Cartograph defaults through a compact agent-facing surface, then fall back to the CLI for the full administrative and recovery surface.
Why this exists
The Cartograph CLI is the source of truth, but agents do better when the common path is small and explicit.
This MCP keeps the top-level tool surface focused on daily driving:
- finding reusable widgets
- inspecting and installing them
- managing installed widget copies
- creating new widgets
- validating and checking them back in
- adjusting the core Cartograph defaults that affect normal workflow
Everything else stays in the CLI. That keeps the MCP easier to teach, easier to test, and less likely to drift into a second full interface.
Quick start
pip install cartograph-mcp
Claude Desktop example:
{
"mcpServers": {
"cartograph": {
"command": "cartograph-mcp"
}
}
}
The package depends on cartograph-cli and shells out to it as the source of truth for the full command surface.
Common CLI setup commands:
# Claude Code
claude mcp add cartograph --scope user -- cartograph-mcp
# Codex
codex mcp add cartograph -- cartograph-mcp
# Gemini CLI
gemini mcp add cartograph cartograph-mcp
# Cursor
cursor --add-mcp '{"name":"cartograph","command":"cartograph-mcp"}'
Claude Code expects an explicit scope flag such as --scope user.
Tool surface
The MCP intentionally exposes a small workflow-oriented surface:
registry_widgetActions:search,inspect,install,rateinstalled_widgetActions:upgrade,uninstallwidget_statuscreate_widgetvalidate_widgetcheckin_widgetcartograph_configcartograph_rules
These are not a 1:1 mirror of the CLI. They are grouped around agent intent:
- registry-facing work
- installed-widget mutation
- project health/status
- widget authoring
- workflow configuration
- custom validation rules
Example workflow
1. Search the registry before writing logic.
2. Inspect the widget you want to reuse.
3. Install it into the project.
4. If no existing widget fits, create one.
5. Validate it with the full dry-run pipeline.
6. Check it in with a reason once it is ready.
In Cartograph terms:
registry_widgethandles discovery and installinstalled_widgethandles already-installed widget paths likecg/backend_retry_pythonvalidate_widgetis the dry run forcheckin_widgetcartograph_configmanages the defaults that change how your day-to-day loop behavescartograph_rulesmanages custom rules that run during validate and checkin
Philosophy
This MCP is deliberately not the whole CLI.
The common path belongs in MCP. The official full surface belongs in cartograph.
For uncommon, administrative, or recovery operations, use:
cartograph --help
cartograph <command> --help
That includes things like rollback/delete, cloud operations, auth, setup, rules, doctor, export/import, and other non-daily commands.
Configuration
cartograph_config exposes the workflow defaults that matter most to agents:
auto-publishvisibilitygovernancecloudshow-unavailablepublish-registry
Reading and writing config is done through the CLI's --json path so MCP can consume it safely.
Testing
This package is tested in two layers:
- command-contract tests that mock the CLI runner and assert the exact commands the MCP builds
- isolated integration tests that run the real Cartograph CLI in a temporary environment
The integration suite isolates:
HOMEXDG_CONFIG_HOMEXDG_DATA_HOMEXDG_CACHE_HOMEWIDGET_LIBRARY_PATH- project working directory
That means validate/checkin/install flows are exercised without touching the real widget library or user config on the machine running tests.
Development
pip install -e .
pytest -q
The repo includes:
ci.ymlfor normal test/build validation on pushes and pull requestspypi-publish.ymlfor automated release publishing after a successful version-bump CI run
For the full product story and complete CLI surface, see Cartograph.
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
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 cartograph_mcp-0.1.3.tar.gz.
File metadata
- Download URL: cartograph_mcp-0.1.3.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71db0a5160d617d3dbc0b3bb3871520f87b136197db56d4211f1aa2d4406d4cb
|
|
| MD5 |
af663ef22c36396cad70ad1a6c587cc6
|
|
| BLAKE2b-256 |
79cad094dfc58a774344a61a7e9751d113e81e2e52ba92a3f352309f974ba918
|
Provenance
The following attestation bundles were made for cartograph_mcp-0.1.3.tar.gz:
Publisher:
pypi-publish.yml on benteigland11/cartograph-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cartograph_mcp-0.1.3.tar.gz -
Subject digest:
71db0a5160d617d3dbc0b3bb3871520f87b136197db56d4211f1aa2d4406d4cb - Sigstore transparency entry: 1365941964
- Sigstore integration time:
-
Permalink:
benteigland11/cartograph-mcp@87096a179f5cbe25affb914c6ffd9e3d3cad7d80 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/benteigland11
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@87096a179f5cbe25affb914c6ffd9e3d3cad7d80 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file cartograph_mcp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: cartograph_mcp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 9.3 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 |
ea6af87e1329802652bde98330653c23afe2ddea6db848c4a6aa4238f1d17ab4
|
|
| MD5 |
15fff4fa74d16df03f5d94e0e9b4e4d9
|
|
| BLAKE2b-256 |
b435ed055333bf6ffe6fcaceb14081a7a6c8d2f01b55f00654afa5fc5a5a162b
|
Provenance
The following attestation bundles were made for cartograph_mcp-0.1.3-py3-none-any.whl:
Publisher:
pypi-publish.yml on benteigland11/cartograph-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cartograph_mcp-0.1.3-py3-none-any.whl -
Subject digest:
ea6af87e1329802652bde98330653c23afe2ddea6db848c4a6aa4238f1d17ab4 - Sigstore transparency entry: 1365942020
- Sigstore integration time:
-
Permalink:
benteigland11/cartograph-mcp@87096a179f5cbe25affb914c6ffd9e3d3cad7d80 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/benteigland11
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@87096a179f5cbe25affb914c6ffd9e3d3cad7d80 -
Trigger Event:
workflow_dispatch
-
Statement type: