Skip to main content

MCP server for Stubborn — deterministic code and contract context

Project description

stubborn-mcp

MCP server for Stubborn — exposes source-neutral code and contract graph tools to Cursor and other MCP clients.

PyPI

Thin adapter over stubborn.api. All compile and contract graph logic lives in stubborn-stub.

Part of the stubborn-ai program — see stubborn-hub.

Install

pip install stubborn-stub stubborn-mcp
stubborn try   # bundled fixture smoke test (no Java)

For binary/NDJSON SCIP indexing, install Stubborn with its SCIP extra:

pip install "stubborn-stub[scip]" stubborn-mcp
stubborn index --scip index.scip --out metadata/symbols.db
export STUBBORN_DB=metadata/symbols.db
stubborn-mcp

Contract-only databases are also supported:

stubborn index-openapi \
  --openapi openapi.json \
  --service customers-service \
  --workspace petclinic \
  --out metadata/symbols.db
export STUBBORN_DB=metadata/symbols.db
stubborn-mcp

Cursor configuration

.cursor/mcp.json:

{
  "mcpServers": {
    "stubborn": {
      "command": "stubborn-mcp",
      "env": {
        "STUBBORN_DB": "${workspaceFolder}/metadata/symbols.db"
      }
    }
  }
}

Module entry: python -m stubborn_mcp

Tools

Tool Purpose
workspace_info Inspect workspace source kinds: code repos, contract sources, symbols, endpoints
get_context Prune + weave code or contract context (java-stub or stubborn-dsl)
list_symbols Browse/search symbols by stable_id
list_contracts Browse/search OpenAPI contract endpoint stable IDs and schema constraints
metrics Compression KPI vs source tree

Full parameter reference: docs/MCP.md

Setup diagnostics

Read-only MCP and DB checks (ADR-015) — does not start the MCP server:

export STUBBORN_DB=metadata/symbols.db
stubborn-mcp doctor
stubborn-mcp doctor --json

Aggregate with sibling packages: stubborn-hub DEMO-LAUNCHERS.

Development

git clone https://github.com/stubborn-ai/stubborn-mcp.git
cd stubborn-mcp
pip install -e "../stubborn"
pip install -e ".[dev]"
pytest

License

MIT — see LICENSE.

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

stubborn_mcp-0.10.0b2.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

stubborn_mcp-0.10.0b2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file stubborn_mcp-0.10.0b2.tar.gz.

File metadata

  • Download URL: stubborn_mcp-0.10.0b2.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for stubborn_mcp-0.10.0b2.tar.gz
Algorithm Hash digest
SHA256 60107507df2cda4125904d68cb9b35b9ae65860ca441f381cdbbf8642cfd9f87
MD5 3c463029158a8507a8d6aa5a93be4377
BLAKE2b-256 c5c3beb57e46da31750ae79be587a142b62e6250d7af6cb096221303a965067e

See more details on using hashes here.

File details

Details for the file stubborn_mcp-0.10.0b2-py3-none-any.whl.

File metadata

File hashes

Hashes for stubborn_mcp-0.10.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 d7f3ac1d3d56ba7f822a83af19a398a4ddfd61ac76b69e17bbc3882ab417d3f8
MD5 59a4331855f70da21917ad1bff889c88
BLAKE2b-256 8a46e748ffd0c827c9e990532c39326cf83c9491f635d7f1af908348b04803bb

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