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

# VS Code

> Connect VexiData to VS Code so Copilot can query your databases while you code.

## Quick Install

<a href="vscode:mcp/install?%7B%22name%22%3A%22VexiData%22%2C%22type%22%3A%22sse%22%2C%22url%22%3A%22https%3A%2F%2Fvexidata.com%2Fmcp%22%7D">
  <img src="https://img.shields.io/badge/VS_Code-Install_MCP_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white" alt="Add VexiData to VS Code" height="32" />
</a>

Click the button above to add VexiData to VS Code automatically. You'll be prompted to authorize access after installation.

## Prerequisites

* [VS Code](https://code.visualstudio.com) with GitHub Copilot extension installed
* MCP support enabled in VS Code (available in VS Code 1.99+)
* A [VexiData](https://vexidata.com) account with at least one connected database

## Manual Setup

<Steps>
  <Step title="Copy your MCP Server URL">
    Your MCP Server URL is:

    ```
    https://vexidata.com/mcp
    ```

    You can also find this in **Settings** > **AI Integrations** in your [VexiData AI Integrations](https://vexidata.com/settings/ai-integrations) page.
  </Step>

  <Step title="Add VexiData as an MCP server">
    1. Open VS Code
    2. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
    3. Search for **MCP: Add Server**
    4. Select **HTTP (SSE)** as the transport type
    5. Paste your MCP Server URL
    6. Enter a name (e.g., "VexiData")
    7. Choose whether to save it to **User Settings** (global) or **Workspace Settings** (project-only)
  </Step>

  <Step title="Authorize the connection">
    VS Code will open a browser window to VexiData for authorization. Review the requested permissions and click **Approve**.

    Once authorized, you'll see VexiData listed in your MCP servers.
  </Step>

  <Step title="Start querying your data">
    In Copilot Chat, you can now reference your database. For example:

    * *"What columns does the users table have?"*
    * *"Write a query to get the top 10 customers by total spend"*
    * *"Generate a migration to add an `is_active` column to the orders table"*

    Copilot will use VexiData to access your schema and run queries against your connected databases.
  </Step>
</Steps>

## Manual configuration file

You can also add VexiData directly to your VS Code settings (`.vscode/mcp.json` in your project or user settings):

```json theme={null}
{
  "servers": {
    "vexidata": {
      "type": "sse",
      "url": "https://vexidata.com/mcp"
    }
  }
}
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="MCP option not available">
    * MCP support requires VS Code 1.99 or later
    * Make sure the GitHub Copilot extension is installed and active
    * Check that MCP is not disabled in your VS Code settings
  </Accordion>

  <Accordion title="MCP server shows as disconnected">
    * Check that your VexiData account has an active session — try logging in at [vexidata.com](https://vexidata.com)
    * Verify the MCP Server URL is correct in your settings
    * Try removing and re-adding the MCP server via the Command Palette
  </Accordion>

  <Accordion title="Authorization window doesn't open">
    * Make sure your default browser is set and working
    * Try adding VexiData manually via the config file method
    * Check that no browser extensions are blocking the redirect
  </Accordion>

  <Accordion title="Copilot can't access my tables">
    * Verify you have at least one database connected in VexiData under **Data Sources**
    * Check that your database connection is active and the schema has been analyzed
    * Try asking specifically about a table name to confirm the connection is working
  </Accordion>
</AccordionGroup>
