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

# Cursor

> Set up Cursor with TrueFoundry AI Gateway using the setup wizard.

Connect Cursor to your organization's gateway. The wizard configures its MCP servers and Skills, and prints the values to enter for the model connection.

## Run setup

With Cursor installed, [install the setup tool](https://www.truefoundry.com/docs/ai-gateway/personal-setup.md#install-the-setup-tool), then run:

```bash theme={"dark"}
tfy-local-ai-setup personal cursor
```

Sign in to your organization, choose any MCP servers and Skills you need, then review the proposed changes and confirm once to apply them. You can skip MCP servers and Skills. See the [overview](https://www.truefoundry.com/docs/ai-gateway/personal-setup.md#connect-your-agents) for the shared wizard walkthrough.

Cursor has no model-selection step in the wizard. After choosing MCP servers and Skills, choose **Review changes**.

![Cursor setup step showing MCP servers, Agent Skills, and Review changes](https://mintcdn.com/truefoundry/0y7rV1BvRYVtEM_x/images/ai-gateway/personal-setup/cursor-review.png?fit=max\&auto=format\&n=0y7rV1BvRYVtEM_x\&q=85\&s=4e62e37b5a73dc4db2c4ba008ece0d98)

Choose the MCP servers and Skills to configure for Cursor, then review the changes.

## Connect models in Cursor

The wizard configures **MCP servers and Skills**. Complete the model connection inside Cursor:

1. Run `tfy-local-ai-setup token` in your terminal to retrieve your TrueFoundry token.
2. Open **Cursor Settings → Models → API Keys**. Enter the token as the **OpenAI API Key** and turn its toggle on.
3. Set **Override OpenAI Base URL** to your gateway's `/cursor/v1` endpoint. The completion summary prints the exact URL, for example `https://gateway.example.com/cursor/v1`.
4. Under **Models**, choose **Add Custom Model**, enter a Cursor-compatible Virtual Model slug from your administrator, then select it in a new chat.

The slug must not contain `anthropic`, `claude`, `openai`, `gpt`, `gemini`, or `vertex`. Ask your administrator for a compatible slug; see [Cursor model naming rules](https://www.truefoundry.com/docs/ai-gateway/cursor.md#naming-rules-for-the-slug).

## Optional: authorize MCP servers

Authorize any selected servers that require sign-in inside Cursor. See [Connect MCP from your IDE](https://www.truefoundry.com/docs/ai-gateway/mcp/connect-mcp-from-ide.md).

## Verify the connection

Select your configured model in a new conversation and ask: `Reply exactly TFY-CHAT-OK. Do not use tools.` Confirm that a response arrives without an authentication or model error. Then [verify the request in the gateway](https://www.truefoundry.com/docs/ai-gateway/personal-setup.md#verify-the-connection).

For manual configuration and advanced options, see the [Cursor integration guide](https://www.truefoundry.com/docs/ai-gateway/cursor.md).


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