---
title: Claude
description: Use OpenKnowledge with Claude Code, in the CLI or the Claude Desktop app.
icon: custom/Claude
---

OpenKnowledge works with Claude Code through MCP plus an installed skill that teaches the agent how to use the tools. Both surfaces are supported:

- **Claude Code CLI** — the `claude` command in your terminal.
- **Claude Desktop app** — Claude Code in the **Code** tab.

## Install

<McpInstall editor="Claude Code" />

If you installed the OpenKnowledge desktop app from the macOS DMG, a consent dialog runs on first launch and offers to wire up the MCP-capable agents it detects, Claude Code included — click **Add**. To re-trigger it, delete `~/.ok/mcp-status.json` and relaunch.

## Open with AI

From the editor, **Open with AI ▸ Claude** dispatches the current file, folder, or project to Claude Code in one click. 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 Claude from the bottom **Ask AI** composer.

Claude Code receives a short prompt asking it to open the target in OpenKnowledge's web preview, then grounds the rest of the conversation through MCP. See [Editor → Open with AI](/docs/features/editor#open-with-ai) for the full UX.

## Verify

Open the project in Claude Code and ask:

<VerifyExec subject="Claude Code" />

If Claude Code doesn't use the OpenKnowledge `exec` tool, restart it 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 `~/.claude.json` safely and left it untouched — fix the config and re-run `ok init`.

## Live editing

When Claude Code writes to a doc, you'll see the change land live in OpenKnowledge. Just ask Claude Code to open it for you.
