Cascade-resolution routing for concurrent multi-agent writes, exposed as an MCP server.
Project description
cascade-mcp
Cascade-resolution routing for concurrent multi-agent writes — a resolution router that decides, per conflict, whether a write wins, forks to a human, or must be recomputed, plus an MCP server that exposes the router as tools and a stress-test suite that proves the behavior can't be cherry-picked.
What's here
The core question: when many agents write to the same field over a dependency DAG, how do you resolve conflicts without either silently committing wrong values (pure cascade) or overpaying in wasted re-runs (pure OCC)? The hybrid policy routes zero-tolerance fields to OCC and tolerant fields to a provenance-weighted cascade. Every conflict lands in one of a few arms:
- WINNER — a live (non-stale) write wins on authority → confidence. No re-run, no human. This is the win over OCC.
- FORK — two+ fresh writes tie; defer to a human/high-tier agent instead of silently dropping one.
- RECOMPUTE — every competing write is premise-stale; there's no correct value to pick, so re-run. Here you're no better than OCC.
Layout
cascade/ importable package
cascade_routing.py core resolution router (OCC vs cascade vs hybrid)
server.py MCP stdio server wrapping the router as tools
cascade_sim.py standalone go/no-go regime simulator
scripts/ data-generation / audit utilities
gen_agent_logs.py emit agent_logs.csv across the regime × policy grid
audit_cherrypick.py adversarial read of agent_logs.csv
validate_logs.py quick sanity checks on a generated CSV
tests/ verification suite
test_agent_logs.py 43-check self-consistency + usability suite over the CSV
test_mcp_wrapper.py routes the regime grid through the MCP wrapper and
re-runs the suite to prove the wrapper preserves behavior
Large simulation outputs (agent_logs.csv, agent_logs_mcp.csv, ~900 MB each)
are regenerable and are gitignored.
Requirements
- Python ≥ 3.10 (developed on 3.13)
mcp— installed automatically as a dependency
Install & attach to an MCP client
Once published to PyPI, no clone or virtualenv is needed — uvx
runs the server in an ephemeral environment:
uvx cascade-mcp
To attach the router to Claude Desktop or Cursor, add this to your
claude_desktop_config.json:
{
"mcpServers": {
"cascade": {
"command": "uvx",
"args": ["cascade-mcp"]
}
}
}
The MCP server exposes five tools: configure, read_state, propose_update,
churn, get_field.
Usage (from source)
Clone the repo and run everything from the repo root.
Run the MCP server (stdio):
python -m cascade.server
Run the standalone simulator:
python -m cascade.cascade_sim
Generate the stress-test CSV (writes UTF-8 — pipe via a POSIX shell, not
PowerShell >, which re-encodes to UTF-16 and corrupts the file):
python scripts/gen_agent_logs.py > agent_logs.csv
Verify the generated CSV:
python -m tests.test_agent_logs # 43-check suite
python scripts/audit_cherrypick.py # adversarial cross-checks
Verify the MCP wrapper preserves the router's behavior end-to-end (wire-protocol smoke test → regime grid through the wrapper → re-run the suite):
python -m tests.test_mcp_wrapper
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 cascade_mcp-0.2.0.tar.gz.
File metadata
- Download URL: cascade_mcp-0.2.0.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a056a7d64dbdffd690fe969f8f7dcb700699b7da7e51b9991fece6713e473fd1
|
|
| MD5 |
e121e61a7a0cc94c363e8142fff402fa
|
|
| BLAKE2b-256 |
f2270a307d91161bdbfe5f1ef60654df5348b6f161cf0d1f21f838ea3a69a65a
|
Provenance
The following attestation bundles were made for cascade_mcp-0.2.0.tar.gz:
Publisher:
publish.yml on clemente-turrubiates/cascade-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cascade_mcp-0.2.0.tar.gz -
Subject digest:
a056a7d64dbdffd690fe969f8f7dcb700699b7da7e51b9991fece6713e473fd1 - Sigstore transparency entry: 2084273250
- Sigstore integration time:
-
Permalink:
clemente-turrubiates/cascade-mcp@63562c710a505de5ca670d87abc7b6416f3de69a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/clemente-turrubiates
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@63562c710a505de5ca670d87abc7b6416f3de69a -
Trigger Event:
push
-
Statement type:
File details
Details for the file cascade_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cascade_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.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 |
655a370222699f1b7d945c4a68e2aa652be50d098b677b9246e0ed33d343849e
|
|
| MD5 |
2bfa525c74611c62a77ad962d99142db
|
|
| BLAKE2b-256 |
0895a4aa0a356238c82501a349cbe598b1558338791f86e63d9c18376236eaa1
|
Provenance
The following attestation bundles were made for cascade_mcp-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on clemente-turrubiates/cascade-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cascade_mcp-0.2.0-py3-none-any.whl -
Subject digest:
655a370222699f1b7d945c4a68e2aa652be50d098b677b9246e0ed33d343849e - Sigstore transparency entry: 2084273260
- Sigstore integration time:
-
Permalink:
clemente-turrubiates/cascade-mcp@63562c710a505de5ca670d87abc7b6416f3de69a -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/clemente-turrubiates
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@63562c710a505de5ca670d87abc7b6416f3de69a -
Trigger Event:
push
-
Statement type: