
facadec
io.github.L00PLeGeNd/facadec
Compile fat MCP tool catalogs into search_tools, describe_tool, and call_tool.
Documentation
facadec
Facade Compiler for MCP
Turn a fat MCP tool catalog into three host-facing tools:
search_tools · describe_tool · call_tool
Live playground · npm · Tester feedback · Security

Official upstreams: filesystem + memory + everything → host still sees 3 tools
Why it exists
MCP makes wiring servers easy. It also dumps every tool schema into the prompt.
| Pain | What happens |
|---|---|
| Token bloat | Dozens of schemas before the task starts |
| Sibling confusion | search_issues vs search_code vs search_docs |
| Fragile selection | Demos pass; real catalogs miss |
facadec treats that as a compiler + runtime problem: shrink what the model sees, keep upstream tools reachable, measure the cost.
Install
npm i -g facadec
facadec --help
From source:
git clone https://github.com/L00PLeGeNd/facadec.git
cd facadec
npm install
npm run build
npm run quickstart
Local playground (this web page)
npm install
npm run web:dev
Opens http://127.0.0.1:5173/.
Production-style preview: npm run web:build && npm run web:preview.
60-second Cursor path
npm i -g facadec- Copy
examples/mcp.cursor.npm.json(ormcp.cursor.real.jsonfor official multi-server) - Fix the absolute config path
- Restart MCP → host lists exactly three tools
- Ask the agent to search, describe, then call
Handshake without the Cursor UI:
npm run verify:cursor
Measured compare
Synthetic 220 tools · 12 tasks · 3 runs · tokenizer gpt-tokenizer/cl100k_base
Full-path tokens = exposure + discovery + describe + call.
| Arm | Hit | Tokens (mean) | Exec success |
|---|---|---|---|
| Raw MCP | 100% | ~13 411 | 100% |
| Lazy loading | 100% | ~404 | 100% |
| facadec rules | 100% | ~649 | 100% |
| facadec hybrid | 100% | ~711 | 100% |
npm run benchmark:compare
Report: bench/results/comparison-latest.md
How it works
upstream MCP / mocks
│
▼
collect → catalog
│
▼
normalize → validate → analyze → select
→ rewrite → dedupe → consolidate → generate
│
▼
search_tools / describe_tool / call_tool
│
▼
Cursor / any MCP host
Default retrieval is hybrid (BM25 recall + rules/schema rerank). Runtime keeps per-search surfaces, schema validation, timeouts, and permission gates.
Examples
| Mode | Command |
|---|---|
| Offline mock | npm run serve |
| Live echo | npm run serve:live |
| Echo + notes | npm run serve:multi |
| Real official MCPs | npm run collect:real then npm run serve:real |
Real config wires @modelcontextprotocol/server-filesystem, server-memory, and server-everything behind one facade. Details: examples/README.md.
CLI
facadec collect --config <path> [--live]
facadec compile --config <path> --query <text> [--limit <n>] [--live]
facadec serve --config <path> [--demo <query>] [--jsonl] [--live]
facadec benchmark --config <path> --tasks <path>
facadec compare (--config … --tasks … | --synthetic [n]) [--runs <n>] [--out <path>]
facadec retrieve-eval [--tools <n>]
Not another router
Routers stop at retrieval. facadec also:
- rewrites and dedupes tools
- emits a stable three-tool facade
- validates calls and gates dangerous names
- publishes raw / lazy / facade cost compares
If you only have a handful of tiny tools, skip it. If the catalog is growing faster than the context window, this is the layer.
Looking for testers
Need 5–10 install → wire → real-task reports.
- Issue: Looking for 10 early testers
- Form:
FEEDBACK.md - Outreach copy:
OUTREACH.md
Status
0.2.0 — prove discovery, execution, and evaluation. Not an agent framework.
MIT · Changelog · Compatibility · Security
facadecnpm install facadec