search-journal
Indexes and searches Markdown journal files, returning relevant journal entries from a mounted journal directory.
Click on "Deploy 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., "@search-journalwhat did I write about my trip to Kyoto last spring?"
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.
Note: This is a personal project meant for my Journal, this is not a general purpose RAG mcp server
search-journal
An MCP server that searches Markdown journals using Ollama embeddings and a
SQLite vector index. The Streamable HTTP endpoint is /mcp (port 8000).
Docker
Requires Docker with the Compose plugin, an Ollama server, and the embedding model installed on that server:
ollama pull embeddinggemma-2:270m
docker compose buildCompose uses host networking on Linux/NixOS and connects to Ollama at
http://127.0.0.1:11434/api/embed. Keep Ollama bound to localhost (its default);
there is no need to expose it to your LAN. If you previously changed
OLLAMA_HOST to 0.0.0.0:11434, restore it to 127.0.0.1:11434 and restart
Ollama.
Host networking shares the host's network namespace, so the container has less
network isolation. The MCP server explicitly binds to 127.0.0.1:8000, and no
Docker port publishing is needed. Port 8000 must be free on the host. Docker
Desktop requires host networking support to be enabled.
For a remote Ollama server or a different model, set OLLAMA_URL and/or MODEL
in a local .env file before running Compose:
OLLAMA_URL=http://192.168.1.10:11434/api/embed
MODEL=embeddinggemma-2:270mIndex your journals
Mount your Markdown directory read-only and run the indexer using the same image, settings, and persistent database volume as the server:
./index.sh /path/to/journalsRelative paths are supported. Quote paths containing spaces, for example:
./index.sh "~/Documents/My Journals"Run ./index.sh --help for usage. The script validates the folder and mounts it
read-only at /journals inside the container.
Then start the server:
docker compose up -d
docker compose logs -fConnect your MCP client to http://localhost:8000/mcp. Index at least one
non-empty Markdown file before searching. Re-run the indexing command to update
changed files, keeping the same /journals mount path. Use the same embedding
model for indexing and searching; rebuild the index if you change models.
LAN access
The default Compose configuration only accepts connections from the Docker
host. To allow other machines on your LAN, change HOST in
docker-compose.yaml:
environment:
HOST: 0.0.0.0Recreate the container to apply the change:
docker compose up -d --force-recreateLAN clients can then connect to http://<server-lan-ip>:8000/mcp. Because
Compose uses host networking, no ports: mapping is needed. If your host has a
firewall, allow TCP port 8000 only from the intended clients. Ollama can remain
bound to localhost; it does not need to be exposed to the LAN.
Setting HOST in .env alone does not enable LAN access: the current Compose
file hardcodes it to 127.0.0.1.
Persistence and security
The
journal-datanamed volume stores/data/index.dband survives container replacement anddocker compose down.docker compose down -vdeletes it.The image runs as a non-root user (UID/GID 10001). If replacing the named volume with a host bind mount, make its directory writable by that user. An existing
index.dbcan be placed there before starting the service.Journal files, local databases,
.envfiles, and.venvare excluded from the image build context. The database contains journal text; treat it as private.Compose binds the MCP server only to
127.0.0.1by default. The server has no authentication and returns private journal content. Put an authenticated reverse proxy in front of it before allowing access from other machines, and restrict direct access to port 8000 to that proxy. Do not expose the unauthenticated endpoint to the internet.
Related MCP server: ai-journal
Configuration
Variable | Local default | Docker default |
|
| Compose: |
|
| Same |
|
|
|
|
| Compose: |
|
|
|
Without Docker, install dependencies with uv sync --locked, run
uv run python index.py /path/to/journals, then uv run python main.py.
Environment variables must be exported when running locally; .env is read by
Compose, not by the Python scripts.
License
MIT
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
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Related MCP Servers
- AlicenseAqualityDmaintenanceLocal-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.310 npmMIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server for journaling, organizing, and recalling your work. It captures entries as plain markdown files, indexes them for full-text and structured search, and enables querying via natural language.64 PyPI1MIT
- AlicenseAqualityBmaintenanceIndexes local Markdown/text files into a SQLite database with vector embeddings and provides MCP tools for semantic search without cloud dependencies.3AGPL 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