# SerpApi MCP server

> Lets an AI client run Google and other search engine queries and extract or crawl web page content via SerpApi.

- Repository: https://github.com/serpapi/serpapi-mcp
- Page: https://hostedmcp.org/servers/serpapi/serpapi-mcp
- Official: yes
- Transport: remote
- Stars: 184
- License: MIT
- Latest version: 2.3.0

## Install

### Claude Code

```sh
claude mcp add --transport http serpapi-mcp https://mcp.serpapi.com/mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "serpapi-mcp": {
      "url": "https://mcp.serpapi.com/mcp"
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "serpapi-mcp": {
      "type": "http",
      "url": "https://mcp.serpapi.com/mcp"
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"serpapi-mcp","type":"http","url":"https://mcp.serpapi.com/mcp"}'
```

### Codex

```sh
codex mcp add serpapi-mcp --url https://mcp.serpapi.com/mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.serpapi-mcp]
url = "https://mcp.serpapi.com/mcp"
```

### Gemini CLI

```sh
gemini mcp add -s user --transport http serpapi-mcp https://mcp.serpapi.com/mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "serpapi-mcp": {
      "url": "https://mcp.serpapi.com/mcp",
      "type": "http"
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `SERPAPI_API_KEY` | no | no |  |

## Tools (1)

- `mode`

## FAQ

### Which search engines does SerpApi MCP support?

It supports Google, Bing, Yahoo, DuckDuckGo, YouTube, eBay, and more SerpApi engines.

### Do I need an API key to use SerpApi MCP?

Search and App tools require a SerpApi API key, but connecting, listing tools and reading resources do not.

### How does the extract tool work?

It reads a page as JSON or Markdown, or discovers and crawls multiple pages from a site URL.

### Can I self-host SerpApi MCP server?

Yes, clone the repository and run it locally with uv.

### Are Markdown responses supported to save tokens?

Yes, setting output to md returns Markdown, which reduces token usage.
