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
- Visit Cursor Website to download
- Supports Windows, macOS, and Linux
- After installation, you can import settings and extensions from VS Code
Configure MyTokenGate
Method 1: Settings Interface
- Open Cursor, press
Ctrl/Cmd + Shift + Jto open settings - Find “Models” or “AI Provider” settings
- 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 + Lto open AI Chat - Use
@symbol to reference files or code - Supports Markdown format
Inline Edit
- Select code and press
Ctrl/Cmd + Kfor inline editing - Ask AI to modify, refactor, or explain code
Code Generation
- Press
Ctrl/Cmd + Ito generate code - Describe the functionality you want, AI will generate the code
Using Document Context
Cursor supports loading document context via llms.txt protocol:
- Press
Ctrl/Cmd + Lto open Chat - Type
@and select “Docs” - Add MyTokenGate documentation URL:
https://docs.mytokengate.com - 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"Related Links
Last updated on