Connect OpenAI to Cursor

Call models, embeddings, files, and vector stores. Add Toolspoke to Cursor once and it can use 10 OpenAI actions. Your OpenAI credential stays in Toolspoke, and you choose which actions Cursor may call.

Set it up in Cursor

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Cursor

    ~/.cursor/mcp.json, or .cursor/mcp.json for one project

    { "mcpServers": { "toolspoke": { "url": "https://toolspoke.com/mcp" } } }

    Cursor completes the sign-in in a browser tab the first time it connects.

  2. Install OpenAI and connect it

    Add OpenAI to a project in your Toolspoke workspace.

    API key. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    API key
    platform.openai.com → API keys
  3. Choose what Cursor may do

    All 10 actions start on. Switch off any of the 2 actions that change something in OpenAI, and Cursor gets a refusal if it tries.

What you can ask Cursor for

A few of the OpenAI actions that only read, so they are safe to try first.

  • List the models this API key can call
  • Create embedding vectors for one or more strings, for similarity search or clustering
  • Classify text (and image URLs) against OpenAI's safety categories before you publish or forward it
  • List files uploaded to this OpenAI account, newest first

What Cursor can do in OpenAI

8 actions read and 2 write.

Reads

  • List models

    List the models this API key can call. Use before `responses` or `embeddings` when you are unsure a model id exists for this account. Optionally filter by substring; returns at most `limit` entries.

  • Embeddings

    Create embedding vectors for one or more strings, for similarity search or clustering. Defaults to 256 dimensions to keep the response readable, raise `dimensions` when you are storing the vectors.

  • Moderate

    Classify text (and image URLs) against OpenAI's safety categories before you publish or forward it. Returns per-input `flagged`, category booleans, and confidence scores.

  • List files

    List files uploaded to this OpenAI account, newest first. Use it to find the file id for retrieve_file or to check what a vector store was built from.

  • Retrieve file

    Fetch one file's metadata: name, bytes, purpose, and status. Call download_file to read its contents.

  • Download file

    Download a file's contents as text, truncated to 10000 characters. Only useful for text formats such as .txt, .md, .json, or .jsonl, call retrieve_file first for its name, size, and purpose.

  • List vector stores

    List the vector stores on this account with their file counts and sizes. Use it to find the vector_store_id that search_vector_store needs.

  • Search vector store

    Semantic search over the files in one vector store. Returns the matching chunks with their scores and source filenames, use this to ground an answer in the account's own documents.

Writes

  • Responses

    Generate a model response with the Responses API. Use for text generation, structured JSON output, reasoning, and built-in tools like web_search. Returns the full response object plus a flattened output_text field. Streaming is not supported here.

  • Generate image

    Generate images from a text prompt. The default dall-e-3 returns a temporary URL, which is cheap to pass around; gpt-image-* models return base64 bytes, which are omitted unless you set return_base64.

OpenAI in Cursor: questions

Does Cursor see my OpenAI credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Cursor only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Cursor from changing things in OpenAI?

Yes. Each of the 10 actions can be switched off for a project. Turn off the 2 that change something and Cursor can only read.

Will 10 actions crowd Cursor's context?

No. Toolspoke shows Cursor five bridge tools, plus a guide where a toolkit has one, and Cursor searches for the OpenAI action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Should it go in every project or just one?

Either. Put the block in ~/.cursor/mcp.json to have Toolspoke in every project, or in .cursor/mcp.json inside one project to keep it there.

What does it cost?

Tool calls are free on every plan, and a OpenAI call does not run in a sandbox, so it bills nothing.

Try OpenAI in Cursor

Free to start, and tool calls cost nothing on any plan.