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

# Cursor

> Point Cursor at Opper as a custom OpenAI base URL, and add Opper SDK rules to your project

[Cursor](https://cursor.com) is Anysphere's AI code editor. It has two independent things worth wiring to Opper: the model endpoint it calls, and the rules file that teaches it the Opper SDKs.

## Run Cursor on Opper models

Cursor takes a custom OpenAI base URL in its settings:

<Steps>
  <Step title="Open model settings">
    **Settings → Models**, then enable **Override OpenAI Base URL**.
  </Step>

  <Step title="Set the base URL">
    ```
    https://api.opper.ai/v3/compat
    ```
  </Step>

  <Step title="Add your API key">
    Paste an Opper key from [platform.opper.ai](https://platform.opper.ai/settings/api-keys) into the OpenAI API key field, then add the model IDs you want — for example `anthropic/claude-sonnet-4-6`. Verify the key to activate the override.
  </Step>
</Steps>

<Warning>
  Cursor's BYOK path drives chat and inline edits. Some Cursor-specific features — Tab completion and Composer's agent mode among them — run on Anysphere's own infrastructure and ignore the override. That's a Cursor product decision, not a gateway limitation.
</Warning>

## Add Opper rules to your project

Separately from the endpoint, you can give Cursor context about the Opper SDKs so it writes correct Opper code:

1. Download the `.mdc` file for your language:
   * **Python**: <a href="https://raw.githubusercontent.com/opper-ai/opper-python/refs/heads/main/opper-python.mdc" download="opper-python.mdc">Download</a>
   * **TypeScript**: <a href="https://raw.githubusercontent.com/opper-ai/opper-node/refs/heads/main/opper-node.mdc" download="opper-node.mdc">Download</a>
2. Place it in your project at `.cursor/rules/opper.mdc`.
3. In Cursor, set the rule to **Always**.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The model doesn't appear">
    Cursor needs each model ID added by hand under **Settings → Models** — it doesn't fetch the catalog. Copy IDs from the [catalog](/capabilities/models).
  </Accordion>

  <Accordion title="Tab completion still uses Cursor's models">
    Expected. The base URL override covers chat and edits; Tab runs on Anysphere's own service.
  </Accordion>

  <Accordion title="Verification fails">
    Cursor verifies by making a real call against the first model in your list. If that model ID is wrong or your [model access rules](/control-plane/rules/model-access) deny it, verification fails even though the key is valid.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Skills" icon="book" href="/developer-tools/skills">
    Drop Opper context into other AI editors.
  </Card>

  <Card title="All integrations" icon="plug" href="/integrations/overview">
    Every app that runs on Opper.
  </Card>
</CardGroup>
