regrip MCP Regression CI
v0.1.0 · Python 3.14+ · Rust Capture Proxy · MIT

Catch breaking MCP tool changes before they break your agents.

It records real calls, replays your new server version inside a safe sandbox, and tells you which downstream agent breaks — deterministically, with zero LLM flakiness.

Regrip running against @modelcontextprotocol/server-filesystem and opening the live behavioral diff dashboard

Why Regrip?

Schema linters only inspect tools/list shapes. LLM evals are stochastic. Neither traces silent response drift back to the agents relying on those fields.

CapabilitySchema LinterLLM EvalRegrip
Detects value/unit shifts (e.g. 100× INR → paise)NoInconsistentDeterministic
Detects dropped keys & renames across call sitesPartialInconsistentDeterministic
Pinpoints which agent breaks (field lineage)NoNoConsumer Graph
Works across stdio, Streamable HTTP, GraphQL, gRPC, A2ANoNoUnified Engine
Zero-trust replay & pre-persistence PII redactionNoNo3-Tier Sandbox

30-Second Quickstart

Install via uv or one-liner, capture baseline MCP traffic, and gate pull requests cleanly.

Install & Run Demo Local

uv tool install regrip
# or: bash <(curl -fsSL https://raw.githubusercontent.com/Paraspandey-debugs/regrip/main/install.sh)

# 1. Initialize workspace & record v1 traffic
regrip init --project my-agents
regrip record --server finance-mcp --agent billing-bot --stdio -- python -m finance_mcp

# 2. Build immutable baseline & run CI gate against v2
regrip baseline build --server finance-mcp --tag v1.0.0
regrip ci --baseline v1.0.0 --target "python -m finance_mcp_v2"

# 3. Inspect historical drift or web UI
regrip serve --port 8787

Real-World Example: @modelcontextprotocol/server-filesystem FAIL (15)

$ bash examples/real_world_filesystem.sh

 FAIL   regrip ci · fs-mcp@2025.3.28
  candidate: npx --offline @modelcontextprotocol/server-filesystem@2025.11.25
  replay: 2/2 executed · 0 skipped · 0 errored

  create_directory
    FAIL  Schema     $.inputSchema.required.path
          Input parameter 'path' became required
  read_file
    FAIL  Schema     $.inputSchema.required.path
          Input parameter 'path' became required
    FAIL  Output     $.hello
          Field '$.hello' missing (present in 100% of baseline)

9-Category Diff Engine & Zero-Trust Safety

Every recorded response cluster is normalized with automatic UUID and timestamp masking before replay.

Schema & Output

Missing tools, parameter tightening, dropped JSONPaths, and Jaro-Winkler field rename detection.

Type & Default

Unexpected nullability, string/number coercions, and implicit default shifts across versions.

Value & 100× Scaling

Relative numeric tolerance checks, PSI distribution drift, and automatic 10×/100×/1000× unit-mismatch detection.

Ordering (Kendall τ)

Rank-correlation and Top-K stability checks for search and ranking tools consumed by bots.

Error & Semantic

Status-code flips plus AST-safe JSONPath assertions and deterministic text similarity checks.

3-Tier Safety Sandbox

Treats MCP ToolAnnotations strictly as untrusted hints; enforces READ_SAFE, DRY_RUN_ONLY, WRITE_BLOCKED, plus egress auditing.

CLI & Exit Codes

Deterministic exit codes let CI pipelines block regressions cleanly without parsing logs.

CommandPurpose
regrip initInitialize regrip.yaml and local .regrip/ store
regrip recordProxy MCP stdio or HTTP/SSE & redact PII pre-disk
regrip baselinebuild, inspect, export, or import .tar.zst bundles
regrip ciReplay + diff + consumer impact gate (JSON, MD, JUnit)
regrip serveStart REST API & Web Dashboard on 127.0.0.1:8787
Exit CodeMeaning
0All checks pass — zero behavioral regressions
1Behavioral regressions detected — CI gate failed
2Strict mode warning escalation or replay errors
3Configuration or baseline loading error

Python SDK & GitHub Action

Track dynamic field reads directly inside agent code or gate every pull request automatically.

Python SDK Lineage

from regrip import RegripRecorder, expect_fields

recorder = RegripRecorder(agent_id="support-agent", fail_open=True)

async with recorder.wrap_mcp_session(mcp_session, server_name="orders-mcp") as session:
    with expect_fields(tool="search_products", jsonpaths=["$.results[*].description"]):
        result = await session.call_tool("search_products", {"query": "laptop"})

tracked = recorder.track_consumption(tool="get_user", payload=result.structuredContent)
user_id = tracked["id"]  # drives CONFIRMED_REGRESSION

GitHub Action (Sticky PR Comment + Check Run)

- uses: Paraspandey-debugs/regrip@main
  with:
    baseline: .regrip/baselines/v1.json
    target: "python -m finance_mcp_v2"
    sandbox: auto
    format: markdown,json,junit

Publishes a sticky <!-- regrip-report --> PR comment with collapsible per-tool findings, Agent Impact verdicts, and Check Run annotations.

Architecture

Strict boundary separation: pure protocol-agnostic domain logic in core/, external transports/storage in adapters/, and zero-overhead capture in Rust.

  Your Agents ──► crates/regrip-proxy (Rust · tokio · hyper · hyper-rustls) ──► Pre-persistence PII Redaction
                       │
                       ▼  InteractionEnvelope (SQLite WAL + .jsonl.zst / PostgreSQL + S3)
                  src/regrip/core/ (Pure Python: baseline calibration · 9-cat diff · consumer graph · safety policy)
                       │
                       ▼
                  src/regrip/adapters/ (MCP · OpenAPI · A2A · GraphQL · gRPC · Docker/Podman Sandbox · Dashboard)