You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mcp-slim: Zero-dependency MCP stdio proxy for LibreChat mcpServers (-50% to -98% schema tokens, tool filtering & SecretGuard)
#18076
If you configure stdio MCP servers under mcpServers in librechat.yaml, connecting 2 or 3 large servers (like GitHub, Playwright, Notion, or Postgres) can inject 20,000 to 45,000+ schema tokens into every conversation turn, and many users also need glob-based tool filtering (--allow-tools / --deny-tools) and real-time credential redaction.
We built mcp-slim, a zero-dependency Python MCP stdio proxy and CLI profiler that wraps any command in librechat.yaml:
What it adds to LibreChat mcpServers
50% to 98.7% Schema & Output Compaction: Strips verbose markdown from tools/list, converts homogeneous JSON arrays in tools/call outputs into tabular TOON format (--toon), and supports on-demand BM25 tool search (--dynamic-toolsets).
Call-Level Tool Filtering (--allow-tools, --deny-tools): Filters tools/list by glob pattern (e.g. --allow-tools "get_*,list_*" --deny-tools "*delete*") and enforces the policy on tools/call so models cannot invoke hidden tools.
Local & Open-Weight Model Schema Fixes (--flatten-schemas, --coerce-args): Inlines recursive $ref/$defs pointers and coerces stringified integers/booleans.
Bidirectional SecretGuard (--redact-secrets): Redacts leaked API keys (ghp_*, sk-*, AKIA*, JWTs, PEM keys, and https://user:pass@host URLs) across both tool inputs and outputs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi LibreChat community,
If you configure stdio MCP servers under
mcpServersinlibrechat.yaml, connecting 2 or 3 large servers (like GitHub, Playwright, Notion, or Postgres) can inject 20,000 to 45,000+ schema tokens into every conversation turn, and many users also need glob-based tool filtering (--allow-tools/--deny-tools) and real-time credential redaction.We built mcp-slim, a zero-dependency Python MCP stdio proxy and CLI profiler that wraps any command in
librechat.yaml:What it adds to LibreChat
mcpServerstools/list, converts homogeneous JSON arrays intools/calloutputs into tabular TOON format (--toon), and supports on-demand BM25 tool search (--dynamic-toolsets).--allow-tools,--deny-tools): Filterstools/listby glob pattern (e.g.--allow-tools "get_*,list_*" --deny-tools "*delete*") and enforces the policy ontools/callso models cannot invoke hidden tools.--flatten-schemas,--coerce-args): Inlines recursive$ref/$defspointers and coerces stringified integers/booleans.SecretGuard(--redact-secrets): Redacts leaked API keys (ghp_*,sk-*,AKIA*, JWTs, PEM keys, andhttps://user:pass@hostURLs) across both tool inputs and outputs.Drop-in
librechat.yamlsnippetRepository and benchmarks: https://github.com/SalyyS1/mcp-slim
All reactions