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

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

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.1.0b2.tar.gz (7.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.1.0b2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stubborn_mcp-0.1.0b2.tar.gz
  • Upload date:
  • Size: 7.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.1.0b2.tar.gz
Algorithm Hash digest
SHA256 f22fd2696fda9f81f618d9881c673b5757d2214e1a389da83a0c82c9a1665e8b
MD5 83794510c389964bfad7bbb8f8320f85
BLAKE2b-256 3b4f7440fcde14b4520fa71664b30ede44b35e56fea2e8b28c92a3fba1bf33cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stubborn_mcp-0.1.0b2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for stubborn_mcp-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 09c3775142548b7542437389a932fd5073a3b7b89b03b389eef2e4c6f7cda3cc
MD5 0d367c322e7f87055e1fec4b8e6b64c0
BLAKE2b-256 3ada35c350e3bfb01285618a8d005b3c9c1438b91c99958876e6c331e1b5a905

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