vault-semantic-mcp
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., "@vault-semantic-mcpFind notes related to semantic search sidecar"
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.
vault-semantic-mcp
A local semantic search MCP server for a Markdown vault. Intended as a sidecar for OpenClaw or other MCP-enabled agents.
What it does
Indexes markdown files under a vault root (inbox, projects, decisions, entities, memory, sessions, templates)
Chunks content by headings, with paragraph subdivision for large sections
Embeds chunks using OpenAI
text-embedding-3-small(stored as JSON in SQLite for v1)Search combines FTS5 keyword search with cosine-similarity semantic search and folder-based ranking
Related notes finds notes similar to a given path
File watcher keeps the index in sync as files change
MCP tools expose everything to agents over stdio
Important: The vault markdown files are the source of truth. The SQLite database is a derived search index only. If the DB is lost, it can be rebuilt with a full reindex.
Related MCP server: mnemonic
Architecture
Vault root → scan
.mdfiles → parse frontmatter, chunk by headingsChunks → OpenAI embeddings → stored in SQLite with FTS5 for full-text
Search → hybrid FTS + semantic → folder boost (memory/entities/decisions > projects/sessions > inbox)
MCP → stdio transport → tools call search/get/recent/related/reindex/status
Setup
Requirements: Node.js 20+
Install:
npm installConfigure: Copy
.env.exampleto.env:cp .env.example .envSet
OPENAI_API_KEYand adjust paths:VAULT_ROOT– vault directory (default./data/vault)SQLITE_PATH– index DB (default./data/index/vault.db)
Run:
npm run dev # development with watch npm run build && npm start # production
Environment variables
Variable | Default | Description |
| (required) | OpenAI API key for embeddings |
|
| Root directory of the markdown vault |
|
| Path to SQLite index database |
|
| OpenAI embedding model |
|
| Default number of search results |
MCP usage
Configure your MCP client (e.g. OpenClaw) to run this server via stdio:
{
"mcpServers": {
"vault": {
"command": "node",
"args": ["/path/to/vault-semantic-mcp/dist/index.js"],
"env": {
"OPENAI_API_KEY": "...",
"VAULT_ROOT": "/path/to/vault",
"SQLITE_PATH": "/path/to/index/vault.db"
}
}
}
}Or with tsx for development:
{
"mcpServers": {
"vault": {
"command": "npx",
"args": ["tsx", "/path/to/vault-semantic-mcp/src/index.ts"],
"env": { ... }
}
}
}Tools
Tool | Args | Description |
|
| Hybrid search over the vault |
|
| Get full markdown for a file |
|
| Recently indexed documents |
|
| Notes related to a given path |
|
| Reindex one path or whole vault |
| – | Vault root, counts, watcher state |
Local validation (test harness)
Before wiring into OpenClaw, validate indexing and retrieval locally:
Seed vault
The repo includes sample notes in data/vault/ across projects, decisions, entities, memory, sessions, and inbox. Add or edit markdown files as needed.
Run test harness
# Reindex and run all evaluation queries (uses OPENAI_API_KEY)
npm run test:search
# Skip reindex, reuse existing index (faster for iterating on queries)
SKIP_REINDEX=1 npm run test:searchThe harness runs the same hybridSearch used by vault_search, so results reflect real MCP behavior.
Evaluation queries
Query ID | Purpose |
| FTS exact term match |
| FTS on common term |
| Semantic: "how should the agent store durable knowledge" |
| Semantic: "why OpenAI instead of local embeddings" |
| Semantic: "what happens when vault files are edited" |
| Semantic: "notes related to semantic search sidecar" |
| Semantic: "where did we decide vault files as source of truth" |
| FTS exact term |
What to inspect
Exact matches (SQLite, MCP, chunking): FTS should surface those notes
Semantic matches: Different phrasing should find the right notes (e.g. "durable knowledge" → memory/durable-knowledge-storage)
Deduplication: At most one chunk per document in results
Folder ranking: memory/entities/decisions should rank higher than inbox for similar content
Snippets: Chunk text should be readable and relevant
Reindex only
npm run reindex
VERBOSE=1 npm run reindex # log each fileEmbeddings
v1 uses OpenAI
text-embedding-3-smalland stores vectors as JSON in SQLite.No sqlite-vec or vector extensions. Future versions may add Ollama support.
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.
Latest Blog Posts
- 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/eman-hc/vault-semantic-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server