facadec

Facade Compiler for MCP

facadec

Agents drown in tool schemas. facadec compiles a fat MCP catalog into three tools: search_tools, describe_tool, call_tool.

    11.0×

    token surface · 42 tools → 3 · 2174 → 198

    Continuous terminal run: verify + compile facade.

    Raw surface

    42 tools · 2174 tok

      Compiled IR

      3 tools · 198 tok

        // underlying

          Why

          MCP makes tool wiring easy. It also makes tool surfaces fat. Forty schemas look fine in a demo and expensive in a real agent loop: more tokens, more sibling confusion, worse selection. facadec treats that as a compiler problem—shrink the interface the model sees, keep the upstream tools reachable.

          Pipeline

          collect → select → rewrite → consolidate → facade → serve

          Selection ranks by domain and action. Rewrite cuts ambiguity. Consolidation groups near duplicates. The facade is always the same three meta-tools, served over MCP stdio for Cursor and other hosts.

          Verify in Cursor

          Wire facadec into ~/.cursor/mcp.json, then run npm run verify:cursor. Host surface stays three tools: search_tools, describe_tool, call_tool.

          tools/list: call_tool, describe_tool, search_tools
          search_tools: hit filesystem.read_file
          describe_tool: schema ok
          call_tool: mock dispatch ok
          Cursor-equivalent MCP handshake: PASS

          Get it

          npm install
          npm run benchmark
          npm run verify:cursor

          Source · Wire into Cursor · CI