Mcp Slim Guard

io.github.lennneyPublished by GitHub account lennneyv0.1.1-alpha.1Updated Oct 24, 2026

76% fewer MCP tokens in our standard benchmark. Same upstream call. Exact recovery.

VerifiedSTDIODesktop onlyDeveloper ToolsSecurity & Monitoring

Overview

AI-generated overview

A local MCP proxy that exposes authorized upstream tools through a slim catalog, validates calls before forwarding, and lets oversized results be recovered in a

What you can do
Expose authorized upstream MCP tools to a host in Native, Compact or Extreme mode, with allow/deny patterns applied in every mode. Discover tools by name in Compact and Extreme mode, returning full original schemas for up to three matches. Validate tool calls against the original schema before the upstream server is contacted, returning a structured error when arguments do not match. Recover large results exactly through a result reference, either by querying bounded local fragments or by following a cursor, without invoking the upstream tool again. Inspect and apply host-specific installation plans for Codex and Claude Code, and verify the configured runtime.
When to use it
Useful when an assistant connects to many upstream MCP tools and the tool catalog or large results consume too much context. It fits setups that want a single controlled entry point with allow/deny rules, schema validation and audit logging in front of privileged upstream tools.
Requirements
Runs as a local Node.js process installed from the npm package; the README notes the current version is an alpha source candidate not yet published to npm, so it is built from a reviewed checkout. Needs a project configuration file created by the init command listing upstream servers, plus host configuration for Codex or Claude Code.
Before you install
It is an alpha; review authorization patterns and upstream settings before using it with privileged tools. The configuration can allow or deny tool patterns, block private IPs and domains, rate-limit calls and write an audit log, so misconfiguration affects what the assistant can reach. Upstream tools it forwards can still perform their own writes or deletions.

Installation

In SourceWeft

  1. Open Mcp Slim Guard in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

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

ModeWhat the host seesBest fit
NativeAuthorized original tool names and full schemas, plus read_resultHosts that work well with a normal MCP catalog, including Codex
Compactfind_tool, call_tool, and read_result; discovery returns each match's full original schemaA small, predictable host surface
ExtremeThe Compact tool surface and schemas; only sufficiently large results receive a shorter recoverable first deliveryContext-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:

bash
npm cinpm run buildnpm linkcd /path/to/project-with-mcp-configmcp-slim-guard initmcp-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.

bash
# Inspect a host-specific plan without changing host files.mcp-slim-guard plan --host codexmcp-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:

toml
[mcp_servers.slim_guard]command = "mcp-slim-guard"args = ["start", "--mode", "native"]cwd = "/absolute/path/to/project"

For Claude Code, use Compact by default:

json
{  "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

yaml
version: 2tools:  allow:    - "upstream_*"  deny:    - "*_delete_*"ssrf:  mode: block  block_private_ips: true  allow_domains: []  block_domains: []rate_limit:  default: "60/min"injection_detection:  enabled: true  sensitivity: medium  mode: blockaudit:  output: file  filePath: mcp-slim-guard-audit.logservers:  upstream:    command: npx    args: ["-y", "@your/mcp-server"]

Version 1 configuration is intentionally unsupported. The removed compressor section is rejected rather than migrated automatically.

Repair an invalid call

If arguments do not match an authorized tool's original schema, Slim Guard returns a normal MCP tool error with structuredContent that identifies the schema failure and confirms that the upstream tool was not invoked. Correct the arguments and retry; submitted argument values are not echoed in that error.

Result recovery

When a response needs recoverable delivery, the first response includes a result_ref. Use read_result with query to locate up to three bounded local fragments, or omit query and follow next_cursor to recover the exact snapshot. Both paths use the same immutable capture and never invoke the upstream tool again. Do not combine query with cursor. Native and Compact use the standard delivery boundary. Extreme uses a smaller boundary only when the initial delivered response is at least half the size of the exact response; otherwise it passes the exact response through unchanged.

Evidence and checks

The repository includes a 24-task mode comparison, result-recovery fixtures, and a 100-tool / 8,000-row stress fixture. Run the current artifacts with:

bash
npm run buildnpm run bench:tasknpm run bench:compressionnpm run bench:stressnpm run bench:compression:verify

Their reports are mode-specific and are generated locally; do not treat older alpha benchmark figures as claims for this product line.

Development

bash
npm run buildnpm run typechecknpm run lintnpm testnpm run verify:package-boundarynpm run smoke:package

This project is an alpha. Review authorization patterns and upstream settings before using it with privileged tools.

Source: README.md at commit a5596a0

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.1-alpha.1LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts