How to Add Google Search to Claude Code with MCP

When you are debugging from a terminal, the slowest step is often not writing code; it is leaving the terminal to verify an unfamiliar error, a dependency behavior, or the current shape of an upstream API.
This guide walks through a practical setup for connecting Claude Code to the Google Search MCP Server through Ace Data Cloud. The result is simple: while staying inside Claude Code, you can ask for a search, compare recent technical results, or look up official documentation without copying context into a browser.
What you can do
The Ace Data Cloud documentation describes a Google Search MCP Server for Claude Code. Once configured, Claude Code can call search tools from the same command-line workflow you already use for code reading, edits, and shell commands.
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 map and local business search.
That is enough for several day-to-day builder workflows: troubleshooting a production error, checking an official reference before changing code, researching a library choice, or collecting context for a technical write-up.
How it works
Claude Code connects to the remote MCP endpoint over HTTP. The endpoint in the documentation is:
https://serp.mcp.acedata.cloud/mcp
The connection is authenticated with an Ace Data Cloud API token passed as an HTTP header. The docs show the header format as Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY. Keep the real token local: do not paste it into public repositories, issues, screenshots, or chat logs.
You can add the server at three scopes: local, user, or project. The right scope depends on how you want Claude Code to discover the MCP server.
Choose a configuration scope
Use local when you want to try the setup inside the current project directory only. The documentation says Claude Code writes this into the local ~/.claude.json together with the current project path.
claude mcp add serp --transport http https://serp.mcp.acedata.cloud/mcp -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" -s local
Use user when you want the same Google Search MCP server available across projects opened with Claude Code:
claude mcp add serp --transport http https://serp.mcp.acedata.cloud/mcp -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" -s user
Use project for a team project. The docs describe this as writing the configuration into .mcp.json at the project root. If you commit that file, use an environment-variable placeholder or have each teammate add their own token locally. Do not commit the real token.
claude mcp add serp --transport http https://serp.mcp.acedata.cloud/mcp -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" -s project
One small detail matters: the documented command uses uppercase -H. Lowercase -h means --help, so a casing typo will send you into the help output instead of adding the header.
Verify the connection before using it
After adding the MCP server, verify the handshake from the terminal:
claude mcp list
If the serp server shows ✓ Connected, the connection is ready. If it does not, check the token, the service URL, and the scope you used. This is a better signal than relying on an old tool count or a previous client version.
For project-level configuration, Claude Code may first show Pending approval. That is expected: you need to trust the project configuration inside the Claude Code session before it can be used.
Use it in real debugging and research sessions
Once connected, you do not need to memorize a tool invocation. Ask in natural language from the Claude Code session. For example, while investigating a gateway issue:
Search how to resolve nginx 502 bad gateway response header too large
For technical selection work, ask for a comparison and include a time boundary when freshness matters:
Search for the performance comparison of Python asynchronous ORM in 2025, SQLAlchemy 2.0 async vs Tortoise ORM
For implementation details, I prefer asking for official documentation explicitly:
Search for the official documentation of Kubernetes CronJob concurrencyPolicy, the difference between Forbid and Replace
This pattern keeps the search close to the codebase. Claude Code can see the surrounding files and the question you are trying to answer, while the MCP server supplies current external context.
A practical workflow
- Start with
-s localin one repository. - Run
claude mcp listand confirmserpis connected. - Ask one narrow debugging or documentation question.
- If the flow becomes part of your daily work, move to
-s user. - For a team repository, use
-s projectbut keep real tokens out of version control.
The main benefit is not that search exists. The benefit is that search becomes part of the same terminal loop where you read stack traces, inspect code, and decide the next edit. For the full reference, see the Ace Data Cloud documentation for Claude Code with Google Search MCP.
Comments
Post a Comment