Open KnowledgeOpen Knowledge

MCP

Tools the Open Knowledge MCP server exposes to AI agents.

The MCP server gives AI agents structured access to your knowledge base. Most read tools work without the editor running — grep, read_document, exec, and the link-graph tools all operate on disk. The search tool needs the server because it reuses the cmd-K Orama corpus; if the server is down it returns an error suggesting grep as a server-free alternative. Write tools require the editor — Open Knowledge starts it for you on the first write.

Tools

ToolPurpose
read_documentRead a doc with its frontmatter, backlinks, and recent history
searchRanked workspace search (title boost + body BM25 + recency — same engine the cmd-K palette uses)
grepLiteral-string search across content, grouped by file, with frontmatter enrichment
list_documentsList every doc
execRead-only shell (ls, cat, grep, find, head, tail, wc, sort, uniq, cut)
write_documentWrite a full doc, including frontmatter
edit_documentFind-and-replace inside a doc body
delete_documentDelete a doc
rename_documentRename a doc and rewrite its inbound links
rename_folderRename a folder and rewrite every affected link
get_historyVersion timeline for a doc
save_versionSnapshot the project at a named checkpoint
rollback_to_versionRestore a doc to an earlier version
get_backlinks / get_forward_linksWiki-link graph queries
get_hubs / get_orphans / get_dead_linksLink-graph diagnostics
suggest_linksSuggest missing wiki-links for a page
ingestCapture an external URL or file as reference material
researchGather sources and write provisional findings
consolidatePromote research into a canonical article
get_configRead .ok/config.yml
set_folder_ruleSet default frontmatter for a folder
write_template / delete_templateManage .ok/templates/

Editing frontmatter

Use write_document for frontmatter edits — pass the full document, including the ---\n…\n--- block. edit_document is body-only and refuses find/replace patterns that touch frontmatter.

Edit summaries

The five write tools (write_document, edit_document, rename_document, rename_folder, rollback_to_version) accept an optional summary describing the intent of the edit — e.g. "Fixed token-refresh race". Summaries appear on the document's timeline so readers can scan recent agent activity.

Cap is 80 characters. Avoid secrets and PII; summaries persist to git history.

Every tool that returns a docName also returns a previewUrl pointing at that doc in the editor. Open it once per session — the editor refocuses automatically on subsequent writes.