knowledge-base-server MCP
An MCP server and REST API with shared memory for Claude Code, Codex and Gemini: Obsidian notes, sessions, bug fixes, lean search.
- 190 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The server reads your notes vault, writes new notes into it and opens a password-protected dashboard on port 3838.
- Note text is sent to an external model API for classification.
Install
- Works in
Manual install
git clone https://github.com/willynikes2/knowledge-base-server.gitThe first command of the Install section. Then `npm install`, `npm link` and `kb setup`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The server reads your notes vault, writes new notes into it and opens a password-protected dashboard on port 3838.
- Note text is sent to an external model API for classification.
This is third-party code. Review the repository files before installing.
What it does
knowledge-base-server gathers knowledge into one SQLite database with full-text and semantic search and serves it to agents over MCP and REST. Sources include an Obsidian vault with two-way sync, YouTube transcripts, web articles, terminal sessions and notes about fixed bugs. `kb_classify` labels raw notes, `kb_promote` turns them into lessons and decisions, and `kb_synthesize` looks for common patterns. Memory is split into hot, warm and cold tiers: active context comes first, raw material only on request. `kb_context` returns a short digest and saves over 90 percent of tokens. In local mode there is a message bus between models and a mistake ledger, and `kb_safety_check` compares a risky action against the database history.
Who it is for. People who run several agents and keep notes in Obsidian and want the agents to remember past decisions and bug write-ups.
Good fit when
- An agent relearns how auth was fixed yesterday from a bug note.
- Claude Code needs a short project digest without loading all notes.
- A YouTube transcript and a web article are saved to the database and searched later.
- Claude Code, Codex and Gemini CLI share one knowledge base.
- A command is checked against error history before data is deleted.
Not a fit when
- You do not want to run a server; the author has a paid hosted version called Memstalker.
- Ready cloud sync between devices with no setup is needed.
- Notes hold data that must not be sent to a model for classification.
Example request
Find in the knowledge base how we fixed authentication and show a short context instead of full notes.MCP
- Transport
- stdio, http
- Authentication
- API key
Environment variables
KB_PASSWORDrequired, secret- Dashboard password on first run
OBSIDIAN_VAULT_PATH- Path to the Obsidian vault for sync
Limitations
The server runs from a repository clone: `git clone`, `npm install` and `npm link`, then `kb setup`. It needs Node.js 20 or newer. Classification and synthesis use Anthropic models (Haiku and Sonnet by default), so note text goes to an external API. The dashboard password is set with `KB_PASSWORD`, and remote access with keys and OAuth needs separate configuration. The author also sells hosted Memstalker. A package with this name exists on the npm registry, but whether it belongs to this project is unknown: install from the clone.
How to disable. Remove the MCP entry from the agent's configuration, stop the `kb-server` service and delete the clone. The SQLite database and the Obsidian vault are removed separately.
FAQ
How do I install knowledge-base-server?
Run `git clone`, `npm install` and `npm link`, then `kb setup`: the wizard detects the environment and asks which agents you use. It takes about a minute.
How do I connect MCP to agents?
`kb register` registers the MCP in Claude, Codex and Gemini, and `kb register --agents=claude,codex` only in some of them.
How many tools does the server have?
Sixteen core ones over stdio and HTTP, plus local message bus and mistake ledger tools for stdio only.
How are tokens saved?
`kb_context` returns a short digest instead of full text, and `kb_read` reads a whole document only when needed.
Does it work with ChatGPT?
Yes, through the REST API with custom GPTs or through remote MCP with OAuth. Keys and a server address need configuring.
Discussion
No questions or reviews yet.
Related
MCP serversAKB is a PostgreSQL-native knowledge base for agents: documents, tables and files in vaults, search and relations over MCP.
A local MCP memory server for coding agents: decisions, errors and facts stay on your machine, with semantic and graph recall
Membase keeps one shared memory for AI agents that Claude Code, Cursor and Codex read through MCP, an SDK or the membase command
An MCP server that keeps domain knowledge in a graph: the agent searches entities and relations and can add or update them itself.
MCP server with long-term memory for agents: atomic notes, semantic search and an auto-linked graph on SQLite or PostgreSQL
BrainAPI turns text into a knowledge graph on your server and serves agents over MCP, REST and a console with fact-path answers
README in short
The docs present the project as a seven-layer knowledge pipeline: capture, classification, promotion, synthesis, three memory tiers, token-optimized retrieval and a self-learning loop. Separate sections cover connecting different agents and ingesting sources.