Repository navigation
mcp-slim: Cut MCPTools schema & output tokens by 50%-98% and normalize schemas for Agno agents #11594
SalyyS1
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 everyone,
When building Agno agents with
MCPToolsacross OpenAI, Anthropic, and Gemini models, large MCP servers (like GitHub or Notion) can add 10,000+ prompt tokens on every turn and trigger schema validation errors on Gemini when schemas contain$defs/$ref,discriminator, or["type", "null"]arrays.We built mcp-slim, a zero-dependency Python 3.10+ stdio proxy that wraps any MCP server command (
mcp-slim run -- <server-cmd>):Highlights for Agno Agents
-50%tokens) & Cross-Provider Normalization: Inlines$defs/$ref, normalizes nullable["T", "null"]types, flattens rootanyOf/oneOf/allOf, and strips FastMCP voidoutputSchemabloat.--lazyBM25 Tool Discovery (-98.7%tokens): Exposes 60+ tools through 2 lightweight on-demand discovery meta-tools (168tokens total).SecretGuard: Fixes stringified numbers/booleans andsnake_case/camelCaseparameter typos ontools/call, and scrubs leaked credentials/tokens from tool outputs.Repository: https://github.com/SalyyS1/mcp-slim
If
mcp-slimhelps optimize your Agno MCP agents, a star on SalyyS1/mcp-slim is greatly appreciated!All reactions