MCP server for Rosentic - cross-branch conflict detection for parallel AI coding agents: catches breaking signature changes, HTTP route breaks, and schema drift between agent branches before merge
Project description
Rosentic MCP Server
CI checks each PR against main. It doesn't check open PRs against each other.
Rosentic does. Install one package, then ask your coding agent to check for cross-branch conflicts before you merge.
One agent changes a function signature. Another agent still calls the old version. Both pass CI. Git merges the text cleanly. Main breaks.
Rosentic compares active branches against each other. Deterministic static analysis. No LLM. In local MCP mode, code and scan metadata stay on your machine.
MCP gives your editor or coding agent access to Rosentic tools on demand. It is not a hard automatic gate by itself. For automatic protection before every git push, install the Rosentic pre-push hook or use the GitHub Action as a CI backstop.
Freshness and offline behavior
- Scan results are cached for 60 seconds per (repo, base, branch-set); a repeat call inside that window returns the cached result instantly.
check_filemarks sibling-branch index data stale after 300 seconds (stale_after_secondsto override) and reports freshness metadata in every response, so an agent always knows how old its sibling context is.- Sibling context comes from your local git refs: run
git fetchto pick up new sibling work; the server never fetches for you. - Offline:
check_file,check_conflicts,explain_conflict, andlist_branchesare fully local and work with no network.get_policyandget_verdictread the dashboard API and degrade gracefully offline - they return an explanatory payload (never raise), andget_policyreports the built-in default (advisory, UNSAFE fails), which is exactly what the CI gate falls back to. - Linked git worktrees are supported (repo detection uses git rev-parse, not a .git-directory test). One caveat: when the engine runs via Docker (no local checkout), scan the MAIN checkout rather than a linked worktree - a worktree's gitdir lives outside the mounted path. With a local engine (dev checkout / ROSENTIC_ENGINE_PATH), worktrees work everywhere.
- Call metering is a local counter at
~/.rosentic/mcp-usage.json. Nothing is billed and the counter never blocks a call.
Install
pip install rosentic-mcp
Configure
Claude Code
Add to ~/.claude.json:
{
"mcpServers": {
"rosentic": {
"command": "rosentic-mcp"
}
}
}
Add this instruction to your repo's CLAUDE.md:
Before running git push, call the Rosentic check_conflicts MCP tool to verify your branch is compatible with other active branches.
Codex
Add to ~/.codex/config.toml:
[mcp_servers.rosentic]
command = "rosentic-mcp"
args = []
Add the same push-boundary instruction to AGENTS.md.
Cursor / VS Code
Add to MCP settings:
{
"rosentic": {
"command": "rosentic-mcp"
}
}
Tools
check_conflicts
Scan a git repo for cross-branch conflicts affecting your current branch.
Parameters:
repo_path(required) — path to local git repositorybranch— branch to check (defaults to current branch)base— base branch to compare against (defaults tomain)format—"summary"(natural language) or"json"(structured findings)
Example response:
Rosentic found 4 unique conflict(s) for feature/auth-refactor: 2 UNSAFE, 2 WARNING. Layer breakdown: 3 L1 signature, 1 L2 route. Most critical: createUser() in src/auth/users.ts — changed from 2 to 3 required params. Recommendation: inspect the UNSAFE findings first and update the stale branch before merging.
check_file
Check proposed complete file content against active sibling branches before writing.
Parameters:
repo_path(required) — path to local git repositoryfile(required) — repository-relative file path being editedcontent(required) — proposed complete post-edit file contentbranch— current branch to use as the proposed-content overlaybase— base branch to compare against (defaults tomain)stale_after_seconds— mark branch index data stale after this many seconds
The response includes SAFE/WARNING/UNSAFE verdict, conflict direction, consumers with branch attribution, checked branches, skipped branches with reasons, and index freshness metadata.
explain_conflict
Get detailed explanation of a specific finding, including affected branches, consumer locations, and remediation steps.
Parameters:
repo_path(required) — path to local git repositoryfinding_id(required) — ID from a previouscheck_conflictsresult
list_branches
List local branches sorted by most recent commit date.
Parameters:
repo_path(required) — path to local git repository
get_verdict
Look up recorded gate verdicts in the Rosentic audit ledger by SHA (append-only gate ledger via the dashboard API). Requires ROSENTIC_API_KEY (a ros_live_ workspace key) for the org's workspace. Degrades gracefully offline — returns an explanatory payload instead of raising.
Parameters:
org(required) — GitHub org/owner of the repositoryrepo(required) — repository namehead_sha— PR head SHA to look up; if omitted, returns the most recent gate verdicts for the repo
get_policy
Fetch the effective Rosentic gate policy (repo > org default > built-in): gate mode, severity threshold, per-layer enforce/advisory, branch-pattern rules, and the stamped policy version. Public read — no key needed. Degrades gracefully offline with the built-in default and a notice.
Parameters:
org(required) — GitHub org/owner of the repositoryrepo— repository name; omit for the org default policy
What it detects
| Layer | What | Example |
|---|---|---|
| L1 | Function signature mismatches | Branch A adds required param, Branch B still calls with old arity |
| L2 | HTTP route contract breaks | Route path or method changes, consumers still call old endpoint |
| L3 | Schema incompatibilities | Proto field removed, GraphQL type changed, OpenAPI contract broken |
How it works
- Deterministic — no LLM in the scan path. Tree-sitter AST parsing + evidence-gated verdicts.
- Fast — scans 30 branches in under 30 seconds for most repos.
- Evidence-based — every finding includes proof: which symbol changed, where it's called, why it's linked.
Requirements
- Python 3.11+
- Git repository with branches to scan
- Works on macOS, Linux, Windows (WSL)
Verify
From a checkout that has this repository's helper scripts:
python3 scripts/mcp-smoke-test.py
Expected output:
Rosentic MCP OK: check_conflicts, check_file, explain_conflict, get_policy, get_verdict, list_branches
Links
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 rosentic_mcp-0.1.4.tar.gz.
File metadata
- Download URL: rosentic_mcp-0.1.4.tar.gz
- Upload date:
- Size: 105.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb3f633ff137e34ef01b519b1d30db10f4497352b91c978d6a51d6fd432e0067
|
|
| MD5 |
38bab11f3b6ddb7b4427507dd6367786
|
|
| BLAKE2b-256 |
330d53b48a1e78d2542b75432cc1f2088ec58ad3cd36bf763cdef31a4b6b78dd
|
File details
Details for the file rosentic_mcp-0.1.4-py3-none-any.whl.
File metadata
- Download URL: rosentic_mcp-0.1.4-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5afc213097e32e849d7250a0a002901218e39187a4eeb45d76f921f8e007cc7a
|
|
| MD5 |
103cb259da06d7efeaeb7d8cbad924f1
|
|
| BLAKE2b-256 |
55c53b2d08c794dacfb5dcefe2bb2a022f3a9d39b2821192a82e1fe75d1ea407
|