FramY2

MCP Diet — Development skill for Claude Code

Development community

Zero-dependency stdio MCP proxy & runtime context firewall: deterministic tools/list tree-shaking, oversized tools/call crash guard, and live secret redaction for Claude Code, OpenAI Codex, and Cursor.

How to install MCP Diet

This entry records only its repository, not the path inside it, so there is no exact command to give. Open FramY2/mcp-diet and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What MCP Diet does

Zero-dependency stdio MCP proxy & runtime context firewall: deterministic tools/list tree-shaking, oversized tools/call crash guard, and live secret redaction for Claude Code, OpenAI Codex, and Cursor.

Alternatives in Development

  • Om Tidy — Self-maintenance pass — acts on every hygiene flag: archives completed work, groups loose clusters, splits ove 4.6k ★
  • MCP Proxy — A bridge between Streamable HTTP and stdio MCP transports 2.4k ★
  • Obsidian MCP Server — Read, write, search, and surgically edit Obsidian vault notes, tags, and frontmatter via MCP 686 ★

README

mcp-diet (`@framy2/mcp-diet`)

GitHub Stars CI Zero Dependencies License: MIT

**Zero-dependency stdio MCP proxy & runtime context firewall** for **Claude Code**, **OpenAI Codex CLI**, and **Cursor**.

Wrap any stdio MCP server in `.mcp.json`, `~/.claude.json`, or `.codex/config.toml` to tree-shake bloated `tools/list` schemas, prevent oversized `tools/call` stdio crashes (`anthropics/claude-code#105703`), and redact leaked secrets before they enter the model's context window.

Companion runtime proxy to **[`FramY2/ctxwise`](https://github.com/FramY2/ctxwise)** (`@framy2/ctxwise`).


⚡ Why `mcp-diet`?

  1. Deterministic tools/list Tree-Shaking (--allow, --deny, --read-only, --max-desc):
    • Filters tools/list responses before the agent sees them and deterministically sorts tools by name so prompt prefix caching never invalidates.
    • --read-only keeps only tools with annotations.readOnlyHint === true or safe read-only names (get_*, list_*, read_*, search_*).
    • --max-desc compacts verbose tool and parameter descriptions without mutating JSON schema types.
  2. Oversized tools/call Crash & Context-Blowout Guard (--max-result-kb 512):
    • Prevents Claude Code's >= 8 MiB stdio buffer disconnect crash (anthropics/claude-code#105703) and 100k-token single-turn blowouts by spilling oversized tools/call outputs to a local file and returning a structured preview + file path.
  3. **Live tools/call Secret Redac