I gave my local AI agent private, real-time web search using SearXNG + MCP
I've been experimenting with local AI tooling on Arch Linux and got a setup working that I'm really happy with.
Here's what it does:
- Runs SearXNG locally in Docker.
- Starts automatically on boot.
- Connects my terminal AI agent (OpenCode) to SearXNG using MCP (Model Context Protocol).
The result is that my AI can perform live web searches whenever it needs current information instead of relying only on its training data.
Some things I like about this setup:
- Private web searches
- No ads or trackers
- Access to recent documentation and news
- Everything runs locally
- No subscription required
The way I think about it is:
- SearXNG = the search engine
- MCP = the bridge that lets the AI use the search engine
- OpenCode = the AI that decides when to search
It feels like giving a local AI controlled access to the web while keeping the search infrastructure under my own control.
For anyone running local AI tools, are you using SearXNG as well, or did you go with another search solution? I'd be interested in hearing what has worked best for you.