Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SchemaSlim

Universal MCP Virtualization & Local Hybrid Search Reverse-Proxy

Live Demo Tests License: MIT Python

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.

Live Documentation & Client Matrix ↗


Key Highlights

  • 85%+ Prompt Footprint Reduction: Shrinks multi-server tool schemas down to 2 meta-tools (schemaslim_search and schemaslim_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.

Quick Install

Run via uvx (zero installation footprint):

# Automated discovery and configuration wrapping
uvx schemaslim wrap

# Start virtualizing stdio reverse-proxy
uvx schemaslim serve

Or install persistently:

uv tool install schemaslim

Supported Ecosystems

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.


Architecture Flow

[ 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)  │
      └───────────────────────────────┘

CLI Reference

  • schemaslim wrap: Scan client configs, generate atomic backups, index tools, and inject proxy.
  • schemaslim serve: Run runtime stdio reverse-proxy (--tui for live stderr telemetry, --allow-cwd for dev overrides).
  • schemaslim index: Recompute offline FastEmbed ONNX vectors and FTS5 indices (--force to rebuild).
  • schemaslim stats: Terminal report of prompt tokens preserved, active servers, and latency breakdown.
  • schemaslim unwrap: Lossless rollback to original client configurations.

Testing & Quality Assurance

SchemaSlim maintains a 100% passing test suite across migration atomicity, stream safety, secret stripping, and vector search:

uv run pytest
# 104 passed in ~4.3s

Interactive test reports and coverage breakdowns can be viewed live in the Web Dashboard.


License

Distributed under the MIT License. Offline & Zero API Keys.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages