> ## 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 Cursor

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

# Connect Cursor

Cursor is an AI-powered code editor with built-in MCP support. Connect it to Bodha Route Planner and query your fleet data from within your development environment — perfect for teams building on top of the Bodha Route Planner API or managing fleet operations alongside code.

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

***

## Prerequisites

* [Cursor](https://cursor.com) installed (macOS, Windows, or Linux)
* 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 Cursor Settings**

Open Cursor and go to **Settings**:

* macOS: `Cmd + ,` → search for **MCP**
* Windows/Linux: `Ctrl + ,` → search for **MCP**

Or open the Command Palette (`Cmd/Ctrl + Shift + P`) and search for **"MCP: Settings"**.

**2. Add a new MCP server**

In the MCP settings panel, click **Add new MCP server** (or edit the JSON config directly).

Add the following configuration:

```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.

> [!NOTE]
>
> **Cursor's MCP config location** may vary by version. If you prefer to edit the file directly:
>
> * macOS: `~/.cursor/mcp.json`
> * Windows: `%APPDATA%\Cursor\mcp.json`
> * Linux: `~/.config/cursor/mcp.json`

**3. Enable the server**

After adding the config, make sure the Bodha Route Planner server shows as **Connected** in Cursor's MCP panel. If it shows as disconnected, click the refresh or reconnect button.

**4. Test the connection**

Open Cursor's AI chat panel (`Cmd/Ctrl + L`) and type:

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

Cursor should call the MCP tools and return your route data.

***

## Using Bodha Route Planner in Cursor

Cursor's AI chat is where the magic happens. Ask questions in natural language:

| What you type | What Cursor does |
| - | - |
| *"What routes are running today?"* | Calls `list_routes` and summarizes status |
| *"Show me failed stops from this week"* | Calls `list_stops` with status filter and date range |
| *"Get analytics for this month"* | Calls `get_analytics` and presents KPIs |
| *"Search for the delivery to 456 Elm St"* | Calls `search_stops` by address |

### Use case: building on the API

If you're developing an integration with Bodha Route Planner's REST API, having the MCP server connected means you can:

* Ask Cursor to show you real route data while writing API integration code
* Verify your API calls return the expected structure by comparing with MCP tool output
* Debug webhook payloads by asking "Show me the details of route X" and comparing fields
* Generate test fixtures from real data: "Give me a sample route with 10 stops as JSON"

***

## Troubleshooting

> **Server shows as 'Disconnected'**
>
> 1. Click the refresh/reconnect button in Cursor's MCP panel
> 2. Check that the JSON is valid (no trailing commas, matching brackets)
> 3. Verify the URL is exactly `https://mcp.bodha.run/mcp`
> 4. Try restarting Cursor

> **Cursor doesn't show MCP settings**
>
> MCP support requires a recent version of Cursor. Update to the latest version from [cursor.com](https://cursor.com).

> **'Unauthorized' errors**
>
> Your API key may be wrong or revoked. Generate a new key in [Bodha Route Planner](https://fleet.bodharouteplanner.com) → **Settings → API Keys** and update the config.

***

## Next steps

> **[All 14 tools](https://help.bodharouteplanner.com/mcp/tools.md)**
>
> See every tool, parameter, and example question.

> **[Connect Claude Desktop too](https://help.bodharouteplanner.com/mcp/connect-claude.md)**
>
> Use Bodha Route Planner from Claude Desktop as well.


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