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

# Connect Cursor

Connect the Dapta MCP to Cursor. Add a Dapta server and sign in with your Dapta account, or add an entry with an API key to your Cursor MCP config.

Cursor reads its MCP servers from a JSON config file. You add a Dapta entry once, and then either sign in with your Dapta account or use an API key. Signing in is the recommended way for people, and there is nothing else to install.

***

## Option A: sign in with your Dapta account

**Step 1:** In Cursor, open **Customize**, then **MCPs**, then **New MCP Server**, and choose **User**. `mcp.json` opens. Paste this and save:

{% code title="mcp.json" overflow="wrap" %}

```json
{
  "mcpServers": {
    "dapta": {
      "url": "https://mcp.dapta.ai/mcp"
    }
  }
}
```

{% endcode %}

If the file already has an `mcpServers` block, add `dapta` alongside your existing servers.

{% hint style="info" %}
**Shortcut:** if Cursor is already installed, the **Add to Cursor** button on the **MCP Access** page of the Dapta admin panel does this step for you.
{% endhint %}

***

**Step 2:** **dapta** shows up with **Needs authentication**. Click **Authenticate**. In the browser you will see a notice that the redirect goes to `localhost`: that is Cursor on your own computer. Click **Allow access**, sign in with your Dapta account, then click **Open Cursor**.

***

**Step 3:** Open a **New Chat** and ask, for example:

> **List my agents in Dapta**

Cursor asks before it runs a Dapta tool: click **Run** or **Always Run**. If your account has several workspaces, Cursor lists them by name and asks which one to work in.

***

## Option B: API key

Use this for scripts, or when you want the connection fixed to one workspace.

**Step 1:** [Create your API key](https://docs.dapta.ai/dapta-mcp/setup/mint-your-api-key.md). The **Save your new MCP key** dialog shows it once, along with a ready-made Cursor entry. Copy either one and keep the key somewhere safe.

***

**Step 2:** Add the entry below to your Cursor MCP config. Use `~/.cursor/mcp.json` to make it available in every project, or `.cursor/mcp.json` inside a single project. Replace `<your-key>` with your key.

{% code title="\~/.cursor/mcp.json" overflow="wrap" %}

```json
{
  "mcpServers": {
    "dapta-ai": {
      "url": "https://mcp.dapta.ai/mcp",
      "headers": { "x-api-key": "<your-key>" }
    }
  }
}
```

{% endcode %}

***

**Step 3:** Open **Cursor Settings**, find the `dapta-ai` server under **MCP**, and enable it. Then ask:

> **Who am I in Dapta?**

The key fixes the workspace, so Cursor never asks which one to use. There is no extra install step: Cursor sees every Dapta tool as soon as it connects.

***

## Other clients

Any MCP client that supports sign-in can connect to `https://mcp.dapta.ai/mcp` and log in with your Dapta account. Clients that cannot sign in can send a key instead: `x-api-key: <your-key>` (or `Authorization: Bearer <your-key>`).

***

{% hint style="success" %}
**Your data stays safe.** When Cursor changes something, it shows you a preview first and waits for your confirmation. Reading information never needs confirmation.
{% endhint %}

{% content-ref url="/pages/y0N0ytQ0C9FIgnF9BZoY" %}
[Verify your connection](https://docs.dapta.ai/dapta-mcp/setup/verify.md)
{% endcontent-ref %}


---

# 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.dapta.ai/dapta-mcp/setup/connect-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.
