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
Cursor connects to a compatible third-party service by overriding the OpenAI base URL:
- Open Cursor, press
Ctrl/Cmd + Shift + Jto open settings - Go to the Models panel and expand OpenAI API Key
- Paste the API key from your MyTokenGate Dashboard
- Enable Override OpenAI Base URL and enter
https://gateway.mytokengate.com/v1 - Add the model names you want to use (see “Model Selection” below), then save and verify
.cursorrulesand the newer.cursor/rules/*.mdc(Project Rules) provide prompt guidance to the AI; they do not configure the model provider — the provider can only be overridden in the settings above.
Model Selection
In Cursor settings, select the model you want to use. Supported models include:
- Claude series:
claude-opus-4-8,claude-sonnet-5,claude-haiku-4-5 - GPT series:
gpt-5.6-sol,gpt-5.4,gpt-5.5 - 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