mcp-run-core

Guides editing of the Perl MCP-Run codebase covering the mcp-run-bash server and compression pipeline.

3|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/Getty/p5-mcp-run --skill mcp-run-core-getty
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-run-core
Source: https://github.com/Getty/p5-mcp-run/tree/main/.claude/skills/mcp-run-core
Command: npx skills add https://github.com/Getty/p5-mcp-run --skill mcp-run-core-getty

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing the p5-mcp-run repository without breaking its intentional design decisions: the skill documents the architecture, invariants, and test traps of the mcp-run-bash MCP server and the mcp-run-compress Claude Code hook so changes do not silently violate core contracts. ## Core Features & Use Cases - Architecture map: Documents the layer structure (bin scripts, MCP::Run, MCP::Run::Bash, MCP::Run::Compress) and the 11-stage compression filter pipeline. - Core invariants: Records non-negotiable behaviors such as timeout exit code 124, compile-time loading of the Compress module, MCP >= 0.15 protocol requirements, and the intentional difference between binary and module compression defaults. - Test guidance: Explains the t/ test layout, the prove -lr trap, and why negative assertions must be paired with positive ones to catch a dead server. - Use Case: Before modifying lib/MCP/Run/Bash.pm or adding a new output filter, load this skill to learn that allowed_commands is not a sandbox, that working_directory uses cd with single-quote escaping, and that filter tests must pair positive and negative assertions. ## Quick Start Load the mcp-run-core skill before editing any file in the p5-mcp-run repository so the documented invariants and test conventions are applied.

Frequently Asked Questions about mcp-run-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely edit the mcp-run-bash MCP server code?

Load the documented invariants first: timeout must exit with code 124, MCP::Run::Compress must stay compile-time loaded, and subclasses overriding format_result must pass the command through so command-specific filters match. The skill lists each invariant with its rationale.

What does the mcp-run compression pipeline do?

It runs an 11-stage filter pipeline from filter_stderr through on_empty that compresses shell command output using 30+ command-specific filters for tools like git, make, kubectl, and cargo. The collapse_cr stage unconditionally reduces carriage-return progress bars that line-based filters cannot shorten.

Is allowed_commands a security sandbox in mcp-run-bash?

No, allowed_commands only checks the first word of the raw command, so bash -c with an arbitrary payload still runs if bash is whitelisted. Real sandboxing is explicitly out of scope and should not be patched into this check.

Why do MCP tests fail with Missing protocol version?

MCP >= 0.15 requires params._meta with protocolVersion and clientCapabilities on every request, checked before dispatch. Tests building a bare MCP::Server::Context bypass the legacy transport and hit this validation, so always pull the revision from MCP::Constants.

Why do compression tests pass when the server is broken?

Negative assertions like unlike on expected output pass vacuously against empty results from a crashed server. Pair every negative assertion with a positive one and an MCP_RUN_COMPRESS=0 run that must retain the raw output.