← Back to directory
I

IWE

Official
Turn a folder of Markdown notes into a queryable knowledge graph for you and your AI agents
GitHub source repository ↗
★ 1.6k Stars Category · Filesystem Very popular
56FMRS · C

IWE is an Apache-2.0, Rust-built, local-first knowledge graph and memory system that turns a markdown directory into a graph and exposes it through an editor LSP plus a CLI and an MCP server (iwec over stdio, also runnable via npx as @iwe-org/mcp). It pairs fuzzy/full-text search with graph structure so one retrieve call returns parent context, children, and cross-references, and it enforces declared blast-radius guards and schema validation on agent writes. It suits people who keep knowledge as plain markdown and want AI agents retrieving structured context rather than similarity guesses; it is not for those wanting cloud hosting, a built-in AI model, or a stable library-level API. The main risks are the agent's write access to the notes directory and the network dependency introduced by running the server through npx.

Reliability
8/20
Security and permissions
11/20
Maintenance
13/20
Documentation
13/20
Setup experience
11/20
Read the FMRS scoring method →

IWE is a memory system for people and their AI agents: it turns a directory of markdown files into a knowledge graph. Notes stay as plain .md files in a local directory — no cloud, no database, no lock-in, versionable with git. The same graph has two interfaces: an LSP server for editors (VS Code, Neovim, Zed, Helix, and any LSP-capable editor) and a CLI plus an MCP server (iwec) for AI agents. The MCP server watches the files it serves, so edits made in your editor are reflected immediately. IWE has no built-in AI; it works alongside Claude, Codex, Gemini, and any tool that speaks the Model Context Protocol. Retrieval is by structure rather than similarity guessing: search finds an entry point, and retrieve/tree supply parent context, children, and cross-references in a single call. Agent writes are checked, not trusted — over MCP every mutation must declare expect guards stating how many documents and blocks it may touch, the whole update validates before anything is written, and a mismatch aborts with the offending blocks named. Frontmatter and document structure are validated against per-type document schemas, and mutations surface warnings for dangling links and orphan pages. Written in Rust under the Apache-2.0 license.

Tools

find
Search notes with fuzzy and full-text ranking, plus filters over frontmatter and graph edges.
retrieve
Get a document together with its linked context in one call.
tree
Show the note 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.

Setup

  1. Install the CLI and the LSP/MCP server: Homebrew with brew install iwe-org/iwe/iwe; npm with npm install -g @iwe-org/iwe; Cargo with cargo install iwe iwes iwec; or conda-forge with conda install -c conda-forge iwe.
  2. Initialize your workspace: cd into your notes directory and run iwe init.
  3. Connect your AI agent: iwec serves the directory it runs in, so set the working directory to your notes, e.g. {"mcpServers":{"iwe":{"command":"iwec","cwd":"~/notes"}}} in the client config.
  4. No local install needed — have npx fetch the server on demand: set command to npx, args to ["-y", "@iwe-org/mcp"], and keep cwd pointing at your notes.
  5. Optional: give Claude Code memory by adding the plugin marketplace with /plugin marketplace add iwe-org/skills, installing /plugin install iwe@iwe-org, then running /iwe:init in the repository you want remembered.
claude_desktop_config.json
{
  "mcpServers": {
    "iwe": {
      "command": "iwec",
      "cwd": "~/notes"
    }
  }
}

Fit and risk

Best for

  • Individuals whose knowledge lives in plain markdown files and who value local-first, git-versioned notes.
  • AI agent users who want their note graph as agent memory and want retrieval by structure rather than similarity guessing.
  • Developers and writers who use both an editor LSP workflow and the command line over the same notes.
  • Teams that need agent writes to declare their blast radius and to pass schema and graph-hygiene checks.

Not for

  • People who want a cloud-hosted notes or memory service with no local file directory.
  • Users expecting the server to include its own AI model or inference — IWE has no built-in AI and must be paired with an external agent.
  • Scenarios that only need generic vector search and do not care about note hierarchy or link structure.
  • Builders who need a stable library-level API — the liwe crate is published but not yet API-stable.

Required permissions

  • Read markdown note files under the working directory the server is started in.
  • Write and modify note files in that directory, including creating, renaming, deleting, refactoring, and targeted block updates.
  • Watch the notes directory for file changes so editor edits are reflected immediately.
  • Communicate over stdio with MCP clients; running via npx requires network access to fetch the @iwe-org/mcp package.

Risks and side effects

  • The agent holds write access to the notes directory; MCP writes must declare expect guards and validate before writing, but permitted changes still land on disk.
  • Pointing the MCP server at the wrong working directory lets the agent read and write markdown files in an unintended folder.
  • Using npx fetches an npm package from the network on first run, adding a dependency on the network and the upstream package.
  • Validation covers schemas, frontmatter, and graph-hygiene warnings, but dangling links, orphan pages, and near-duplicates are surfaced as warnings and still need human judgement.
  • The liwe crate in the repository is published but not yet API-stable, so projects building on it should pin versions.

Troubleshooting

  1. The agent sees the wrong set of notes: check that cwd in the MCP config points at the real notes directory, since iwec serves only the directory it runs in.
  2. Editor changes are not picked up immediately: confirm the MCP server process is running; it watches files for changes.
  3. An MCP write is rejected: read the named violation in the response — usually a missing mandatory expect guard or a document-schema violation (required fields, enums, ISO dates, required sections).
  4. Command-line checks disagree with MCP behaviour: run iwe schema validate on the CLI to reproduce the same checks on demand.
  5. npx fails to start: verify network access, or switch command to a locally installed iwec that is on PATH.
  6. Links or structure look wrong: watch for dangling-link and orphan-page warnings from mutations, and use iwe stats similarity to flag near-duplicates.
  7. Nothing is queryable on first use: run iwe init in the notes directory to initialize the workspace.

Use cases

Use a local markdown notes directory as long-term memory for a coding agent or a conversational agent.
Run database-style queries on notes without moving them into a database — "all drafts under this subtree", "every accepted decision in Q1".
Let agents perform the same search, retrieve, create, and refactor operations through either the CLI or the MCP server.
Get IDE-like features in the editor: link autocomplete, go to definition, backlinks, rename with automatic link updates, extract, and inline.
Scaffold, validate, and query conformant Open Knowledge Format (OKF) bundles of markdown with YAML frontmatter.

Supported clients

Claude CodeFull support
Claude DesktopFull support
CursorFull support
WindsurfFull support