> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/build/building-from-your-ai-agent/mcp-gateway/cursor.md).

# Cursor

Add fastn to Cursor with one click, sign in, and build integrations from Cursor's agent.

Add fastn to Cursor from the fastn dashboard, sign in once, then ask Cursor's agent for the integration.

{% hint style="info" %}
**Before you start:** sign in to Cursor. Its agent needs a Cursor account before it can use MCP servers.
{% endhint %}

## Add fastn

{% stepper %}
{% step %}

#### Click Add to Cursor

In fastn, click **Connect AI tools** in the top bar (or open **Embed → API keys and MCP** → **MCP server**), pick the **Cursor** tile and click **Add to Cursor**. When your browser asks to open Cursor, allow it.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-f2c14581436b0a469195e426b2a2172576a10ed1%2Fmcp-fastn-tab-cursor.webp?alt=media" alt="fastn&#x27;s MCP server page with the Cursor tile selected, showing an Add to Cursor button, a note about project-scoped servers, and a ~/.cursor/mcp.json snippet with an mcpServers fastn entry"><figcaption><p>The Cursor tile also has the config file, if you prefer to add it by hand.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Install the server

Cursor opens **Install MCP server?** with the name `fastn`, the type **Remote HTTPS** and the server URL `https://mcp.fastn.dev/fastn-workspace` filled in. Leave the headers and OAuth client fields empty and click **Install**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-a52601c38a48c2a2c14f500c7a23d071f748237c%2Fmcp-cursor-install-dialog.webp?alt=media" alt="Cursor&#x27;s Install MCP server? dialog with Name fastn, Type Remote HTTPS, Server URL https://mcp.fastn.dev/fastn-workspace, empty HTTP headers, Client ID and Client Secret fields, and Cancel and Install buttons"><figcaption><p>fastn signs you in with OAuth, so no header or client ID is needed.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Authenticate

Cursor lists fastn under **Needs Attention** with *Needs authentication*. Click **Authenticate**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-bced7c1647115f834442de262753af848151c43c%2Fmcp-cursor-needs-auth.webp?alt=media" alt="Cursor&#x27;s MCPs list with fastn under Needs Attention, marked Needs authentication, and an Authenticate link"><figcaption><p>Find this list again under <strong>Customize</strong> → <strong>MCPs</strong>.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Pick the workspace

fastn opens in your browser. Sign in if asked. If you belong to more than one fastn org, pick the workspace Cursor works in and click **Connect**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-a7aff294ce34c51d20a049bafd46314a06d2460b%2Fmcp-cursor-choose-workspace.webp?alt=media" alt="fastn&#x27;s page titled Which workspace should Cursor use?, with The org selected in fastn chosen, a list of orgs and a Connect button"><figcaption><p><strong>The org selected in fastn</strong> follows whichever org you have open in the fastn dashboard; picking a named org pins Cursor to it.</p></figcaption></figure>

The browser shows *Authorization complete!* Click **Return to Cursor**. fastn moves to **Connected** in Cursor's list.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-f0a71ebb5ac31e3affb42ef6eb2f542578f03015%2Fmcp-cursor-auth-complete.webp?alt=media" alt="A browser page reading Authorization complete! You can close this tab and return to Cursor, with a Return to Cursor link"><figcaption><p>You can close this tab.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Use it

Start a new chat with Cursor's agent and ask for the outcome in one sentence. To check the connection first, ask *What can fastn do for me?* Cursor asks before it runs a fastn tool; approve it.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-dabfc2430adf828422cb7a72e6de27c6deaff019%2Fmcp-cursor-agent-answer.webp?alt=media" alt="Cursor&#x27;s agent answering What can fastn do for me? with Fastn is the integration layer you can drive from this chat, followed by a list: talk to connected apps, build integrations"><figcaption><p>Cursor answers from the fastn workspace you picked.</p></figcaption></figure>

From here Cursor works through the same steps as every agent: see [Building from your AI agent](https://docs.fastn.ai/build/building-from-your-ai-agent.md).

## Add it by hand

Add fastn to `~/.cursor/mcp.json` for every project, or to `.cursor/mcp.json` in a repository for that project only:

```json
{
  "mcpServers": {
    "fastn": {
      "url": "https://mcp.fastn.dev/fastn-workspace"
    }
  }
}
```

Cursor then lists fastn under **Customize** → **MCPs** with **Authenticate**. Continue from step 3.

## Troubleshooting

* **fastn shows Connected but 0 tools enabled.** The tool list is still loading. Wait a few seconds or reopen **Customize** → **MCPs**.
* **The agent does not use fastn.** Check fastn is under **Connected** in **Customize** → **MCPs**, then name fastn in your message, for example *Using fastn, …*.
* **Cursor works on the wrong org.** Remove fastn from **Customize** → **MCPs**, add it again and pick the workspace when you authenticate.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/build/building-from-your-ai-agent/mcp-gateway/cursor.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
