Repository navigation
Local models can drive REA over MCP when they see about 10 tools #3098
Replies: 3 comments 1 reply
|
Could you please document how you set this up? |
|
i faced 224k tokens eaten up just by REA tools so i created a proxy rea-mcp-lite which offers all capabilities of it but for maximum 8k tokens check it out here: https://github.com/shivanshtalwar0/REA-mcp-lite |
|
TL;DR: I ran the same test again on 8 Nov with a new setup: Pi as the client and a 35B MoE model. My 12 GB card was held back to act like an 8 GB one. Pi hides REA's tools by itself, so the stock 6.8.0 release just worked, and it found the string 4 times out of 5. What changed since the first run
How Pi hides the toolsPi's Results
The good runs took the same path as on 13 Oct: open the file, find the function, decompile it, answer. No run went past 8K tokens of context. Run 1 was slow because its first prompt read at 8 tokens per second, against 150 or more on the other large prompts. The timing lines up with another model loading onto the same GPU, so keep the GPU free while REA works. Not run
Model and server
Pi config (models.json and mcp.json)Both files go in
{"providers": {"local": {
"baseUrl": "http://127.0.0.1:8080/v1",
"api": "openai-completions",
"apiKey": "local",
"models": [{"id": "qwen3.6-35b", "contextWindow": 32768, "maxTokens": 4096}]
}}}
{"mcpServers": {"rea": {
"command": "rea", "args": ["mcp"], "timeout": 450,
"exposure": "hidden",
"toolExposure": {
"open_binary": "direct", "close_binary": "direct",
"binary_session": "direct", "list_procedures": "direct",
"search_procedures": "direct", "procedure_pseudo_code": "direct",
"list_strings": "direct", "search_strings": "direct",
"xrefs": "direct", "procedure_references": "direct"
}
}}}
Commands and targetThe server, in router mode with the model file in Each run: The prompt, the same in every run: The target is the same Two snags: Pi's built-in llama.cpp provider listed no models in print mode, so I used the Test setup
🤖 Written and tested with Claude Code (Opus 5.5), posted with my OK 🦊 |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TL;DR: A local model can drive REA over MCP if it only sees about 10 of REA's tools. I got the right answer 3 of 3 times with a 27B model in OpenCode, and 4 of 5 with a 35B MoE model in Pi. The full tool list is far too big for a 32K window, so for now the client has to hide the rest.
Edit (2026-11-08): rewritten for the REA 6.8.0 release, with a second run added. The 13 Oct results are unchanged.
The problem
Before it does anything, a model reads every tool's name, description and input schema. REA 6.8.0 offers 229 tools, and compact schemas are the default.
A 32K window can't take the full list in either form. Even about 60 tools was too much on my card. On 13 Oct, 62 tools made a 28,628-token prompt. Reading it took 12.7 minutes, then a GPU reset killed the run, for a reason I don't know.
What worked
Hide every REA tool in the client, then show these ten:
open_binary,close_binary,binary_session,list_procedures,search_procedures,procedure_pseudo_code,list_strings,search_strings,xrefs,procedure_referencesTwo clients can do that today:
toolsmap, set"rea_*": false, then set the ten totrue."exposure": "hidden", then set the ten to"direct".The full configs are in the setup reply.
Results
The target is a tiny C program. Its
check_tokenfunction compares the input to a hidden string. The model had to find the string and say what the function does.session,directMost good runs made the same three calls: open the file, find the function, decompile it. On 8 Nov one run stopped before calling any tool, and one called
check_token"imported", which it is not. The 8 Nov details are in this comment.Coming in REA
Main has two opt-in ways to cut the list on REA's side. Neither is in a release yet.
REA_MCP_TOOL_FAMILIES(feat(mcp): scope advertised tools by family #7228, built on feat(mcp): scope advertised tools by family through REA_MCP_TOOL_FAMILIES #3026). REA offers only the groups you pick.REA_MCP_TOOL_CATALOG_PROFILE=hot-cold(perf(mcp): add opt-in hot/cold tool discovery #9046). REA starts with a few tools and loads others on request. The client must support tool-list refresh.Not run
Thanks, 0xLLVEL, for the tool families PR I tested.
How I counted
llama-tokenizeand the Qwen3.8-27B vocabulary.Test setup
ISTA-DASLab/Qwen3.8-27B-GSQ-RCO-GGUFIQ3_XXS (13 Oct),empero-ai/Qwen3.8-35B-A3B-Distill-GGUFIQ4_XS (8 Nov)🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊
All reactions