search-journal
Indexes and searches Markdown journal files, returning relevant journal entries from a mounted journal directory.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Note: This is a personal project meant for my Journal, this is not a general purpose RAG mcp server
search-journal
To install dependencies:
bun installIndex your journal
Start Ollama and make sure the embedding model is available:
ollama pull embeddinggemma-2:270m
bun run embedFiles.tsThis reads Markdown files in ~/notes/Journal, splits them into 512-word chunks,
embeds them with Ollama, and stores the text and vectors in journal.sqlite.
Re-running the command replaces each scanned file's previous chunks, including
clearing chunks for files that are now empty. Deleted files are not automatically
removed from the index.
Related MCP server: lore-mcp
Start the MCP server
bun run index.tsThe MCP server uses Streamable HTTP at http://127.0.0.1:8000/mcp. Configure
that URL in your MCP client (HTTP transport, not stdio). It exposes a search
tool with query and an optional limit
(1–10, default 5). It embeds the query and returns the closest indexed passages,
including their file, zero-based chunk index, and cosine distance (lower is closer).
An empty index returns no results. Indexing is a separate command; the server does
not re-embed your journal at startup. Keep Ollama running for searches.
Both commands use the same defaults, configurable through environment variables:
Variable | Default |
|
|
|
|
|
|
|
|
|
|
|
|
To listen on other interfaces or use a different port:
HOST=0.0.0.0 PORT=8000 bun run index.tsThe server has no authentication and provides access to private journal content. Keep it on localhost unless access is restricted by a firewall or an authenticated reverse proxy. Cross-origin browser requests are rejected. HTTP requests are stateless; no session ID is required.
Use the same embedding model for indexing and search. If changing models, use a fresh database and re-index; existing vectors cannot be mixed with another model.
Docker Compose
Requires Docker with Compose and host networking (native on Linux; Docker Desktop 4.34+ requires opting in to host networking). Ollama runs separately on the host; Compose does not install it or download models.
Make sure your journal directory exists and is readable by the container's non-root user, then build, index, and start:
ollama pull embeddinggemma-2:270m
docker compose build
docker compose run --rm search-journal bun run embedFiles.ts
docker compose up -dThe MCP endpoint is http://127.0.0.1:8000/mcp. Compose uses host networking and binds the server to localhost by default, so no port publishing is needed and host-local Ollama remains reachable without exposing Ollama to the network.
The journal defaults to ~/notes/Journal on the host and is mounted read-only at
/journal. Override JOURNAL_DIR, OLLAMA_URL, EMBEDDING_MODEL, HOST, or
PORT using your shell environment or a Compose .env file, for example:
JOURNAL_DIR=/absolute/path/to/your/journal
OLLAMA_URL=http://127.0.0.1:11434
EMBEDDING_MODEL=embeddinggemma-2:270m
PORT=8000SQLite is stored at /data/journal.sqlite in the journal-data named volume,
shared by the server and indexing commands. The existing local journal.sqlite
is not copied into the image or imported; the commands above create a fresh
index. Search results report container paths under /journal.
After changing journal files, re-run the indexing command. To avoid concurrent SQLite writes during indexing, you can stop the server first:
docker compose stop
docker compose run --rm search-journal bun run embedFiles.ts
docker compose up -d
docker compose logs -f search-journaldocker compose down preserves the index; docker compose down -v deletes it.
The image build excludes local databases, journal files, .env files, and
node_modules. Do not set HOST=0.0.0.0 without restricting access: with host
networking this exposes the unauthenticated server on all host interfaces.
Tests
bun testTests use temporary databases and mocked embeddings, not your journal or Ollama.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
An MCP server for search and retrieval over a local LanceDB database
Keeps your memory: WhatsApp, voice or any AI tool over MCP, Markdown you own, recall with sources
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Related MCP Servers
- AlicenseAqualityDmaintenanceLocal-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.38 npmMIT
- AlicenseAqualityBmaintenanceIndexes local Markdown/text files into a SQLite database with vector embeddings and provides MCP tools for semantic search without cloud dependencies.31AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables local semantic and full-text search over Markdown notes through MCP, returning relevant passages ranked by meaning and exact terms without requiring a GPU or hosted APIs.MIT
- AlicenseNot gradedqualityCmaintenanceEnables semantic and full-text search over markdown notes, with tools to create, edit, move, and delete notes, all through MCP. Runs entirely locally using Ollama for embeddings and SQLite for storage, working with Obsidian or standalone.MIT