Connecting a Search MCP Server to Claude Desktop and Claude Code

The practical steps for wiring a search MCP server into Claude Desktop or Claude Code as a usable tool.

The general shape of the setup

Both Claude Desktop and Claude Code support MCP natively, and the setup pattern for either is similar: you register the MCP server (a command to run it locally, or a URL for a remote/hosted server) in a configuration file or via a CLI command, restart or reload the client, and the tools that server exposes become available to the model in that session.

Local, stdio-based servers

Many search MCP servers — especially community ones — run as a local process launched over stdio: you point the client at a command (often npx or a similar package runner plus the server's package name) and any required environment variables, most commonly an API key for whichever search backend the server wraps. Claude Desktop's configuration file lists these as named entries with a command and arguments; Claude Code exposes an equivalent via its own MCP server registration flow, whether through a config file or a dedicated command.

Remote / hosted servers

Some vendor-published search MCP servers run as a hosted remote endpoint instead of a local process, in which case configuration is simpler — a URL and an auth token — but you're trusting that vendor's infrastructure and uptime for every search call, on top of trusting the underlying search API itself.

After connecting

Once registered, the search tool shows up alongside any other tools the client has available, and the model decides when to call it based on the conversation — you generally don't need to invoke it manually. It's worth testing with a query you know the answer to, so you can confirm the tool is actually being called (rather than the model answering from memory) and that results look sane before relying on it for real tasks.

Security note

Any search tool you connect gives the model a live channel to fetch content from the open web into its context — see security and trust considerations for search MCP tools before connecting one to an agent that can also take actions, not just read.