Skip to main content

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 Weighted Linear Hybrid Scoring ($0.70 \times \text{dense} + 0.30 \times \text{sparse}$). 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 Persistent Session 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.

Metadata

Release files for schemaslim 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for schemaslim 0.2.0
File Size Uploaded Provenance Actions
schemaslim-0.2.0.tar.gz 178.2 kB Without provenance Details for schemaslim-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for schemaslim 0.2.0
File Interpreter ABI Platform Actions
schemaslim-0.2.0-py3-none-any.whl Python 3 none any Details for schemaslim-0.2.0-py3-none-any.whl

Total release size: 232.5 kB

Release files / schemaslim-0.2.0.tar.gz

Download URL schemaslim-0.2.0.tar.gz
Size 178.2 kB
Tags Source
SHA-256 checksum
How to use checksums
039e347ed28953b403ae41be04b5a75e20529b97aa72d3604c319e0c44edc7ad
BLAKE2b-256 checksum
How to use checksums
48809106f5144d13a31c82077b599c9852a20bd349fadc554d403972f543a3ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / schemaslim-0.2.0-py3-none-any.whl

Download URL schemaslim-0.2.0-py3-none-any.whl
Size 54.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d116e57187c2ce41243954841ea672d396c85b8bd24df4121d8b7152b8af0ccd
BLAKE2b-256 checksum
How to use checksums
3c8da1570f7112e4411556b067a419b3e12a20d5cae1b0818717206d5d73fd85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for schemaslim 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page