Integrate Google Search MCP with Cursor

You're writing an OAuth integration in Cursor when you suddenly can't remember whether the state parameter is required or optional. Before, you would Cmd+Tab to the browser, open Google, search, browse a few links, find the answer, and switch back.

Now you don't have to. Just say this in Cursor's AI panel:

搜索一下 OAuth 2.0 authorization code flow 中 state 参数的最佳实践

Serp MCP calls Google Search in real time and returns structured results to the AI, which then provides advice based on your code context. Your hands never need to leave the editor throughout the process.

Get an API Token

Log in to the application list, open General Application, and click the copy button to the right of API KEY.

Get an Ace Data Cloud API Key

If your balance is insufficient, click the "Recharge" button.

One Token can be used for all MCP Servers; there is no need to apply separately for each service.

Configure Cursor

Create .cursor/mcp.json in the project root directory:

{
  "mcpServers": {
    "serp": {
      "type": "http",
      "url": "https://serp.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer 你的Token"
      }
    }
  }
}

Replace 你的Token with the API Token copied in the previous step. Save the file and restart Cursor to use it.

Real Development Scenarios

When debugging an error

搜索 Python asyncio "RuntimeError: This event loop is already running" 怎么解

After searching, the AI tells you the solution directly and can also check it against your code to point out exactly which line to change.

When choosing a technology

搜索 RabbitMQ vs Kafka 在微服务间事件驱动架构中的对比,2024年最新的

Search supports filtering by time, so you can view only the most recent results.

When looking for competitors and design inspiration

搜索 Google Images,找一些 SaaS 产品定价页面的设计参考,极简风格

Serp supports multiple search types, including web pages, images, news, and videos.

Complete Tool List

Tool Description
serp_google_search Google Search (web pages/images/news/videos, etc.)

You can specify a country, language, and time range, such as viewing only English results from the past week.

Configuration for Other Editors

  • VS Code — Add the same configuration under servers in .vscode/mcp.json
  • Claude Code — Configure via the terminal command line; see the Claude Code + Google Search MCP tutorial
  • Windsurf — .windsurf/mcp.json, using the same format as Cursor