Skip to Content

Using with Cursor - MyTokenGate

Cursor  is an AI-first code editor built on VS Code with powerful AI assistance built-in. By integrating with MyTokenGate, you can use various powerful AI models in Cursor.

Install Cursor

  1. Visit Cursor Website  to download
  2. Supports Windows, macOS, and Linux
  3. After installation, you can import settings and extensions from VS Code

Configure MyTokenGate

Method 1: Settings Interface

  1. Open Cursor, press Ctrl/Cmd + Shift + J to open settings
  2. Find “Models” or “AI Provider” settings
  3. Add a custom model provider:
    • Provider Name: MyTokenGate
    • Base URL: https://gateway.mytokengate.com/v1
    • API Key: Get it from MyTokenGate Dashboard 

Method 2: Configuration File

Create or edit .cursorrules file in your project root:

{ "models": { "provider": "openai", "baseUrl": "https://gateway.mytokengate.com/v1", "apiKey": "your-api-key-here" } }

Method 3: Environment Variables

Add to your shell profile:

export OPENAI_API_KEY="your-api-key-here" export OPENAI_BASE_URL="https://gateway.mytokengate.com/v1"

Model Selection

In Cursor settings, select the model you want to use. Supported models include:

  • Claude series: claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5
  • GPT series: gpt-5.5, gpt-5.4-pro, gpt-5.2
  • Other models: See Model List 

Usage Tips

Chat Mode

  • Press Ctrl/Cmd + L to open AI Chat
  • Use @ symbol to reference files or code
  • Supports Markdown format

Inline Edit

  • Select code and press Ctrl/Cmd + K for inline editing
  • Ask AI to modify, refactor, or explain code

Code Generation

  • Press Ctrl/Cmd + I to generate code
  • Describe the functionality you want, AI will generate the code

Using Document Context

Cursor supports loading document context via llms.txt protocol:

  1. Press Ctrl/Cmd + L to open Chat
  2. Type @ and select “Docs”
  3. Add MyTokenGate documentation URL: https://docs.mytokengate.com
  4. Now you can reference documentation in conversations

Troubleshooting

Connection Issues

Verify Base URL is configured correctly:

  • Should be https://gateway.mytokengate.com/v1 (including /v1)

Authentication Error

# Test API connection curl https://gateway.mytokengate.com/v1/models \ -H "Authorization: Bearer YOUR_API_KEY"
Last updated on