Use ModelServer with Cursor

Cursor natively supports custom OpenAI-compatible endpoints, so pointing it at ModelServer is just filling in two fields — a base URL and an API key. The 3 steps below get you running, and then you can use Claude, GPT, Gemini, DeepSeek, and 40+ other models from Cursor's model picker.

Prerequisites

You'll need a ModelServer API key. If you don't have one yet, sign up and create one in the dashboard — the whole thing takes about 2 minutes.

Open dashboardSee pricing

1. Open Cursor's model settings

In Cursor, press Cmd/Ctrl + , to open Settings and select Models on the left. Scroll down to the OpenAI API Key section and expand Override OpenAI Base URL.

2. Fill in ModelServer's base URL and key

Paste the two values below into the corresponding inputs:

OpenAI Base URL
https://modelserver.dev/v1
OpenAI API Key
sk-ms-...
Heads up: what you're doing here is replacing Cursor's "OpenAI" backend with ModelServer. As far as Cursor knows, it's still calling an OpenAI-format API — the traffic just flows through our gateway instead.

3. Add custom models

In the Model Names section on the same page, click Add model and enter the model IDs you want to use. Here are some common ones — any model listed on ModelServer's pricing page can be entered as-is:

Example model ids
claude-opus-4          # Anthropic 旗舰
claude-sonnet-4        # 日常首选
claude-3-5-haiku       # 快 & 便宜
gpt-5.2                # OpenAI 旗舰
gpt-4o                 # 速度 / 质量平衡
gemini-2.5-pro         # 2M tokens 长上下文
deepseek-r1            # 开源推理
deepseek-v3            # 开源通用

4. Verify

Back in the editor, press Cmd/Ctrl + K to open inline edit. Pick one of the models you just added from the dropdown (say, claude-sonnet-4) and type any prompt like "write fizzbuzz". If you get a reply, you're connected.

No reply?
First, double-check Cursor Settings for stray spaces or trailing slashes in the base URL. Then open the "Usage" tab in ModelServer's dashboard and look at the most recent request — if nothing showed up, Cursor is still holding an old key; restart Cursor to force a reload.

FAQ

Next steps

To learn how ModelServer handles tool calling under the hood, check Features → Tool Calling. Other editors (Cline, Continue, Roo Code) follow the same pattern — see the relevant guide under Integrations.

Use Cursor with ModelServer — Integration Guide — ModelServer