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

## 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 or Skills you need, then review and approve the changes. 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 setup review showing selected MCP servers and Agent Skills](https://mintcdn.com/truefoundry/WDjROyMkpUZ8WZAf/images/ai-gateway/personal-setup/cursor-review.png?fit=max\&auto=format\&n=WDjROyMkpUZ8WZAf\&q=85\&s=cb3400b1802051260247ff83e593baca)

Review the MCP servers and Skills the wizard will configure for Cursor.

## Connect models in Cursor

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

1. Ask your administrator for the gateway base URL and a Cursor-compatible Virtual Model slug.
2. Run `tfy-local-ai-setup token` in your terminal to retrieve your TrueFoundry token.
3. Open **Cursor Settings → Models → API Keys**. Enter the token as the **OpenAI API Key** and set **OpenAI Base URL** to `{GATEWAY_BASE_URL}/cursor/v1`. Replace the placeholder with your gateway base URL and turn the API key toggle on.
4. Add the Virtual Model slug as a custom model, 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.