> For the complete documentation index, see [llms.txt](https://docs.serphouse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.serphouse.com/agent-harnesses/vs-code.md).

# VS Code

Visual Studio Code supports Model Context Protocol (MCP) servers, allowing AI-powered extensions to connect with external tools and services. By configuring the SERPHouse MCP Server, compatible AI assistants in VS Code can access live search engine data directly from SERPHouse.

Once configured, your AI assistant can perform Google searches, retrieve SERP data, analyze search results, and use SERPHouse tools without manually calling the SERPHouse API.

***

### Prerequisites

Before configuring SERPHouse MCP Server, ensure you have:

* Visual Studio Code installed
* An AI extension with MCP support
* An active SERPHouse account
* A valid SERPHouse API key

***

### Configure the SERPHouse MCP Server

#### One-command install

Fastest path — drop this in your terminal:

```bash
code --add-mcp '{"name":"serphouse","url":"https://mcp.serphouse.com/YOUR_SERPHouse_API_KEY/mcp","type":"http"}'
```

Replace `YOUR_SERPHouse_API_KEY` with your actual SERPHouse API key.

#### Manual setup

Open the **Command Palette** (`Ctrl+Shift+P` or `Cmd+Shift+P`) and search for:

```
MCP: Open User Configuration
```

Add the following server configuration:

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

Replace `YOUR_SERPHouse_API_KEY` with your actual SERPHouse API key.\
Save the configuration.\
Reload the VS Code window or start a new AI chat session.

***

### Verify Configuration

Open a new session and ask:

```
Search Google for "Laravel 13".
```

If configured correctly, your AI assistant automatically calls the SERPHouse MCP server.

***

### Using SERPHouse

Once configured, your AI assistant automatically invokes SERPHouse whenever a request requires search engine data.

Example prompts:

```
Search Google for "Laravel 13 documentation"
```

```
Search Google News for "OpenAI"
```

```
Find the top ranking pages for "technical SEO checklist"
```

```
Search Google Images for "Tesla Model Y"
```

No additional commands are required during normal usage.

***

### Troubleshooting

**SERPHouse server doesn't appear** — Verify that your MCP configuration contains valid JSON. Invalid configuration files may prevent MCP servers from loading.

**Unable to connect to the MCP server** — Confirm your MCP endpoint is in the format `https://mcp.serphouse.com/YOUR_SERPHouse_API_KEY/mcp` and that your internet connection or firewall is not blocking outbound HTTPS requests.

**401 Unauthorized or Authentication failed** — Verify that your SERPHouse API key is valid and active. Ensure you've replaced `YOUR_SERPHouse_API_KEY` in the endpoint URL with your actual API key. Make sure there are no extra spaces or missing characters in the API key.

**AI assistant doesn't use SERPHouse** — Reload the VS Code window or start a new AI chat session after updating the configuration.

**Search requests return no results** — Verify that your SERPHouse account has available API credits and that the requested search feature is enabled for your account.

**Still having issues?** — Remove the SERPHouse configuration, add it again, reload Visual Studio Code, and verify your configuration against the latest documentation.
