# mcp-slim-guard

mcp-slim-guard narrows access to approved MCP tools, checks calls before dispatch, and restores large results without invoking the upstream tool again.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 182
- Author: lennney
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/lennney/mcp-slim-guard
- Updated: 2026-08-14
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-slim-guard

## What it does

mcp-slim-guard gives an MCP host a controlled route to approved upstream tools. It retains their original argument schemas, applies allow and deny rules, and validates each call before the upstream server is contacted. In Compact and Extreme, discovery returns up to three authorized matches with their required fields, enums, and nested schema.

Compact exposes `find_tool`, `call_tool`, and `read_result`, and is the default for Claude Code. Native keeps the regular authorized catalog, while Extreme shortens the first delivery only when the response is large enough for that boundary. A captured result can be read through bounded fragments or an exact snapshot, with no second upstream call.

A reviewed checkout needs `npm ci`, `npm run build`, and `npm link`; initialization then creates `mcp-slim-guard.yml` with version `2`. Version `1` configuration is rejected. The project is alpha, so authorization rules and upstream settings need review before privileged tools are connected.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-slim-guard -- npx -y mcp-slim-guard
```

### Codex

**Platform CLI**
```bash
codex mcp add mcp-slim-guard -- npx -y mcp-slim-guard
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-slim-guard": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-slim-guard"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-slim-guard": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "mcp-slim-guard"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-slim-guard npx -y mcp-slim-guard
```

## When to use it
- restrict MCP tools with allow and deny rules
- validate arguments before an upstream call
- reduce the first delivery of a large result
- recover an exact snapshot without rerunning the tool
- search only the authorized tool catalog

## Example prompts
- Use `find_tool` to locate an approved task-management tool and inspect its schema.
- Call the selected upstream tool through `call_tool`, using arguments that match its original schema.
- Use `read_result` with the returned `result_ref` and `next_cursor` to recover a large response.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
