Ken
Provides integration with a local Ollama instance to run optional language model capabilities entirely on-premises, without external API calls.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kensearch my vault for quarterly revenue trends"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ken
A frontend-free memory layer that turns any folder of documents into a searchable knowledge graph. Ken converts, ingests, links, and retrieves your files locally, with no cloud and no runtime dependencies on external repositories.
Quick Start
Install Ken globally (or run it on demand with npx):
npm install -g @foresights/ken
# or
npx @foresights/ken <command>Turn any folder into a vault. Files are never moved, copied, or renamed. Ken only creates a .ken/ directory inside the folder.
ken init ~/Documents/my-notesSearch it:
ken search "quarterly revenue trends"Results come back in two flavors: DIRECT hits (text match) and GRAPH hits (linked neurons surfaced by Personalized PageRank).
Related MCP server: RAG MCP Server
Claude Desktop Integration
Ken speaks the Model Context Protocol (MCP) over stdio. Add it to your Claude Desktop config file.
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"ken": {
"command": "npx",
"args": ["-y", "@foresights/ken", "mcp", "--vault", "/path/to/vault"]
}
}
}Replace /path/to/vault with the absolute path to your Ken vault folder. Restart Claude Desktop and Ken's tool catalog becomes available to the agent.
CLI Commands
Command | Description |
| Turn an existing folder of documents into a Ken vault. Creates |
| Sync the vault with folder changes. Ingests new and changed files, marks deleted files as orphaned. |
| Ingest a single document into the vault. Converts non-text formats automatically. |
| Search the vault. Returns direct text matches plus graph-surfaced results. |
| Convert a document to Markdown using Ken's native Rust converter. |
| Check which converters are available (native Rust, OCR, Whisper). |
| Start the Ken HTTP server (default port 7700, 44 REST routes). |
| Start the MCP stdio server for Claude Desktop and other MCP clients. |
| Vault diagnostics. Reports brain health score, graph stats, orphans, stale pages, dead links, contradictions. |
| Print an orientation packet summarizing the vault. |
| Run the nightly memory consolidation worker (replay, stale-marking, edge decay). |
| List neurons due for spaced repetition review. |
| Record a memory recall event (updates FSRS state and contribution score). |
| Run the observation pipeline. Finds neuron clusters for synthesis. |
| Show the PMI-expanded query for debugging search recall. |
| Rebuild the PMI co-occurrence matrix from all neuron content. |
| Detect local LLM backends (Ollama, LM Studio, llama.cpp) and store selection in |
| Validate the vault's |
| List conversion tasks by review state (pending, submitted, accepted, rejected, expired). |
| Export the knowledge graph as HTML, SVG, GraphML, JSON, or Mermaid. |
| Show reverse impact analysis for a neuron (what depends on it). |
| Generate a guided knowledge tour starting from a topic. |
| Measure token reduction achieved by graph-first retrieval versus raw documents. |
| Build the optional semantic layer (LSI word similarities and node2vec embeddings). Requires Python with numpy. |
| Show semantically similar words from the LSI model. |
How It Works
Ken has three layers working together.
Rust conversion core. A native Rust binary converts 11 document formats to Markdown. No system calls to Python, LibreOffice, or external tools. The binary ships inside the npm package.
TypeScript service layer. The orchestration logic (ingestion, search, graph algorithms, memory lifecycle, MCP server, HTTP server) is written in TypeScript and runs on Node.js.
SQLite storage. Every vault stores its data in a single
.ken/data.dbSQLite file. Full-text search uses SQLite FTS5. Graph structure, embeddings, FSRS state, and task queues all live in the same database.
The retrieval model is graph-first. When you search, Ken does not just match text. It follows synapses (links between neurons) to surface related knowledge that may not share any keywords with your query.
Search Architecture
Ken search runs four layers in sequence. Each layer adds recall without sacrificing precision.
FTS5 full-text search. The base layer. SQLite FTS5 matches your query tokens against neuron content with BM25 ranking. This is always available and requires no model.
PMI query expansion. Ken builds a Pointwise Mutual Information co-occurrence matrix from all neuron content. When you search, it expands your query terms with their statistical neighbors. Searching "revenue" also hits neurons about "income", "ARR", "MRR". Run
ken reindex-pmito rebuild this matrix.Personalized PageRank. Seed neurons from layers 1 and 2 become the personalization vector for a PageRank walk over the synapse graph. High-authority neurons connected to your seeds get boosted, even if they had no direct text match. This is what produces the GRAPH results.
Semantic embeddings (optional). If you run
ken semantic build, Ken computes LSI word similarities and node2vec graph embeddings using a bundled Python script. This adds latent semantic matching on top of the graph. Requires Python with numpy. Ken works fully without it.
Memory Lifecycle
Ken treats knowledge like biological memory, not like a static index.
FSRS spaced repetition. Every neuron has an FSRS (Free Spaced Repetition Scheduler) state tracking its stability and retrievability. When you recall a neuron (via
ken recallor through the MCP tools), its stability increases and its next review date moves out. Neurons you never recall gradually become stale.Hebbian strengthening. Synapses that get traversed frequently during search and recall get stronger. Infrequently used synapses decay. Run
ken consolidateto apply this.Nightly consolidation. The consolidation worker (
ken consolidate) does three things: (1) replays high-contribution neurons to boost their stability, (2) marks neurons whose retrievability has dropped below the threshold for review, and (3) prunes decayed synapses and edges. This keeps the vault from accumulating dead weight.Observation and synthesis. The
ken observecommand clusters related neurons and presents them for synthesis. The agent (or you) can then create new neurons that capture higher-level patterns.Self-improvement proposals. Ken generates typed metric facts with provenance and can detect contradictions. It proposes improvements (new synapses, entity merges, schema updates) as tasks that require human approval before they take effect.
Supported File Formats
Native Rust converters (11 formats)
Format | Extension(s) |
CSV |
|
RTF |
|
HTML |
|
DOCX |
|
XLSX |
|
| |
EPUB |
|
PPTX |
|
ODT |
|
ODS |
|
ODP |
|
Plain text formats (read directly)
Markdown (.md, .markdown), plain text (.txt), JSON (.json), YAML (.yaml, .yml), XML (.xml), HTML (.html, .htm).
Code file formats (40+, read as plain text)
TypeScript (.ts), JavaScript (.js, .mjs, .cjs), Python (.py), Rust (.rs), Go (.go), Java (.java), C (.c, .h), C++ (.cpp, .cc, .cxx, .hpp, .hh), C# (.cs), Ruby (.rb), PHP (.php), Swift (.swift), Kotlin (.kt), Scala (.scala), Shell (.sh, .bash, .zsh), SQL (.sql), Lua (.lua), Perl (.pl, .pm), R (.r, .R), Julia (.jl), Dart (.dart), Clojure (.clj), Haskell (.hs), Erlang (.erl), Elixir (.ex, .exs), F# (.fs), Lisp (.lisp, .cl), Nim (.nim), Zig (.zig), Crystal (.cr), OCaml (.ml), Vue (.vue), Svelte (.svelte), CSS (.css), SCSS (.scss), Less (.less), TOML (.toml), INI (.ini, .cfg), Dockerfile, Makefile, and more.
Self-Contained
Ken has zero runtime dependencies on external repositories, cloud services, or API keys.
Works offline. No network calls are required for ingestion, conversion, search, or graph analysis.
No cloud. Your documents never leave your machine. Everything runs locally.
No external repos. The Rust conversion binary ships inside the npm package. The optional semantic layer bundles its own Python script.
No API keys. Ken does not call OpenAI, Anthropic, or any external model. The optional local LLM integration (
ken models) talks to your own Ollama, LM Studio, or llama.cpp instance on localhost.Single database file. The entire vault (content, graph, embeddings, FSRS state, task queue) lives in one SQLite file at
.ken/data.db.
License
MIT
This server cannot be installed
Maintenance
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
AlicenseAqualityCmaintenanceEnables AI memory persistence and secure credential management via vault tools for MCP-compatible clients like Claude Desktop, Cursor, and VS Code.126MIT- Alicense-qualityDmaintenanceEnables Claude Desktop to search custom knowledge bases using retrieval-augmented generation via a simple MCP tool.MIT
- AlicenseAqualityAmaintenanceLocal-first knowledge graph MCP server — hybrid BM25 + vector + graph retrieval over your personal vault with provenance-grade extraction. 8 tools for Claude Desktop including search, archaeology, and graph write.143MIT
- Flicense-qualityDmaintenanceProvides persistent semantic memory for Claude Code via local embeddings and six MCP tools, enabling context storage and retrieval across sessions without cloud dependencies.
Related MCP Connectors
Shared long-term memory vault for AI agents with 20 MCP tools.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/aimonk2025/ken'
If you have feedback or need assistance with the MCP directory API, please join our Discord server