Skip to main content

Command Palette

Search for a command to run...

How to Configure Claude Code for Terminal and VS Code: A Practical Guide

A focused setup and troubleshooting guide for using Claude Code through the Anthropic Messages protocol.

Updated
4 min readView as Markdown
How to Configure Claude Code for Terminal and VS Code: A Practical Guide

If your debugging flow keeps bouncing between a terminal and a browser, this guide shows how to give Claude Code a focused web-search tool without leaving your project session.

Claude Code with Google Search MCP cover

What you can do

A coding agent is useful when it understands your repository, but many real problems depend on information outside that repository. A strange kernel message, a recently changed framework option, or an unfamiliar HTTP error can all force you to break context and search manually.

The Google Search MCP connection gives Claude Code a small set of search tools it can call from the terminal. According to the source documentation, those tools cover Google web search with country, language, and time-range controls, plus image, news, video, map, and local-place search.

The connection uses this remote MCP URL:

https://serp.mcp.acedata.cloud/mcp

Authentication is sent as an HTTP header:

Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY

The important detail is that this is an MCP integration, not a search API you need to wrap in your own application code. Claude Code handles the tool handshake and decides when a search call is useful inside the conversation.

Connect it to one project first

For a first test, I prefer project-local setup. It limits the blast radius while you check that the URL, token, and client behavior are correct.

Run the command from the project directory where you use Claude Code:

claude mcp add serp --transport http https://serp.mcp.acedata.cloud/mcp \
  -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" \
  -s local

There are three details worth checking before you press Enter:

  1. --transport http tells Claude Code that this is a remote HTTP MCP server.
  2. -H is uppercase. Lowercase -h means help, so that small typo changes the command entirely.
  3. -s local binds the configuration to the current project context in ~/.claude.json.

Keep the real token out of screenshots, issue reports, public repositories, and copied chat transcripts. A placeholder such as YOUR_ACEDATACLOUD_API_KEY is safer in documentation and examples.

Choose the right configuration scope

Once the local connection works, you can decide whether it belongs in a broader scope.

Use user when you want the search server available in every project 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 when the MCP configuration should live in the repository's .mcp.json for a team workflow:

claude mcp add serp --transport http https://serp.mcp.acedata.cloud/mcp \
  -H "Authorization: Bearer YOUR_ACEDATACLOUD_API_KEY" \
  -s project

Project scope is convenient, but it deserves extra care: do not commit a real bearer token to a public repository. Replace it with an environment-variable placeholder or have each teammate add credentials locally. Claude Code may show Pending approval the first time it reads a project-level configuration; that is the expected trust prompt for repository-provided MCP settings.

Verify the handshake before asking for research

Do not start with a complicated research prompt. First check the connection itself:

claude mcp list

The serp entry should report ✓ Connected. If it does not, check the bearer token, the MCP URL, and the selected scope. This simple verification separates configuration problems from search-quality problems.

After the handshake succeeds, try a narrow task with an outcome you can evaluate. For example:

Search how to resolve nginx 502 bad gateway response header too large.
Prioritize official documentation and summarize the likely configuration change.

Or use a version-sensitive question:

Search for the official Kubernetes documentation on CronJob concurrencyPolicy.
Explain the difference between Forbid and Replace and cite the relevant page.

These prompts are better than “research this error” because they specify the source preference and expected output. The available MCP tools include serp_google_search, serp_google_images, serp_google_news, serp_google_videos, and serp_google_maps / serp_google_places. For everyday engineering work, web search is usually the starting point; the other tools become useful when the task involves visual references, current news, videos, or local businesses.

A practical workflow for debugging

A lightweight pattern is: inspect locally, search narrowly, then verify against the project.

Ask Claude Code to read the exact error and surrounding configuration first. Next, let it search for official or recent sources. Finally, ask it to compare those findings with the versions and files in your repository before suggesting a patch. That last step matters: search results provide external context, but your codebase determines whether the advice actually applies.

I like this setup because it removes a small but frequent interruption without pretending that web search replaces engineering judgment. Start with local scope, verify the handshake, and keep each search request specific. The full setup details and current tool list are in the Claude Code with Google Search MCP documentation.

More from this blog