Retrieval-Augmented Generation (RAG) MCP server written in Go that runs locally in your machine
A Retrieval-Augmented Generation (RAG) MCP server written in Go that runs locally in your machine.
If you want to use Ollama instead of MiniLM, you only need Ollama installed:
# macOS
brew install ollama
# Linux
curl -fsSL https://ollama.com/install.sh | sh
# Pull an embedding model
ollama pull nomic-embed-text
Skip the ONNX Runtime installation below if you only plan to use Ollama.
# macOS
brew install onnxruntime
# Ubuntu/Debian
sudo apt install libonnxruntime-dev
# Fedora/RHEL
sudo dnf install onnxruntime-devel
# Arch Linux
sudo pacman -S onnxruntime
Download a pre-built binary from the releases page:
| Platform | Binary |
|---|---|
| macOS (Apple Silicon) | goldie-mcp-darwin-arm64 |
| macOS (Intel) | goldie-mcp-darwin-amd64 |
| Linux (x86_64) | goldie-mcp-linux-amd64 |
| Linux (ARM64) | goldie-mcp-linux-arm64 |
# Example for macOS Apple Silicon
curl -LO https://github.com/srfrog/goldie-mcp/releases/latest/download/goldie-mcp-darwin-arm64
chmod +x goldie-mcp-darwin-arm64
mv goldie-mcp-darwin-arm64 ~/bin/goldie-mcp
The release binaries are ad-hoc codesigned for macOS and include the MiniLM model, so no additional downloads are required.
Requires Go 1.22+, CGO enabled, and Git LFS (the model file is stored with LFS):
git lfs install # if not already configured
git clone https://github.com/srfrog/goldie-mcp
cd goldie-mcp
make build
| Flag | Description | Default |
|---|---|---|
-b |
Embedding backend: minilm or ollama |
minilm |
-l |
Log file path | stderr |
| Variable | Description | Default |
|---|---|---|
GOLDIE_DB_PATH |
Path to SQLite database | ~/.local/share/goldie/index.db |
ONNXRUNTIME_LIB_PATH |
Path to libonnxruntime shared library (MiniLM only) | Auto-detected |
OLLAMA_HOST |
Ollama API base URL (Ollama only) | http://localhost:11434 |
OLLAMA_EMBED_MODEL |
Ollama embedding model name (Ollama only) | nomic-embed-text |
OLLAMA_EMBED_DIMENSIONS |
Custom model dimensions (Ollama only) | Auto-detected for known models |
| Model | Dimensions | Notes |
|---|---|---|
nomic-embed-text |
768 | Default, good general purpose |
mxbai-embed-large |
1024 | Higher quality, slower |
all-minilm |
384 | Same as MiniLM backend |
For other models, set OLLAMA_EMBED_DIMENSIONS to the modelโs output dimensions.
claude mcp add -s user -e GOLDIE_DB_PATH=~/.local/share/goldie/index.db goldie /path/to/goldie-mcp
Or add to ~/.claude.json:
{
"mcpServers": {
"goldie": {
"type": "stdio",
"command": "/path/to/goldie-mcp",
"env": {
"GOLDIE_DB_PATH": "/home/user/.local/share/goldie/index.db",
"ONNXRUNTIME_LIB_PATH": "/path/to/libonnxruntime.so"
}
}
}
}
Note: ONNXRUNTIME_LIB_PATH is optional if the library is in a standard location.
claude mcp add -s user -e GOLDIE_DB_PATH=~/.local/share/goldie/index.db goldie /path/to/goldie-mcp -- -b ollama
Or add to ~/.claude.json:
{
"mcpServers": {
"goldie": {
"type": "stdio",
"command": "/path/to/goldie-mcp",
"args": ["-b", "ollama"],
"env": {
"GOLDIE_DB_PATH": "/home/user/.local/share/goldie/index.db",
"OLLAMA_HOST": "http://localhost:11434",
"OLLAMA_EMBED_MODEL": "nomic-embed-text"
}
}
}
}
Note: Make sure Ollama is running (ollama serve) before starting Claude Code.
Add to your Claude Desktop configuration (claude_desktop_config.json):
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"goldie": {
"type": "stdio",
"command": "/path/to/goldie-mcp",
"env": {
"GOLDIE_DB_PATH": "/home/user/.local/share/goldie/index.db"
}
}
}
}
{
"mcpServers": {
"goldie": {
"type": "stdio",
"command": "/path/to/goldie-mcp",
"args": ["-b", "ollama"],
"env": {
"GOLDIE_DB_PATH": "/home/user/.local/share/goldie/index.db",
"OLLAMA_EMBED_MODEL": "nomic-embed-text"
}
}
}
}
Add to your Codex configuration (~/.codex/config.toml):
[mcp_servers.goldie]
command = "/path/to/goldie-mcp"
[mcp_servers.goldie.env]
GOLDIE_DB_PATH = "/home/user/.local/share/goldie/index.db"
ONNXRUNTIME_LIB_PATH = "/path/to/libonnxruntime.so"
Note: ONNXRUNTIME_LIB_PATH is optional if the library is in a standard location. Homebrew will install it to /opt/homebrew/lib/libonnxruntime.dylib on macOS. In Linux, find it with ldconfig -p | grep onnxruntime.
[mcp_servers.goldie]
command = "/path/to/goldie-mcp"
args = ["-b", "ollama"]
[mcp_servers.goldie.env]
GOLDIE_DB_PATH = "/home/user/.local/share/goldie/index.db"
OLLAMA_EMBED_MODEL = "nomic-embed-text"
Index text content for semantic search. Use this for web pages, API responses, notes, or any text that doesnโt come from a local file. For local files, use index_file instead.
Parameters:
content (required): The text content to indexmetadata (optional): JSON string with metadata (e.g., {"source": "https://example.com", "title": "Page Title"})Index a file from the filesystem.
Parameters:
path (required): Path to the file to indexIndex all files matching a pattern in a directory.
Parameters:
directory (required): The directory path to indexpattern (optional): File pattern to match (e.g., *.md, *.txt). Default: *recursive (optional): Whether to search subdirectories. Default: falseSearch for documents using semantic similarity.
Parameters:
query (required): Search query textlimit (optional): Maximum results (default: 5)Recall knowledge from indexed documents about a topic. Returns a consolidated summary with source attribution, designed for natural conversation flow.
Parameters:
topic (required): The topic to recall information aboutdepth (optional): How many sources to consult (default: 5, max: 20)Delete a document from the index.
Parameters:
id (required): Document IDGet the total number of indexed documents.
When indexing directories, Goldie automatically skips certain files and directories to avoid indexing irrelevant content.
If no .goldieskip file exists in the directory being indexed, Goldie uses these defaults:
| Pattern | Description |
|---|---|
.[!.]* |
All dotfiles and dotdirs (.git/, .env, .vscode/, etc.) |
node_modules/ |
Node.js dependencies |
vendor/ |
Go/PHP vendor directories |
__pycache__/ |
Python bytecode cache |
AGENTS.md |
AI agent configuration |
CLAUDE.md |
Claude configuration |
Create a .goldieskip file in the directory to define custom patterns. This replaces the defaults entirely. Same format as .gitignore, with the same pattern syntax.
# .goldieskip example
# Lines starting with # are comments
# Skip all dotfiles/dotdirs
.[!.]*
# Skip dependencies
node_modules/
vendor/
.venv/
# Skip build outputs
dist/
build/
target/
# Skip specific files
*.log
*.tmp
secrets.json
Pattern syntax:
* matches any sequence of characters? matches any single character[abc] matches any character in the set[!abc] matches any character NOT in the set/ match directoriesHere are example prompts you can use with Claude Code or Claude Desktop:
Use for content that doesnโt come from local files:
Web content:
Index this content from the React docs: "useState is a Hook that lets you add state to function components..."
API responses:
Index this API documentation: "POST /api/users - Creates a new user. Required fields: email, password"
Notes and knowledge:
Index this note: "Team decided to use PostgreSQL for the main database, Redis for caching"
With metadata:
Index this with source metadata: "OAuth2 flow requires client_id and redirect_uri" from "https://docs.example.com/auth"
Index the file ~/project/README.md
Index ~/docs/architecture.md
Index all markdown files in ~/docs
Index all *.txt files in ~/notes
Index all *.md files in ~/projects recursively
Index everything in ~/config with pattern *.json recursively
Search for authentication implementation
Search for "database migrations" and show me 10 results
Recall what you know about authentication
What do you remember about the API design?
Summarize your knowledge about error handling
Find documents about error handling
What do I have indexed about Docker?
Delete document abc123
Remove document xyz789 from the index
How many documents are in the Goldie index?
Count all indexed documents
Goldie can index your Claude Code conversation history, making it searchable with semantic search. This lets you find past solutions, code snippets, and discussions across all your sessions.
Claude Code stores conversation transcripts in:
~/.claude/projects/<project-hash>/
Each project directory contains markdown files with your conversation history.
Index all *.md files in ~/.claude/projects recursively
Search for "how did I fix the authentication bug"
Find conversations about Docker configuration
What regex patterns have I used before?
When copying binaries on macOS, Gatekeeper may add quarantine attributes (com.apple.provenance) that cause the binary to be killed on launch. Use make install DEST=<path> which builds directly to the destination and codesigns the binary to avoid this issue.
recall <topic> and check that it uses the goldie.recall() function, that indicates itโs using the MCP backend.goldie.search_index(). You can try with recall <topic> and consolidate to push the update.goldie-mcp/
โโโ main.go # MCP server setup and tool handlers
โโโ internal/
โ โโโ embedder/ # Embedding interface and backends
โ โ โโโ minilm/ # MiniLM backend (ONNX Runtime)
โ โ โโโ ollama/ # Ollama backend (API client)
โ โโโ goldie/ # RAG core logic
โ โโโ store/ # SQLite vector storage
โ โโโ queue/ # Async job processing
โโโ go.mod
โโโ Makefile
-b minilm)Uses all-MiniLM-L6-v2 via ONNX Runtime:
-b ollama)Uses Ollamaโs embedding API with your choice of model:
nomic-embed-text (768 dimensions) - Default, good balance of quality and speedmxbai-embed-large (1024 dimensions) - Higher quality embeddingsall-minilm (384 dimensions) - Same model as MiniLM backendOLLAMA_EMBED_DIMENSIONS)Note: Different embedding models produce different dimension vectors. Documents indexed with one backend/model cannot be searched using another with different dimensions. Use separate databases or re-index when switching.
MIT