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.0b1.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.0b1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stubborn_mcp-0.10.0b1.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.0b1.tar.gz
Algorithm Hash digest
SHA256 ca745d45fd7a29577b9c1ebe5c0bc55d1cb455b9f8a69dd536cf41a858a1597c
MD5 d1d191a0eaca4bf17f88b672b80d4910
BLAKE2b-256 547b9f90a3be396d1d9219544c3fd08a6f5aeda711e23b8c1f24ff12b037049e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for stubborn_mcp-0.10.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 092577a06eceb84af6182cf4085a93046e57d101804b8c5e9a66cdfff1d31cb9
MD5 6243cb3f94e7cb0d5e496c181802c5bd
BLAKE2b-256 cdd534e5956ab2fc0f3531e12c4695f698c7e27958ddf91b874c73efcc9f1311

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