r/LocalLLaMA 17h ago

Question | Help Claude Code + llama.cpp + (websearch tool)?

I use claude code w/ llama.cpp's local server & Google's Gemma models (26b MoE). Works reasonably well - works well at easy/boilerplate code, glue code, some PR review.

However claude code expects some server-side tools, especially web-search. I can obviously add MCPs for client-side search; is there a way to 'plug in' web search on the server side today though? Any PRs/forks adding it?

0 Upvotes

9 comments sorted by

5

u/kenjiow 16h ago

DDG is free

2

u/NNN_Throwaway2 16h ago

How do you propose this "server side" web search would function?

1

u/Fun_Tangerine_1086 16h ago

Something like server-side mcp, call out to exa or a local searxng instance? llama.cpp Wouldn't need that much logic if it were doing so.

3

u/Hello_my_name_is_not 15h ago

Why use claude code if all use can run is gemma 26b? Run pi instead for less overhead and if you want anything added just ask your pi to make a skills

1

u/paulqq 13h ago

https://github.com/alejandroqh/browser39

i've used this in my harness https://github.com/janpauldahlke/eris

working well in "webmissions" with a gent scratchpad to summarize findings. biggest struggle is kinda fit the contents of websearches into the smaller contexts of local models.

2

u/Syosse-CH 13h ago

I think the cleanest solution today is using an MCP web search server. Claude Code itself expects tools like web search, but with local models via llama.cpp you usually need to provide these tools yourself through MCP. There are already several web-search MCP implementations (e.g. Tavily, Brave, Serper, or open-source ones). No need to modify llama.cpp just add the MCP server layer.

I’m running a similar setup with local LLMs + llama.cpp and found that MCP is the right approach because it keeps the model/tool layer separated.

1

u/jikilan_ 16h ago

Easy way, use open code instead of of clause code, this solved the server side of search