---
title: Cursor
description: Use OpenKnowledge with Cursor.
icon: custom/Cursor
---

OpenKnowledge plugs into Cursor through MCP plus an installed skill that teaches the agent how to use the tools.

## Install

<McpInstall editor="Cursor" />

## Approve the server

Cursor prompts you to approve a new MCP server when you next open the project. Approve `open-knowledge`. Until you do, the agent can't see the tools.

## Open with AI

From the editor, **Open with AI ▸ Cursor** dispatches the current file, folder, or project to Cursor. Two entry points: the sidebar's right-click menu (file / folder / empty space) and the macOS **File → Open with AI** menu. You can also hand the current doc to Cursor from the bottom **Ask AI** composer.

Cursor uses a two-step handoff: OpenKnowledge spawns `cursor <projectDir>` to open the workspace first, then fires the `cursor://` URL with a short prompt asking Cursor to open the target in OpenKnowledge's web preview. The agent then grounds the rest of the conversation through MCP. See [Editor → Open with AI](/docs/features/editor#open-with-ai) for the full UX.

In the web app, Cursor's spawn step runs through a local `POST /api/spawn-cursor` fallback, so the **Open with AI ▸ Cursor** row works there too — not just in the desktop app.

## Verify

Ask the agent:

<VerifyExec />

If it still doesn't see the tool after approval, restart Cursor so it picks up the new MCP entry. If it's still missing and `ok init` reported your config was `left unchanged`, OpenKnowledge couldn't parse `~/.cursor/mcp.json` safely and left it untouched — fix the config and re-run `ok init`.
