mcp-crush
Integrates with Ollama by using OLLAMA_HOST, probing the model context window, and tuning truncation/schema packing to keep MCP tool catalogs and responses within smaller context budgets.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-crush
One line: npx mcp-crush wrap -- <your-mcp-cmd> (or bunx mcp-crush wrap -- <your-mcp-cmd>): stdio proxy that shrinks MCP tool catalogs and prunes oversized JSON responses by 60-85%.
Why
Large MCP servers (GitHub, Cloudflare, Notion) dump thousands of tokens into tools/list before your agent does any work. Local 8k models cannot fit them, and cloud APIs bill you for that handshake on every session.
mcp-crush sits in the middle using the same JSON-RPC wire protocol while emitting smaller payloads.
Related MCP server: mcp-security-suite
Install
bunx mcp-crush audit
npx mcp-crush audit
# or install in your project / globally
bun add -d mcp-crush
npm i -D mcp-crushJSR:
bunx jsr add @kanchingyg/mcp-crush
npx jsr add @kanchingyg/mcp-crushQuick start
# Inspect token overhead from your MCP config
npx mcp-crush audit
bunx mcp-crush audit
# Wrap any stdio MCP server
npx mcp-crush wrap -- npx -y @modelcontextprotocol/server-github
# Ollama-friendly schema pack (~600 token budget)
npx mcp-crush wrap --ollama-pack -- npx -y @modelcontextprotocol/server-github
# Expose audit/compress/prune as MCP tools
npx mcp-crush --mcpOllama / LM Studio
Set OLLAMA_HOST (default http://127.0.0.1:11434). With --mcp, mcp-crush probes n_ctx and tunes truncation automatically. Use --ollama-pack on wrap to cap tools/list schemas around 600 tokens.
MCP Tools Reference
Tool | Mutates | Description |
|
| Parse an MCP configuration file and measure per-server |
|
| Minify an MCP |
|
| Strip redundant UI metadata ( |
|
| Persist a compressed MCP tool profile to disk (requires |
Editor and Agent Integration
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"mcp-crush": {
"command": "npx",
"args": ["-y", "mcp-crush", "--mcp"]
}
}
}Claude Code CLI
claude mcp add mcp-crush -- npx -y mcp-crush --mcpProgrammatic Usage (JSR / TypeScript)
import * as bridge from "jsr:@kanchingyg/mcp-crush/bridge";Runtime Safety and Guardrails
Stdio frame isolation:
--mcpredirects strayconsole.logtostderrso JSON-RPC onstdoutstays valid.Read-only default: Mutating tools need
--allow-write;--dry-runblocks writes.Loop breaker: Identical tool calls halt after three repeats (SHA-256 of name + args).
Context budget:
wrap/ MCP proben_ctxand head/tail-truncate large tool output.Config path sandbox:
audit_mcp_configresolvesconfigPathunder the process cwd.Secret redaction: AWS keys, bearer tokens, and
sk-*patterns scrubbed from tool text.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Capability-routed CLI/MCP: signed provenance exports, WCAG-validated themes, sovereign deploy modes.
Security & DLP proxy for MCP: tool-poisoning scans, PII redaction on tool args/results. Beta.
Remote MCP for MCP tool deprecation receipt, structured receipts, audit logs, and reviewer-ready evi
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceReduces MCP tool schema token overhead by lazy-loading and caching schemas, with response compression and verifiable savings metrics.69 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables enterprise MCP security auditing through 12 deterministic no-LLM tools for evidence-gated claims, skill/prompt supply-chain audits, token profiling, and server auth-mode checks.MIT
- AlicenseNot gradedqualityCmaintenanceEnables auditing MCP server configurations and tool descriptions from inside an AI assistant, surfacing poisoned tools, leaked secrets, risky launch commands, over-broad access, hidden Unicode, and silent tool changes with redacted evidence and concrete fixes.143 npmMIT
- AlicenseNot gradedqualityBmaintenanceThis MCP server profiles a host read-only and returns an evidence-graded checklist of AI-model optimization options, each with an estimated improvement, resource footprint and confidence tier, plus tools to validate the option registry. It enables agents to inspect OS, CPU, memory, GPU and detected tooling and resolve a conflict-free, role-aware plan of those options before anything is ever changed.2,405 npmMIT