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

# Cursor Integration

> Configure Cursor IDE for custom coding models and Neosantara MCP tools.

[Cursor](https://www.cursor.com/?utm_source=neosantara-docs\&utm_medium=referral) connects to Neosantara in two ways: using the OpenAI-compatible gateway as your primary coding model provider (Chat, Composer, Agent), and configuring Neosantara as a Model Context Protocol (MCP) server for supplemental tools.

## Method 1: Primary Coding Models (OpenAI-Compatible)

Route Cursor Tab, Chat, and Composer requests through Neosantara:

**1. Open Cursor Model Settings**

Press `Ctrl + Shift + J` (Windows/Linux) or `Cmd + Shift + J` (macOS) to open **Cursor Settings**, then navigate to the **Models** tab.

**2. Configure OpenAI Credentials**

1. Enter your Neosantara API key (`nsk_...`) in the **OpenAI API Key** field.
2. Toggle on **Override OpenAI Base URL**.
3. Input the gateway base URL:
   ```text theme={"theme":{"light":"catppuccin-latte","dark":"ayu-dark"}}
   https://api.neosantara.xyz/v1
   ```

**3. Add Neosantara Models**

Click **+ Add model** and enter the following identifiers:

* `deepseek-v4.1-flash` (Recommended for Composer and Agent workflows)
* `gemini-3.8-flash` (Recommended for low latency code chat)
* `gpt-5.4-mini` (Cost-efficient general tasks)

## Method 2: MCP Tool Server

Attach Neosantara tools (model discovery, image generation, web audits) directly to Cursor's agent environment.

**1. Navigate to MCP Settings**

Go to **Cursor Settings** -> **Features** -> **MCP**.

**2. Add Server Configuration**

Click **+ Add New MCP Server** or add this block directly to `~/.cursor/mcp.json`:

```json theme={"theme":{"light":"catppuccin-latte","dark":"ayu-dark"}}
{
  "mcpServers": {
    "neosantara": {
      "url": "https://api.neosantara.xyz/v1/mcp",
      "headers": {
        "x-api-key": "nsk_mcp_your_key_here"
      }
    }
  }
}
```

**3. Verify Connection Status**

Check the MCP settings tab. Confirm that the `neosantara` entry displays a green status indicator with available tools (`chat`, `list-models`, `generate-image`).

> [!NOTE]
>
> MCP tool connections require an API key prefixed with `nsk_mcp_`. Model inference calls in Method 1 use standard gateway API keys (`nsk_...`).

## Next Steps

| Task | Guide |
| :- | :- |
| Configure Claude Code | [Claude Code Integration](https://docs.neosantara.xyz/en/agents/claude-code.md) |
| Configure OpenCode | [OpenCode Integration](https://docs.neosantara.xyz/en/agents/opencode.md) |
| Configure Cline | [Cline Integration](https://docs.neosantara.xyz/en/agents/cline.md) |
| Review MCP Keys | [MCP API Keys](https://docs.neosantara.xyz/en/agents/mcp-keys.md) |


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