Enables semantic search capabilities using Ollama embeddings, allowing natural language queries to find conceptually related tiddlers with vector similarity search.
Provides tools for managing TiddlyWiki wikis via HTTP API, including searching tiddlers using filter syntax or semantic search, creating and updating tiddlers with custom fields, and deleting tiddlers with content preview.
TiddlyWiki MCP Server
A Model Context Protocol (MCP) server that provides AI assistants with access to TiddlyWiki wikis via the HTTP API. Supports semantic search using Ollama embeddings.
Features
MCP Tools
search_tiddlers - Search tiddlers using TiddlyWiki filter syntax, semantic similarity, or hybrid (both combined)
create_tiddler - Create new tiddlers with custom fields
update_tiddler - Update existing tiddlers with diff preview
delete_tiddler - Delete tiddlers with content preview
MCP Resources
filter-reference://syntax - Complete TiddlyWiki filter syntax reference
Semantic Search
When Ollama is available, the server provides semantic search capabilities:
Natural language queries find conceptually related tiddlers
Uses
nomic-embed-textembeddings modelSQLite-vec for efficient vector similarity search
Background sync keeps embeddings up-to-date
Hybrid mode combines filter results with semantic reranking
Requirements
Node.js 22+
TiddlyWiki with HTTP API enabled (e.g., TiddlyWiki on Node.js with
listencommand)Ollama (optional, for semantic search)
Build Prerequisites
This project uses native SQLite modules that require compilation. You'll need:
Linux:
build-essential, Python 3macOS: Xcode Command Line Tools (
xcode-select --install)Windows: Visual Studio Build Tools, Python 3
Installation
From npm (recommended)
Or install globally:
From source
Quick Start
1. Start TiddlyWiki with HTTP API
2. (Optional) Set up Ollama for Semantic Search
3. Start the MCP Server
Configuration
All configuration is via environment variables. See .env.example for a complete reference.
Required
Variable | Description |
| URL of your TiddlyWiki server (e.g., |
Optional
Variable | Default | Description |
|
| Transport mode: |
|
| HTTP server port (when using http transport) |
|
| Ollama API URL |
|
| Embedding model name |
|
| Enable/disable semantic search |
|
| SQLite database path for embeddings |
|
| HTTP header for authentication (can be any header your TiddlyWiki expects) |
|
| Username for TiddlyWiki API requests |
Usage
stdio Mode (Claude Desktop)
Add to your Claude Desktop configuration (claude_desktop_config.json):
HTTP Mode
Start the server:
The server exposes:
GET /health- Health check endpointPOST /mcp- MCP JSON-RPC endpoint (stateless mode)
Example Tool Usage
Filter search (TiddlyWiki filter syntax):
Semantic search (natural language):
Hybrid search (filter + semantic reranking):
Development
Setup
Running Tests
Tests run quickly (~1s) and include unit tests for all tool handlers.
Linting
Type Checking
Pre-commit Hooks
Pre-commit hooks are configured with lefthook and run automatically:
Format check (Prettier)
Lint (ESLint)
Tests (Vitest)
Type check (TypeScript)
Building
Architecture
Key Design Decisions
Stateless HTTP mode: Each request gets its own Server/Transport instance to prevent request ID collisions with concurrent clients
Graceful degradation: Semantic search is optional; the server works without Ollama
Token-aware responses: Search results are validated against token limits with pagination suggestions
Background sync: Embeddings are updated periodically without blocking requests
License
MIT