Mcp Distill
Description
Field projection layer for MCP tools — let AI agents request only the fields they need, reducing context window usage by up to 95%
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
mcp-distill
[](https://opensource.org/licenses/MIT) [](https://www.python.org/downloads/)
Field projection layer for MCP tools. Reduce LLM context window usage by letting agents request only the fields they need.
The Problem
MCP tools often return large JSON responses. When an agent only needs a few fields, the full response wastes precious context window tokens.
Without mcp-distill (1,157 tokens):
{"id": "123", "name": "Item", "description": "...(2000 chars)...", "metadata": {...}, "content": "...(10000 chars)..."}
With mcp-distill (23 tokens):
{"id": "123", "name": "Item"}
Installation
pip install git+https://github.com/shoegazerstella/mcp-distill.git
Or with uv:
uv add git+https://github.com/shoegazerstella/mcp-distill.git
Quick Start
from fastmcp import FastMCP
from mcp_distill import projectable
mcp = FastMCP("my-server")
@mcp.tool
@projectable(fields=["id", "name", "metadata.created_by"])
def get_resource(resource_id: str) -> dict:
"""Fetch a resource by ID."""
return {
"id": resource_id,
"name": "Example Resource",
"description": "A" * 2000, # Large field - not advertised
"metadata": {
"created_by": "admin",
"huge_audit_log": [...], # Large field - not advertised
},
"content": "B" * 10000, # Large field - not advertised
}
How It Works
1. You advertise available fields
The `fields` parameter in `@projectable()` tells the agent what fields it can request:
@projectable(fields=["id", "name", "metadata.created_by"])
2. The agent sees them in the tool description
Tool: get_resource
Description: Fetch a resource by ID.
Projectable fields: id, name, metadata.created_by
Parameters:
- resource_id: string (required)
- _fields: ar
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI