mcp-slim
README.md
# MCP Slim (Rust)
**Blazing-fast, single-binary Rust CLI to audit MCP server token bloat, startup latency, and plaintext API key leaks across Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Antigravity & Gemini CLI.**
> Every MCP server you attach injects thousands of JSON tool-schema tokens into **every single turn** — before you even type your prompt. Attach 5–6 servers and you quietly burn **30,000–60,000+ input tokens per turn** while degrading model tool-selection accuracy.
---
## Why Rust?
- **< 2ms cold start & ~2MB RAM** — zero Python/Node runtime required
- **Single native binary** for Windows, macOS (Apple Silicon & Intel), and Linux
- **100% local & offline-safe** — never uploads your configs or API keys anywhere
---
## Quick Start
### Option 1: Install from Source (Cargo)
```bash
cargo install --path .
```
### Option 2: Download Pre-built Binary
Download the latest binary for your OS from **GitHub Releases**, then run:
```bash
# 1. Fast config & plaintext secret audit across all discovered AI IDEs
mcp-slim audit
# 2. Live-probe stdio MCP servers for exact per-tool token bloat & startup latency
mcp-slim audit --probe
# 3. Audit a specific config and output JSON
mcp-slim audit --config .mcp.json --probe --json
```
---
## What It Detects
1. **Auto-Discovery across 11 IDE config locations** — Claude Code (`.claude.json`, `.mcp.json`), Claude Desktop (Win/Mac/Linux), Cursor (global & project), Windsurf, VS Code (`.vscode/mcp.json`), Antigravity, and Gemini CLI.
2. **Exact Token Bloat & Monthly Cost Estimate** — Performs real JSON-RPC `initialize` + `tools/list` handshakes against stdio MCP servers and ranks the heaviest tools.
3. **Plaintext Secret Scanner** — Flags hardcoded OpenAI/Anthropic (`sk-...`), GitHub (`ghp_`, `github_pat_`), AWS (`AKIA...`), Slack (`xox...`), JWTs, and raw env tokens while cleanly ignoring `${ENV_VAR}` placeholders.
---
## Need to Actually Cut MCP Token Bloat by 60–85%?
**MCP Slim** (MIT Open Source) audits and exposes the problem.
**[MCP Slim Pro ($15 one-time, Rust single binary)](https://ontech.bytesell.app/products/mcp-slim-pro)** fixes it permanently:
- **`mcp-slim-pro proxy`** — Drop-in `<2ms` Rust stdio tool-filter proxy (`--allow`, `--deny`, `--allow-regex`, `--max-desc`) with strict `tools/call` blocking (**proven >80% token reduction** on bloated servers)
- **`mcp-slim-pro sync`** — 1-command cross-IDE profile switcher (`minimal`, `webdev`, `python-data`, `devops`, `research`) across Claude Code, Cursor, and VS Code with `${ENV_VAR}` vault + automatic timestamped backups & rollback
- **`mcp-slim-pro ui`** — Built-in local dark-mode Web Dashboard (`http://127.0.0.1:4789`) with interactive tool checkboxes & 1-click proxy JSON export
- **`mcp-slim-pro guard`** — Native Git pre-commit hook blocking plaintext MCP secret leaks
Instant ZIP download (pre-built binary + full Rust Cargo source + lifetime updates, 0% crypto fee):
👉 **https://ontech.bytesell.app/products/mcp-slim-pro**
---
## License
MIT — see [LICENSE](LICENSE).
## MCP Server Mode (`mcp-slim serve`) & Docker
Run `mcp-slim` directly as a standard stdio MCP server exposing 3 tools (`audit_mcp_config`, `discover_mcp_configs`, `estimate_schema_tokens`):
```bash
mcp-slim serve
```
Or via Docker:
```bash
docker build -t mcp-slim .
docker run -i --rm mcp-slim
```
## Glama MCP Server Listing
[](https://glama.ai/mcp/servers/OnTechnologyCo/mcp-slim)
Browse tools, check quality score, and inspect this server online via [Glama MCP Server Directory](https://glama.ai/mcp/servers/OnTechnologyCo/mcp-slim) and [MCP Inspector](https://glama.ai/mcp/inspector).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues