Skip to main content
Glama

om — Plugin-based Knowledge Base (Rewritten from Foam)

Cut the 66 modules of Super Brain v4 down to just the knowledge base core, rewritten on top of Foam, and plugin-based the DeepSeek Harness way:

  • Obsidian compatible — your vault is the knowledge base: plain markdown files + [[wikilinks]] + #tags + frontmatter

  • Zero dependencies — only uses Node's built-in node:sqlite (FTS5 full-text search, built-in Chinese tokenization)

  • Plugin-based — the core exposes a stable interface, users write their own plugins to extend (commands / MCP tools / events / index extractors)

  • AI-ready — MCP stdio server, directly callable from Claude Code / Cursor

Inspired by Foam (MIT): the wikilink parsing semantics and graph model are deeply inspired by it. This project is an independent rewrite (zero dependencies, no runtime dependencies), not a code fork.

Quick Start

cd ~/om
./core/cli.js init demo          # 初始化(demo 已有示例笔记)
./core/cli.js scan --vault demo  # 建索引
./core/cli.js search 图谱 --vault demo
./core/cli.js rename 图谱 知识图谱 --vault demo   # 重命名,全库双链自动更新
./core/cli.js deadlinks --vault demo             # 死链检查
./core/cli.js orphans --vault demo               # 孤岛笔记
./core/cli.js daily --vault demo                 # 今日笔记
./core/cli.js graph 插件系统 --vault demo
./core/cli.js backlinks 记忆系统 --vault demo
./core/cli.js tags --vault demo

Daily usage: cd <your-vault> && om search xxx (after npm link, the om command is available globally).

Related MCP server: mcp-vault-reader

MCP Integration (Claude Code)

// ~/.claude.json 的 mcpServers
{
  "om": {
    "command": "node",
    "args": ["/data/data/com.termux/files/home/om/core/cli.js", "mcp", "--vault", "/path/to/vault"]
  }
}

Built-in tools: search_notes / read_note / create_note / update_note / rename_note / delete_note / backlinks / graph_bfs / list_notes / list_tags, plus tools registered by plugins.

Architecture

vault/                        你的 Obsidian 库(文件即真身)
  .om/config.json             配置(插件开关等)
  .om/index.db                SQLite 索引(可随时删除重建)
  .om/plugins/                你的插件放这里
om/
  core/
    vault.js                  解析 frontmatter / [[双链]] / ![[嵌入]] / #标签
    tokenize.js               中文分词(CJK 单字+双字)+ FTS 查询构造
    db.js / indexer.js        SQLite 索引 + 增量扫描
    graph.js                  图谱查询(邻居 / backlinks / BFS)
    context.js                插件上下文(全部暴露接口)
    plugins.js                插件加载器(dsh 式)
    cli.js / mcp.js           CLI 与 MCP stdio 服务器
  plugins/                    内置示例插件(recent / todos)

Plugin Authoring Guide (Exposing the Interface)

A plugin = a JS file (ESM), default export { name, version, description, activate(ctx) }. Drop it in <vault>/.om/plugins/my-plugin.js, restart any om command and it takes effect. Set "plugins": {"my-plugin": false} in config.json to disable it.

Two quick commands:

om plugin create my-plugin    # 生成插件模板
om plugin install https://github.com/xxx/om-plugin-repo   # 从 git 仓库安装(仓库根目录需含 index.js)

activate(ctx) gives you the full API:

Interface

Description

ctx.notes

get(name) / search(q,{limit}) / create(name,{folder,content,tags}) / update(name,content) / remove(name) / list({tag})

ctx.graph

resolve(name) / neighbors(ref) / backlinks(ref) / bfs(ref,depth)

ctx.tags

list() / notes(tag)

ctx.storage

get/set/del(key) — plugin-private KV (namespaced per plugin)

ctx.events

on('note:save'|'note:delete', fn) — cross-plugin shared event bus

ctx.commands

register('name', async (args) => output) — add a new CLI subcommand

ctx.tools

register({name,description,inputSchema}, handler) — add a new MCP tool

ctx.index

register(({id,name,frontmatter,body,text}) => ({tags?,links?})) — index extractor, custom logic for extracting knowledge from notes

ctx.health

deadlinks() unresolved links / orphans() orphan notes

ctx.db

Raw SQLite handle (advanced)

ctx.vaultRoot / ctx.plugin

vault path / plugin name

Minimal Plugin Example

// <vault>/.om/plugins/hello.js
export default {
  name: 'hello',
  activate(ctx) {
    ctx.commands.register('hello', async () => `你好,库里有 ${ctx.db.prepare('SELECT COUNT(*) c FROM notes').get().c} 篇笔记`);
  },
};
$ om hello --vault demo
你好,库里有 5 篇笔记

Full examples in plugins/recent.js (commands + tools + storage + events) and plugins/todos.js (frontmatter / tag queries).

Testing

cd ~/om && node --test

Coverage: tokenization / vault parsing / indexing & incremental updates / graph / full plugin API / MCP end-to-end protocol.

Differences from Super Brain v4

Super Brain v4

om

Modules

66

10 core files + plugins

Architecture

6-channel cognitive neural system

pure knowledge base + dsh-style plugins

Storage

multiple custom stores

Obsidian-compatible markdown (files are the source of truth)

Dependencies

npm + pip + daemon

zero dependencies (node:sqlite)

Extensibility

not programmable

exposes interfaces, users write plugins

Known Limitations (Honest Disclosure)

  • Search is literal matching (FTS5 + Chinese single/double-character tokenization), not semantic search; synonym/concept search requires plugins or an external vector service

  • update_note automatically preserves the original frontmatter when updating the body; to overwrite the whole file, pass the --- frontmatter along with it

  • Renaming (rename / rename_note) automatically updates wikilinks pointing to it across the vault, but does not rewrite plain-text mentions in other files

  • Single-process design, no distributed/multi-device sync (the vault itself is plain files, so you can sync it yourself with git)

  • The index is a filesystem snapshot; after external editor changes, run om scan (or om watch) to refresh

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to manage a personal markdown-based knowledge base with natural language interactions. Supports creating, searching, updating, and organizing notes across categories like people, recipes, meetings, and procedures.
    11
    1
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to search, read, and traverse Markdown note vaults (Obsidian-compatible) with full-text search, backlinks, knowledge graphs, and a persistent memory system for cross-session context.
    16
    9
    2
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables reading, writing, searching, and managing Obsidian vault notes through MCP tools and prompts, allowing AI agents to interact with local knowledge bases.
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to list, search, read, and append to Markdown notes through MCP tool calls, making it easy to interact with a second brain folder.

View all related MCP servers

Related MCP Connectors

  • Markdown-based note-taking with a hosted MCP server. Your notes serve you and your AI.

  • Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.

  • Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xuanlinAI/overmind-slim'

If you have feedback or need assistance with the MCP directory API, please join our Discord server