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

# Cursor

Connect [Cursor](https://cursor.com/docs/context/mcp) to BalkanID MCP.

**OAuth is preferred.** API keys remain available for Read-only or static-token setups.

### One-click (OAuth — recommended)

1. Open <https://mcp.balkanid.app>, sign in, and confirm the correct **tenant**.
2. In **OAuth Connectors**, click **Connect to Cursor**.
3. Approve the Cursor deeplink install when prompted.
4. Complete BalkanID sign-in and consent.
5. Confirm the BalkanID MCP server is enabled in [Cursor's MCP settings](https://cursor.com/help/customization/mcp).

{% hint style="info" %}
OAuth currently requires **both Read and Write** scopes. See Authentication and Permissions.
{% endhint %}

### Manual configuration (OAuth fallback)

If the deeplink fails, add an HTTP MCP server in [Cursor's `mcp.json`](https://cursor.com/docs/context/mcp) with:

```json
{
  "BalkanID MCP Server": {
    "url": "https://mcp.balkanid.app/server/mcp",
    "type": "http"
  }
}
```

Then complete OAuth when Cursor prompts you to authenticate.

### One-click (API key)

1. Create an API key in the MCP UI.
2. Open **Connect → Connect to Cursor** for that key.
3. Follow the one-click install (includes the Bearer header).

### Manual configuration (API key fallback)

```json
{
  "BalkanID MCP Server": {
    "url": "https://mcp.balkanid.app/server/mcp",
    "type": "http",
    "headers": {
      "Authorization": "Bearer YOUR_TOKEN_HERE"
    }
  }
}
```

Replace `YOUR_TOKEN_HERE` with the token from the MCP UI. Use a Read-only key when you only need discovery tools.

### Verify

Ask Cursor: “Call whoami on BalkanID MCP.” You should see your email and tenant ID.

### Official documentation

Cursor documentation for MCP servers:

* [Model Context Protocol (MCP)](https://cursor.com/docs/context/mcp) — Cursor Docs
* [How to install an MCP server](https://cursor.com/help/customization/mcp) — Cursor Help


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.balkan.id/balkanid-mcp/installation-and-setup/cursor.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
