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

# Connect Windsurf

> Step-by-step guide to connect the Windsurf AI code editor to Bodha Route Planner via MCP.

# Connect Windsurf

Windsurf (by Codeium) is an AI-native code editor with MCP support. Connect it to Bodha Route Planner to query your fleet data while you work.

> [!NOTE]
>
> **Time to set up:** Under 2 minutes. No install, no dependencies.

***

## Prerequisites

* [Windsurf](https://codeium.com/windsurf) installed
* A Bodha Route Planner API key ([generate one here](https://help.bodharouteplanner.com/mcp/setup.md#step-1-generate-an-api-key))

***

## Setup

**1. Open MCP configuration**

In Windsurf, open the Command Palette (`Cmd/Ctrl + Shift + P`) and search for **"MCP"** or **"Model Context Protocol"**.

Alternatively, edit the MCP config file directly:

* macOS: `~/.windsurf/mcp.json`
* Windows: `%APPDATA%\Windsurf\mcp.json`
* Linux: `~/.config/windsurf/mcp.json`

**2. Add the Bodha Route Planner server**

Add or merge the following into your MCP config:

```json theme={null}
{
  "mcpServers": {
    "bodha-route-planner": {
      "type": "streamable-http",
      "url": "https://mcp.bodha.run/mcp",
      "headers": {
        "Authorization": "Bearer bdk_live_YOUR_KEY_HERE"
      }
    }
  }
}
```

Replace `bdk_live_YOUR_KEY_HERE` with your actual API key.

**3. Restart or reconnect**

Save the file and restart Windsurf, or use the MCP panel to reconnect. The server should appear as **Connected**.

**4. Test it**

Open Windsurf's AI chat (Cascade) and type:

> **"Show me today's routes from Bodha Route Planner"**

You should see your route data returned in plain language.

***

## Example questions

| What you type | What happens |
| - | - |
| *"How many routes are running right now?"* | Lists active routes with stop counts and driver assignments |
| *"Which deliveries failed today?"* | Shows failed stops with failure reasons |
| *"Give me this week's analytics summary"* | Returns completion rates, distance, on-time metrics |
| *"Find the order for REF-2024-001"* | Searches orders by reference number |

***

## Troubleshooting

> **Server not connecting**
>
> 1. Verify the JSON is valid — use a JSON validator if needed
> 2. Check the file path is correct for your OS
> 3. Make sure the URL is exactly `https://mcp.bodha.run/mcp`
> 4. Restart Windsurf after config changes

> **'Unauthorized' errors**
>
> Generate a fresh API key in [Bodha Route Planner](https://fleet.bodharouteplanner.com) → **Settings → API Keys** and update your config.

***

## Next steps

> **[All 14 tools](https://help.bodharouteplanner.com/mcp/tools.md)**
>
> Full reference for every MCP tool.

> **[Scopes & security](https://help.bodharouteplanner.com/mcp/scopes-and-security.md)**
>
> How your data stays protected.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.