How to Add Google Search to Claude Code with an MCP Server

When you are debugging from a terminal, the slowest step is often not writing code; it is leaving the terminal to search for the one error message, config flag, or upstream behavior you do not recognize. The Google Search MCP setup for Claude Code gives the agent a controlled way to search from the same command-line workflow instead of making you copy context back and forth.
What you can do
The source document describes the Serp MCP Server as a Google Search MCP integration for Claude Code. Once configured, Claude Code can call search from inside the session while it is helping you investigate a project, a server issue, or a technical decision.
The documented tool set includes:
serp_google_searchfor Google web search, with support for country, language, and time range.serp_google_imagesfor image search.serp_google_newsfor news search.serp_google_videosfor video search.serp_google_mapsandserp_google_placesfor maps and local business search.
That combination is useful when the answer depends on fresh external information: a new framework release, a recent cloud-provider behavior, a breaking change in a library, or an official doc page that you want Claude Code to inspect before suggesting a fix.
How it works
Claude Code supports MCP servers as external tools. The documented Serp endpoint is:
https://serp.mcp.acedata.cloud/mcp
You add it to Claude Code with HTTP transport and pass an Ace Data Cloud API token through an Authorization header. The documentation is explicit about one small but important detail: -H must be uppercase. Lowercase -h is interpreted as --help, which is an easy mistake to make when configuring CLI tools quickly.
The same configuration command can be applied at three scopes: local, user, or project. The right choice depends on whether you are testing in one repository, using the search tool across many repositories, or preparing a team project configuration.
Install it for one project first
For a first test, I would start with the local scope. It is bound to the current project directory and lets you verify that the MCP handshake works before making the tool available everywhere.
claude mcp add serp --transport http https://serp.mcp.acedata.cloud/mcp \
-H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" \
-s local
Keep the real token out of public repositories, screenshots, issue threads, and chat logs. The placeholder YOUR_ACEDATACLOUD_API_KEY is the pattern shown in the documentation, and it is the form you should use in examples or internal onboarding notes.
Use a user-level config for everyday work
If search becomes part of your daily Claude Code workflow, use the user scope. The document says this writes the configuration to the user-level Claude configuration so projects opened later can see it.
claude mcp add serp --transport http https://serp.mcp.acedata.cloud/mcp \
-H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" \
-s user
This is the most convenient option for a solo developer who often asks Claude Code to compare tools, find official docs, or explain unfamiliar errors while working across several repositories.
Share the MCP setup with a team project
The project scope is the team-oriented path. According to the document, it writes configuration into .mcp.json in the project root. That file can be committed to a private repository for teammates to reuse, but the real token should not be committed. Use a placeholder or have each developer add credentials locally.
claude mcp add serp --transport http https://serp.mcp.acedata.cloud/mcp \
-H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" \
-s project
When Claude Code reads a project-level MCP configuration for the first time, it may show Pending approval. Treat that as a normal trust prompt: the client is asking whether this project-level tool configuration should be allowed.
Verify the connection
After adding the MCP server, verify the handshake with:
claude mcp list
If serp shows ✓ Connected, the setup is working. If it does not, check the token, the service URL, and the scope you selected. The documentation also cautions against relying on historical client versions or fixed tool counts to infer the current status; use the live connection result instead.
Practical prompts to try
The nice part of this setup is that the usage surface is natural language. You can ask Claude Code to search while it already has your local context. For example:
Search how to resolve nginx 502 bad gateway response header too large
For technical selection work, constrain the freshness of results in the prompt:
Search for the performance comparison of Python asynchronous ORM in 2025, SQLAlchemy 2.0 async vs Tortoise ORM
For API or platform behavior, ask for official documentation instead of relying on memory:
Search for the official documentation of Kubernetes CronJob concurrencyPolicy, the difference between Forbid and Replace
Where this fits in a builder workflow
I would not use search MCP as a replacement for reading the codebase. Its value is in the handoff between local context and current outside information. Let Claude Code inspect the code, identify the unknown, search for authoritative references, and then come back with a narrower patch or explanation. That keeps the loop inside the terminal without pretending the model already knows every current detail.
For the original Ace Data Cloud setup notes, read the Claude Code with Google Search MCP documentation.
Comments
Post a Comment