Universal MCP Virtualization & Local Hybrid Search Reverse-Proxy
Connecting dozens of MCP servers wastes 10,000–30,000 prompt tokens on static schemas before turn one.
SchemaSlim virtualizes tool discovery into on-demand retrieval, presenting exactly 2 dynamic meta-tools and resolving tools in <60ms via offline hybrid vector retrieval.
- 85%+ Prompt Footprint Reduction: Shrinks multi-server tool schemas down to 2 meta-tools (
schemaslim_searchandschemaslim_call). - Sub-60ms JIT Retrieval: 100% local FastEmbed (
BGE-small-en-v1.5) + SQLite-vec cosine search + SQLite FTS5 BM25 with Reciprocal Rank Fusion. Zero external API calls. - Process & Secret Isolation (CWE-200 Safe): Strips ambient host environment variables (
OPENAI_API_KEY, AWS tokens) before spawning child MCP processes. - Path Traversal Defense (CWE-426 Safe): Explicitly isolates execution directory and guards against local CWD hijacking.
- Zero-Config Ecosystem Discovery: One-command scanning, backup (
.schemaslim.bak), and virtualization across Claude Desktop, Cursor, Antigravity, VS Code, Windsurf, Codex, and custom CLI harnesses.
Run via uvx (zero installation footprint):
# Automated discovery and configuration wrapping
uvx schemaslim wrap
# Start virtualizing stdio reverse-proxy
uvx schemaslim serveOr install persistently:
uv tool install schemaslim| Client / Environment | Config Target | Integration Command |
|---|---|---|
| Claude Desktop | claude_desktop_config.json |
uvx schemaslim wrap |
| Cursor IDE | .cursor/mcp.json |
uvx schemaslim wrap |
| Google Antigravity | ~/.gemini/antigravity-ide/mcp_config.json |
uvx schemaslim wrap |
| VS Code (Cline / Roo) | cline_mcp_settings.json |
uvx schemaslim wrap --target <path> |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
uvx schemaslim wrap |
| Codex CLI / Runner | Stdio MCP Harness | schemaslim serve --tui |
| Other CLI / Custom | DeepSeek / Qwen / Kimi / LangChain | Custom subprocess bridge |
Full setup instructions and copyable snippets are available in the Documentation Hub.
[ LLM Client: Claude / Cursor / Antigravity / CLI ]
│
▼ (stdio JSON-RPC)
┌───────────────────────────────┐
│ SchemaSlim Virtualizer │
│ (Exposes 2 dynamic schemas) │
└──────────────┬────────────────┘
│
Hybrid JIT Resolution (<60ms)
▼
┌───────────────────────────────┐
│ Local SQLite-vec 384d Embed │
│ + SQLite FTS5 BM25 Lookup │
└──────────────┬────────────────┘
│
Isolated Ephemeral Dispatch
▼
┌───────────────────────────────┐
│ Isolated MCP Child Processes │
│ (CWE-200 Secret Stripping) │
└───────────────────────────────┘
schemaslim wrap: Scan client configs, generate atomic backups, index tools, and inject proxy.schemaslim serve: Run runtime stdio reverse-proxy (--tuifor live stderr telemetry,--allow-cwdfor dev overrides).schemaslim index: Recompute offline FastEmbed ONNX vectors and FTS5 indices (--forceto rebuild).schemaslim stats: Terminal report of prompt tokens preserved, active servers, and latency breakdown.schemaslim unwrap: Lossless rollback to original client configurations.
SchemaSlim maintains a 100% passing test suite across migration atomicity, stream safety, secret stripping, and vector search:
uv run pytest
# 104 passed in ~4.3sInteractive test reports and coverage breakdowns can be viewed live in the Web Dashboard.
Distributed under the MIT License. Offline & Zero API Keys.