r/GithubCopilot • • 2d ago

Showcase ✨ I built Zuma MCP: a free VS Code extension that stops Copilot from flooding your chat with huge build/test logs (cuts log reads to ~1%)

Hey everyone,

​I built Zuma MCP (free on the VS Code Marketplace), a local MCP server extension designed to solve one of the biggest headaches with Copilot Chat and AI coding agents: context window bloat from raw build logs, test dumps, and repeated full-file reads.

​Instead of letting your agent ingest thousands of raw terminal or document lines, Zuma acts as a compressed execution and I/O layer underneath it.

​Measured Impact (Single-File Benchmarks)

​68,000-char Markdown design doc: peek_file returns just the outline (7%, ~4,760 chars) instead of 100%.

​137,000-char execution log: summarize_log groups recurring errors and returns 1% (~1,370 chars). Storing it in a local evidence capsule and querying appended deltas drops responses down to 0.125%.

​What It Does (7 Purpose-Based Routers in v1.0.4)

​To keep tool schemas lightweight for the LLM, Zuma exposes 7 clean routers:

​1. zuma_read (Targeted File & Log Reading): Inspects file outlines, reads exact named symbols/sections, searches files with regex (.gitignore-aware), summarizes logs, and inspects Playwright traces. Automatically blocks redundant reads of unchanged files for 5 minutes.

​2. zuma_execute (Structured Build & Test Diagnostics): Runs only Git-affected tests (run_affected_tests) or targeted runners for .NET, Playwright, Vitest, Pytest, Bun, ESLint, Cargo, and tsc, returning structured failures without noise.

​3. zuma_gate (Execution Loop Protection): Trips a circuit breaker after 3 identical failures (comparing command, failure signature, and Git diff) and blocks unscoped full test suites during incremental work.

​4. zuma_context (Local Context Engine & Capsules): Provides declaration-level semantic_git_diff, content-addressed local evidence capsules, and workspace-scoped fact/decision memory (with automatic secret redaction).

​5. zuma_task (Task Anchors): Keeps the current goal, acceptance criteria, and allowed file paths visible across tool calls, warning if edits drift out of scope.

​6. zuma_shell (Persistent PowerShell 7 Sessions): Retains variables, imported modules, and working directories across commands within a dedicated chat session.

​7. zuma_handoff (Bounded Chat Handoff): Generates a compact summary of Git state, latest verification results, and next actions when you need to move to a fresh chat.

​Zero-Config Setup

​It bundles a native Rust front end + self-contained C# core, and auto-registers the MCP server in VS Code—no manual mcp.json setup required.

​VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=ShunsukeF.inazuma-pwsh

​GitHub (MIT License): https://github.com/furukawa658/inazuma-pwsh

​Feedback, bug reports, and feature ideas are very welcome!

2 Upvotes

2 comments sorted by

2

u/kantorcodes1 2d ago

Three identical failures and zuma_gate halts execution.

The thing I would steal is how you compare the command with failure signature and Git diff leading up to tripping.

How do you create a stable failure signature? If a test fails twice with the same failure, the output line could differ if timestamp or temp path is added to the output for instance.

2

u/ShunsukeF 2d ago

Good catch! That exact noise problem is why we don't hash raw terminal stdout.

​I stabilize the failure signature in two ways depending on the tool:

​1. Structured report extraction (for typed runners): Instead of scraping raw console lines, zuma_execute parses the structured reports (TRX for .NET, JUnit XML for pytest/bun, JSON for Vitest/Playwright, SARIF for MSBuild, etc.) and builds the signature from normalized {file, line, error_code/rule, core_assertion_message}—the same normalization we use to group same-cause failures.

​2. Token & volatile noise stripping (for raw logs / PowerShell fallback): When falling back to raw output, it strips ANSI codes, timestamps, hex addresses/GUIDs, and normalizes digits/temp paths (similar to how summarize_log clusters recurring log lines) before computing the signature.

​Pairing that normalized signature with the current git diff hash guarantees it only trips when the agent is genuinely spinning its wheels without changing the underlying code or error root cause.