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

# Cursor

> Set up Isthmus with Cursor IDE.

## Config file location

Cursor supports project-level and global MCP configuration:

<Tabs>
  <Tab title="Project (recommended)">
    ```
    .cursor/mcp.json
    ```

    Place this in your project root. Cursor reads it when you open the project.
  </Tab>

  <Tab title="Global">
    ```
    ~/.cursor/mcp.json
    ```

    Applies to all projects.
  </Tab>
</Tabs>

## Minimal configuration

```json theme={null}
{
  "mcpServers": {
    "isthmus": {
      "command": "isthmus",
      "env": {
        "DATABASE_URL": "postgres://user:password@localhost:5432/mydb"
      }
    }
  }
}
```

## Full configuration

```json theme={null}
{
  "mcpServers": {
    "isthmus": {
      "command": "isthmus",
      "args": ["--audit-log", "/tmp/isthmus-audit.ndjson"],
      "env": {
        "DATABASE_URL": "postgres://user:password@localhost:5432/mydb",
        "SCHEMAS": "public,analytics",
        "POLICY_FILE": "/path/to/policy.yaml",
        "MAX_ROWS": "500"
      }
    }
  }
}
```

## Verify

1. Save the config file
2. Restart Cursor or reload the window
3. Open the AI chat panel
4. Ask: **"What tables are in my database?"**

## Troubleshooting

<AccordionGroup>
  <Accordion title="Binary not found">
    Use the full path to the binary. The location depends on how you installed:

    * **Install script / prebuilt binary:** `/usr/local/bin/isthmus`
    * **go install:** `~/go/bin/isthmus`

    ```json theme={null}
    "command": "/usr/local/bin/isthmus"
    ```

    Find the path with `which isthmus`.
  </Accordion>

  <Accordion title="Config not picked up">
    Make sure the file is named exactly `mcp.json` (not `mcp_config.json`) and is inside the `.cursor` directory. Restart Cursor after creating or editing the file.
  </Accordion>

  <Accordion title="Database unreachable">
    Test connectivity first:

    ```bash theme={null}
    DATABASE_URL="postgres://user:password@localhost:5432/mydb" isthmus --dry-run
    ```
  </Accordion>
</AccordionGroup>
