> ## Documentation Index
> Fetch the complete documentation index at: https://docs.geekflare.com/llms.txt
> Use this file to discover all available pages before exploring further.

# VS Code

> Add the Geekflare MCP server to VS Code to enable web scraping, search, and screenshot tools in GitHub Copilot agent mode.

Visual Studio Code supports MCP servers through GitHub Copilot's agent mode. With Geekflare connected, Copilot can get the webpage context, fetch information from the Internet and run network tools to check DNS records, broken links, site availability, etc.

## Setup

<Tabs>
  <Tab title="User Settings (Global)">
    Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac) and open **Preferences: Open User Settings (JSON)**. Add:

    ```json theme={null}
    {
      "mcp": {
        "servers": {
          "geekflare": {
            "type": "http",
            "url": "https://mcp.geekflare.com/YOUR_API_KEY/mcp"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Workspace (.vscode/mcp.json)">
    Create `.vscode/mcp.json` in your project root to share the config with your team:

    ```json theme={null}
    {
      "servers": {
        "geekflare": {
          "type": "http",
          "url": "https://mcp.geekflare.com/YOUR_API_KEY/mcp"
        }
      }
    }
    ```

    <Warning>
      Do not commit your API key to version control. Use an environment variable or `.env` file and add `.vscode/mcp.json` to `.gitignore`.
    </Warning>
  </Tab>

  <Tab title="Local via npx">
    Requires [Node.js](https://nodejs.org) installed locally.

    ```json theme={null}
    {
      "mcp": {
        "servers": {
          "geekflare": {
            "type": "stdio",
            "command": "npx",
            "args": ["-y", "@geekflare/mcp"],
            "env": {
              "API_KEY": "YOUR_API_KEY"
            }
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

Replace `YOUR_API_KEY` with your Geekflare API key.

## Usage Examples

Open GitHub Copilot Chat (`Ctrl+Alt+I`), switch to **Agent** mode, and try:

**Scrape a webpage**

```
Use Geekflare to scrape https://example.com and extract the main body text.
```

**Metadata scraping**

```
Fetch the meta tags from https://geekflare.com and show me the SEO title and description.
```

**Search**

```
Search for "VS Code MCP extensions" and give me the top results.
```

**DNS lookup**

```
Look up the A and MX records for github.com.
```
