> ## Documentation Index
> Fetch the complete documentation index at: https://docs.logic.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor Integration

> Connect Logic MCP servers to the Cursor code editor

## Overview

Cursor is an AI-powered code editor with built-in MCP support. You can connect your Logic MCP server to make Logic agents available while you code.

## Prerequisites

* **Cursor** installed ([download here](https://cursor.com))
* **Logic MCP server** created ([Quick Start guide](/mcp/quick-start))
* **Server URL** from Logic organization settings

## Adding Logic MCP Server

### Using Cursor Settings

1. Open **Cursor Settings → Tools & MCP**
2. Select **New MCP Server** — this opens your `mcp.json`
3. Add your Logic server under `mcpServers` and save:

```json theme={null}
{
  "mcpServers": {
    "logic": {
      "url": "[MCP_SERVER_URL]"
    }
  }
}
```

**Parameters:**

* `"logic"` - A name to identify this server
* `"url"` - Your Logic MCP server URL from [organization settings](https://app.logic.inc/settings/organization-settings/mcp-servers)

<Note>
  Logic exposes a Streamable HTTP endpoint, so only the `url` field is required
  — no command or transport flag.
</Note>

### Editing the config directly

You can also edit the config file yourself, at either scope, using the same `mcpServers` entry shown above:

* **Project** — `.cursor/mcp.json` in your project root (available only in that project)
* **Global** — `~/.cursor/mcp.json` in your home directory (available in every project)

### Managing MCP Servers

Open **Cursor Settings → Tools & MCP** to view registered servers, and toggle Logic on or off. To remove it entirely, delete its entry from `mcp.json`.

## Using Logic Agents

Once configured, Logic agents are available in Cursor's chat.

### Verifying Your Connection

1. **Open Cursor Settings → Tools & MCP**
2. **Find your Logic server** in the list
3. **Confirm it shows as enabled** with its tools listed

If the server appears and its tools are listed, Logic agents are available for use. You can also check **Output → MCP Logs** (⇧⌘U) for connection status.

### Accessing Logic Agents

Cursor can automatically access your Logic agents based on the conversation context. You can:

* Ask Cursor to use specific Logic agents by name
* Let Cursor discover and suggest relevant Logic agents
* Execute Logic agents with parameters as needed

**Example usage:**

```
Can you run the "code-review" Logic agent on the current branch?
```

Cursor will execute the Logic agent and incorporate the results into its response.

<Info>
  Long-running Logic agents are handled asynchronously. Learn more about [async
  task execution](/mcp/async-tasks).
</Info>

## Next Steps

* [Learn about async tasks](/mcp/async-tasks) - Handle long-running Logic agents
* [Explore agent scope](/mcp/agent-scope) - Control tool availability
