The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
MCP Slim Guard
Context compression for MCP. Same upstream call, exact results recoverable.
Install
git clone https://github.com/lennney/mcp-slim-guardInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →MCP Slim Guard
MCP Slim Guard gives a host one deliberate way to reach authorized upstream tools. It keeps input schemas intact, validates calls before the upstream is invoked, and can recover an oversized result exactly without repeating that invocation.
Choose a mode
| Mode | What the host sees | Best fit |
|---|---|---|
| Native | Authorized original tool names and full schemas, plus read_result |
Hosts that work well with a normal MCP catalog, including Codex |
| Compact | find_tool, call_tool, and read_result; discovery returns each match's full original schema |
A small, predictable host surface |
| Extreme | The Compact tool surface and schemas; only sufficiently large results receive a shorter recoverable first delivery | Context-sensitive hosts where a smaller first result is valuable |
Compact is the default for start. Native is the default installation plan for
Codex. Compact is the default for Claude Code; Claude Code supports Compact and
Extreme installation plans, not Native.
All modes apply the same allow/deny authorization. Compact and Extreme return at most three discovery matches, each with the original required fields, enums, and nested schema. A call is validated against that original schema before the upstream server is contacted.
find_tool rejects unknown fields and queries longer than 256 Unicode code
points locally. It searches only the current authorized catalog and never falls
back to an unauthorized entry.
Quick start
0.1.1-alpha.2 is a source candidate and is not published to npm yet. From a
reviewed checkout of this candidate:
npm ci
npm run build
npm link
cd /path/to/project-with-mcp-config
mcp-slim-guard init
mcp-slim-guard validate
# Run the default Compact mode.
mcp-slim-guard start
init writes mcp-slim-guard.yml with version 2. The file contains upstream
and security settings only. Select a mode in the host command, not in YAML.
# Inspect a host-specific plan without changing host files.
mcp-slim-guard plan --host codex
mcp-slim-guard plan --host claude-code --mode extreme
# Verify the configured runtime without changing Host configuration or calling a business Tool.
mcp-slim-guard verify --host codex
# Apply a reviewed plan.
mcp-slim-guard install --host codex --mode native
Host entries
For Codex, use Native when you want the normal authorized MCP catalog:
[mcp_servers.slim_guard]
command = "mcp-slim-guard"
args = ["start", "--mode", "native"]
cwd = "/absolute/path/to/project"
For Claude Code, use Compact by default:
{
"mcpServers": {
"slim-guard": {
"command": "mcp-slim-guard",
"args": ["start", "--mode", "compact"],
"cwd": "/absolute/path/to/project"
}
}
}
See host setup for the full configuration and verification steps.
Configuration
Similar plugs
Reverse engineer anything with agents, from app behavior down to native binaries.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io