Markdown knowledge graph — LSP for your editor, CLI + MCP memory for your AI agents
Markdown knowledge graph — LSP for your editor, CLI + MCP memory for your AI agents
Turn your thinking into queryable context IWE turns a directory of markdown files into a knowledge graph — a connected structure you browse from your editor and your AI queries from the command line. Same files, same links, two interfaces. No cloud, no database, no lock-in. Version everything with git.
IWE is for people who want database-style queries on their notes — "all drafts under this subtree", "every accepted decision in Q1" — without moving them into an actual database. Write in Markdown, structure with links, give AI agents the tools to navigate your knowledge. IWE itself has no built-in AI — it works alongside Claude, Codex, Gemini, and any tool that speaks the Model Context Protocol.
.md files in a local directory. Read them, edit them, git push them. Nothing proprietary.iwe init --okf scaffolds a conformant bundle, iwe schema validate checks conformance mechanically, and iwe find --filter '{type: …}' queries OKF frontmatter directly.IWE treats your notes as a connected structure. You organize them with two types of links:
This structure makes retrieval powerful — whether you're browsing in your editor or an agent is querying via CLI, ask for a topic and get its full context in a single call.
IWE gives AI agents structured access to your notes through two interfaces: a CLI for scripting and shell-based workflows, and an MCP server for native connection with AI tools. Both expose the same operations — search, retrieve, create, refactor — so you can choose whichever fits your setup.
IWE pairs search with structure: built-in fuzzy and full-text search finds the entry point, and the graph turns a hit into usable context — parent context, children, cross-references, link-safe refactoring. It also composes cleanly with any external tooling you already use (ripgrep, full-text, vector): whatever finds the note, IWE supplies the context around it.
Agent writes are checked, not trusted:
expect guards stating how many documents and blocks it may touch. The whole update validates before anything is written; a mismatch aborts with the offending blocks named. Over MCP the guards are mandatory — an edit that won't declare its blast radius is refused.iwe schema validate runs the same checks on demand.iwe stats similarity flags near-duplicates.IWE includes a server (iwec) that lets AI tools like Claude Desktop, Cursor, and Windsurf work directly with your notes using the Model Context Protocol. The server watches your files for changes, so edits you make in your editor are reflected immediately.
The CLI lets you (and AI agents) work with your notes from the terminal or in scripts.
Example: preparing context for an AI conversation
iwe find --fuzzy auth
iwe retrieve --key authentication --expand-includes 2
iwe tree --key oauthCore commands:
| Command | What it does |
|---|---|
find |
Search with fuzzy and full-text ranking, plus filters over frontmatter and graph edges |
retrieve |
Get a document with its linked context in one call |
tree |
Show the hierarchy from any starting point |
update |
Guarded edits: frontmatter changes and targeted block operations |
schema |
Infer the store's schemas, or validate documents against them |
The full set — new, extract, inline, rename, delete, squash, stats, normalize, export and more — is in the CLI Reference.
More information: Working with AI · CLI Reference · MCP Server
IWE gives your editor IDE-like features for markdown notes. It works with VS Code, Neovim, Zed, Helix, and any editor that supports the Language Server Protocol (LSP).
More information: Editor Features
Install the CLI and LSP server:
Using Homebrew (macOS/Linux):
brew install iwe-org/iwe/iweOr using npm (macOS/Linux/Windows):
npm install -g @iwe-org/iweOr using Cargo:
cargo install iwe iwes iwecOr from conda-forge (community-maintained — thanks, salim-b):
conda install -c conda-forge iweInitialize your workspace:
cd ~/notes
iwe initPick your path:
Set up your editor — VS Code · Neovim · Helix · Zed
Connect your AI agent — point it at the MCP server. iwec serves the directory it runs in, so set the working directory to your notes:
{
"mcpServers": {
"iwe": {
"command": "iwec",
"cwd": "~/notes"
}
}
}No install needed — npx fetches the server on demand:
{
"mcpServers": {
"iwe": {
"command": "npx",
"args": ["-y", "@iwe-org/mcp"],
"cwd": "~/notes"
}
}
}Give Claude Code memory — install the plugin, then run /iwe:init in the repository you want remembered:
/plugin marketplace add iwe-org/skills
/plugin install iwe@iwe-orgOr hand the setup to the agent — paste this into Claude Code or any agent with shell access:
Set up IWE for my notes: install it (brew install iwe-org/iwe/iwe,
npm install -g @iwe-org/iwe, or cargo install iwe iwes iwec), run `iwe init`
in my notes directory, then add the `iwec` MCP server with its working
directory set to that folder.
Docs: https://iwe.md/docs/agentic/IWE is open source and community-driven. Join the discussions, report issues, or contribute to the documentation.
Community: Twitter/X · Reddit · Discussions
Editor plugins: VS Code · Neovim · Zed
Workspace templates: marketing-workspace — campaign memory for a marketing agent · dev-workspace — project memory for a coding agent. Both ship as conformant OKF v0.2 bundles, validated in CI on every commit.
Agentic skills: iwe-org/skills — the Claude Code memory plugin and the skills for knowledge graph management, usable from any agent runtime. Contributors welcome.
Building on IWE: projects already embed IWE — as an agent-memory backend, as the graph layer of an LLM wiki engine, in research tooling. The practical integration surfaces today are the CLI and the MCP server; the liwe library is published but not yet API-stable, so pin your version if you build against it. A declared, stable integration surface is on the roadmap — if you're building on IWE, tell us what you depend on, so we know what not to break.
No open issues yet, or sync has not completed.