How to Search Google from Claude Code with an MCP Server
You are deep in a terminal session, debugging a server issue, and the one thing you need is a current search result without breaking your flow. That is the small but useful problem this guide solves: wiring Claude Code to a Google Search MCP server so your coding agent can search from inside the command-line workflow.
What you can do
After the MCP server is configured, Claude Code can call a search tool directly from a session. In practice, that means you can ask questions like:
search nginx error 502 bad gateway upstream sent too big header how to fixsearch Kubernetes CronJob concurrencyPolicy official docs, difference between Forbid and Replace
The underlying tool exposed by the server is: serp_google_search
According to the Ace Data Cloud document, this tool supports Google search across web, images, news, videos, and related result types. It can also work with country, language, and time range options when you need more focused results.
This is not meant to replace careful documentation reading. The point is simpler: when you are already in Claude Code, the search step no longer requires copying an error message, switching to a browser, searching manually, then bringing the result back into your terminal context.
How it works
The setup uses Claude Code's MCP support and connects it to Ace Data Cloud's Serp MCP endpoint. The endpoint from the documentation is:
https://serp.mcp.acedata.cloud/mcp
The authentication shape is an HTTP header:
Authorization: Bearer <your-token>
The Claude Code command is:
claude mcp add serp --transport http https://serp.mcp.acedata.cloud/mcp \
-H "Authorization: Bearer <your-token>"
One small detail matters here: use uppercase -H. In the documented command, -H is the header parameter. Lowercase -h is help, which is a surprisingly easy typo to make when you are moving fast.
Choosing the right MCP scope
Claude Code supports different scopes for MCP configuration. The document calls out three practical choices:
- local: the default if you do not pass
-s; applies only to the project directory where the command is run. - user: pass
-s user; makes the MCP server available across your projects. - project: pass
-s project; writes configuration to the project root.mcp.json, which can be shared with a team.
For a personal workstation, I would usually start with a user-level config:
claude mcp add serp -s user --transport http https://serp.mcp.acedata.cloud/mcp \
-H "Authorization: Bearer <your-token>"
For a team repository, project scope can be useful, but do not commit real tokens. A safer pattern is to use an environment-variable placeholder in the project config and let each developer provide their own secret locally.
The documented config locations are ~/.claude.json for local/user scopes and .mcp.json in the project root for project scope.
Verify the connection
Once the server has been added, list your MCP servers:
claude mcp list
You should see serp marked as connected. If it is not connected, the first things I would check are:
- Is the endpoint exactly
https://serp.mcp.acedata.cloud/mcp? - Did you use uppercase
-Hfor the header? - Does the header have the form
Authorization: Bearer <your-token>? - Did you add the server in the scope where you are actually running Claude Code?
These checks catch most boring setup mistakes before you start debugging the wrong thing.
A few workflows where this helps
Debugging production errors
When you are SSH'd into a machine and looking at unfamiliar logs, search can stay inside the same working context:
search nginx error 502 bad gateway upstream sent too big header how to fix
Claude Code can use the MCP tool, inspect search results, and help you reason about what to try next.
Checking official docs
For API and infrastructure work, current docs often matter more than model memory. A query like this keeps the intent explicit:
search Kubernetes CronJob concurrencyPolicy official docs, difference between Forbid and Replace
That phrasing nudges the search toward source material instead of random snippets.
Comparing technical choices
You can also use time-sensitive research queries while planning an implementation:
search performance comparison of Python async ORM in 2025, SQLAlchemy 2.0 async vs Tortoise ORM
This is useful when the answer depends on recent releases, benchmarks, or ecosystem changes.
Keep it small and boring
The nice part of this integration is that it does not require changing your whole development environment. It is one MCP server, one endpoint, and one auth header. After that, the interaction becomes natural language inside Claude Code.
If you want the original reference with the exact command, scopes, and tool name, the Ace Data Cloud document is here: https://platform.acedata.cloud/documents/claude-code-mcp-serp
Comments
No comments yet. Start the discussion.