Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
---
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.
Claude Desktop's regular chat can use the tools too — see [Claude Desktop chat](#claude-desktop-chat).
## Install
<McpInstall editor="Claude Code" />
## 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 **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 edit `~/.claude.json` safely and left it untouched — the summary names the reason in parentheses; fix the config and re-run `ok init`.
OpenKnowledge Beta registers as `open-knowledge-beta` instead; see [Beta uses its own entry](/docs/reference/what-open-knowledge-writes#beta-uses-its-own-entry).
## 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.
## Scheduled runs
Claude Code can work your knowledge base on a schedule (a nightly consolidation pass, a morning meeting sync) without OpenKnowledge shipping a scheduler of its own. Three tiers, as of August 2026. Anthropic's scheduler surfaces are moving quickly, so check the linked docs before you rely on a specific limit:
- **[Desktop scheduled tasks](https://code.claude.com/docs/en/desktop-scheduled-tasks).** Claude Desktop's **Routines** page schedules local runs (choose **Local** when creating one) down to the minute. They see your local files and MCP servers, so an OK project works as-is. Tasks fire only while the app is open and your computer is awake.
- **[Cloud routines](https://code.claude.com/docs/en/routines) (`/schedule`).** These run on Anthropic's infrastructure against a fresh clone of a GitHub repo and see only what is committed: no local files, no locally-registered MCP servers. Reaching OK from a routine takes both halves, a committed `.mcp.json` declaring `open-knowledge` and a setup script in the routine's environment that installs the CLI. New projects keep OpenKnowledge's config out of git by default, which leaves `.mcp.json` in `.git/info/exclude` where a clone never sees it. Run `ok config-sharing share` in the project to commit it before relying on this tier. Minimum schedule interval is one hour.
- **OS cron + `claude -p`.** A plain cron job running `claude -p "<prompt>"` in the project loads the committed skill, `.mcp.json`, and CLAUDE.md the same way an interactive session does. That depends on `-p` staying non-bare: [`--bare`](https://code.claude.com/docs/en/headless) skips MCP server discovery, and Anthropic has said it will become the default for `-p` in a future release. Pass `--mcp-config .mcp.json` explicitly if you want the job to survive that change.
See [Ingest meetings](../workflows/meeting-ingestion.mdx#automatically-on-a-schedule) for a worked example.
## Claude Desktop chat
`ok init` and the consent dialog also register the MCP server with Claude Desktop when it's installed — user-level, in `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows. Claude Desktop picks up the entry only after you quit and relaunch it.
After relaunching, ask in any chat:
<VerifyExec subject="Claude Desktop" />