yzma-duckdb-rag
A Retrieval-Augmented Generation (RAG) system implemented in Go
Install / Use
claude mcp add innomon -- npx -y github:innomon/yzma-duckdb-ragIf the server publishes to npm under a different name, use that package instead ā check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of yzma-duckdb-rag
yzma-duckdb-rag scores 74/100 on our quality scale, 3802nd of 4,708 Development & Engineering skills we index.
Its MCP Server is 9.7 KB long, well organised into 33 sections with 16 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 8 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 81/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit ā read the skill file before letting an agent act on it.
yzma-duckdb-rag compared with similar skills
All 4 of these similar skills score higher than yzma-duckdb-rag; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| yzma-duckdb-rag (this skill)by innomon | 74 | 3 | 8mo ago | MCP Server |
| taste-skillby Leonxlnx | 100 | 121.0k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 114.5k | today | CLAUDE.md |
| hyperframesby heygen-com | 100 | 89.4k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 82.4k | today | CLAUDE.md |
Frequently asked questions
- How do I install yzma-duckdb-rag?
- Run
claude mcp add innomon -- npx -y github:innomon/yzma-duckdb-rag. The install tabs above show the steps for each supported agent. - Which AI agents does yzma-duckdb-rag work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is yzma-duckdb-rag safe to use?
- It is MIT-licensed and scores 81/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is yzma-duckdb-rag still maintained?
- The repository was last updated about 8 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubYDRAG - YZMA DuckDB RAG
A Retrieval-Augmented Generation (RAG) system implemented in Go using:
- YZMA (hybridgroup/yzma) for local embedding generation via llama.cpp
- DuckDB as the vector database for similarity search
- MCP (Model Context Protocol) for AI assistant integration
Features
- Local embedding generation using any GGUF embedding model
- Vector similarity search using DuckDB's
array_cosine_similarity - Persistent storage of documents and embeddings
- PDF text extraction for document ingestion
- Simple CLI interface for document management and querying
- MCP server with configurable transport (stdio, SSE, Streamable HTTP) for integration with AI assistants (Claude, Amp, etc.)
- Flexible configuration via YAML, environment variables, and CLI flags
Prerequisites
- Go 1.24+ (CGo enabled ā see Build Requirements)
- C compiler (gcc or clang) ā required by DuckDB's Go bindings
- llama.cpp library ā download or build, then set
YZMA_LIB - GGUF embedding model ā e.g., embeddinggemma, nomic-embed-text, bge-small
Installing llama.cpp
# Using yzma CLI to download
go install github.com/hybridgroup/yzma/cmd/yzma@latest
yzma lib install
# Set the library path
export YZMA_LIB=/path/to/libllama.so # Linux
export YZMA_LIB=/path/to/libllama.dylib # macOS
Recommended Embedding Models
- embeddinggemma-300M ā see MODEL.md for setup details
- nomic-embed-text-v1.5
- bge-small-en-v1.5
- all-MiniLM-L6-v2
Build Requirements
DuckDB's Go driver uses CGo, so CGO_ENABLED=1 is required. A C compiler (gcc/clang) must be available.
# Verify CGo is enabled (must print "1")
go env CGO_ENABLED
# If it prints "0", enable it for the current session:
export CGO_ENABLED=1
# Or set it permanently:
go env -w CGO_ENABLED=1
Building
CGO_ENABLED=1 go build -o ydrag .
Running Tests
CGO_ENABLED=1 go test ./... -v
The test suite covers configuration loading, command registry, vector math utilities, and CLI argument validation ā all without requiring a model or llama.cpp library.
Usage
Add Documents
./ydrag -model ./models/nomic-embed-text-v1.5.Q8_0.gguf add doc1 "The capital of France is Paris"
./ydrag -model ./models/nomic-embed-text-v1.5.Q8_0.gguf add doc2 "Python is a programming language"
./ydrag -model ./models/nomic-embed-text-v1.5.Q8_0.gguf add doc3 "Berlin is the capital of Germany"
Query Documents
./ydrag -model ./models/nomic-embed-text-v1.5.Q8_0.gguf query "What is the capital of France?"
Output:
Top 5 results for: "What is the capital of France?"
1. [0.8934] doc1: The capital of France is Paris
2. [0.7521] doc3: Berlin is the capital of Germany
3. [0.3412] doc2: Python is a programming language
List Documents
./ydrag -model ./models/nomic-embed-text-v1.5.Q8_0.gguf list
Delete Documents
./ydrag -model ./models/nomic-embed-text-v1.5.Q8_0.gguf delete doc1
MCP Server Mode
Run as an MCP (Model Context Protocol) server for integration with AI assistants. The transport is configurable: stdio (default), sse, or streamable-http.
# Default: stdio transport
./ydrag -model ./models/nomic-embed-text-v1.5.Q8_0.gguf serve
# SSE transport (listens on port 8080)
YDRAG_TRANSPORT=sse ./ydrag -model ./models/nomic-embed-text-v1.5.Q8_0.gguf serve
# Streamable HTTP transport (listens on port 8080)
YDRAG_TRANSPORT=streamable-http ./ydrag -model ./models/nomic-embed-text-v1.5.Q8_0.gguf serve
Or set the transport in config.yaml:
server:
transport: "sse" # "stdio" | "sse" | "streamable-http"
port: "8080"
The server exposes the following tools:
add_documentā Add a document to the knowledge basequery_documentsā Search for similar documentslist_documentsā List all documentsdelete_documentā Delete a document
MCP Client Configuration
stdio transport ā add to your MCP client config (e.g., Claude Desktop):
{
"mcpServers": {
"ydrag": {
"command": "/path/to/ydrag",
"args": ["-model", "/path/to/model.gguf", "serve"]
}
}
}
SSE / Streamable HTTP transport ā point your MCP client at the URL:
{
"mcpServers": {
"ydrag": {
"url": "http://localhost:8080/mcp"
}
}
}
Configuration
YDRAG supports configuration via YAML file, environment variables, and command-line flags.
Priority order: flags > environment variables > config.yaml > defaults
Configuration File
Create a config.yaml in the working directory:
model: "./models/nomic-embed-text-v1.5.Q8_0.gguf"
lib_path: "/path/to/libllama.so"
db_path: "rag.db"
context_size: 512
batch_size: 512
verbose: false
server:
transport: "stdio"
port: "8080"
Environment Variables
| Variable | Description | Default |
|----------|-------------|---------|
| YDRAG_MODEL | Path to GGUF embedding model | ā |
| YZMA_LIB | Path to llama.cpp library | ā |
| YDRAG_DB_PATH | Path to DuckDB database file | rag.db |
| YDRAG_CONTEXT_SIZE | Context size for embeddings | 512 |
| YDRAG_BATCH_SIZE | Batch size for processing | 512 |
| YDRAG_VERBOSE | Enable verbose logging (true/1) | false |
| YDRAG_TRANSPORT | MCP transport type (stdio, sse, streamable-http) | stdio |
| YDRAG_SERVER_PORT | MCP server port | 8080 |
Command-Line Flags
| Flag | Description | Default |
|------|-------------|---------|
| -config | Path to configuration file | config.yaml |
| -model | Path to GGUF embedding model | ā |
| -lib | Path to llama.cpp library | ā |
| -db | Path to DuckDB database file | rag.db |
| -context | Context size for embeddings | 512 |
| -batch | Batch size for processing | 512 |
| -verbose | Enable verbose logging | false |
Project Structure
.
āāā main.go # Entry point, flag parsing, orchestration
āāā config.go # Configuration loading (YAML, env, defaults)
āāā command.go # Command registry interface
āāā cmd_add.go # "add" command
āāā cmd_delete.go # "delete" command
āāā cmd_list.go # "list" command
āāā cmd_query.go # "query" command
āāā cmd_serve.go # "serve" command (MCP server)
āāā rag.go # RAG core: embeddings, DuckDB storage, search
āāā readpdf.go # PDF text extraction
āāā mcp_server.go # MCP server tool definitions and handlers
āāā config.yaml # Default configuration file
āāā MODEL.md # Embedding model setup guide
āāā config_test.go # Config loading and env override tests
āāā command_test.go # Command registry tests
āāā rag_test.go # Vector math and utility function tests
āāā cmd_test.go # CLI command argument validation tests
Architecture
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā YDRAG ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā ā
ā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā ā
ā ā CLI ā ā MCP Server ā ā RAG Core ā ā
ā ā ā ā(stdio/sse/http)ā ā ā ā
ā ā add/query/ ā ā ā ā ⢠Embed ā ā
ā ā list/delete ā ā 4 tools ā ā ⢠Store ā ā
ā āāāāāāāā¬āāāāāāāā āāāāāāāā¬āāāāāāāā ā ⢠Search ā ā
ā ā ā āāāāāāāā¬āāāāāāāā ā
ā āāāāāāāāāāāāāāāāāāā“āāāāāāāāāāāāāāāāāā ā
ā ā
ā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāā ā
ā ā YZMA/llama.cpp ā ā DuckDB ā ā
ā ā ā ā ā ā
ā ā ⢠Load GGUF ā ā ⢠Store documents ā ā
ā ā ⢠Tokenize ā ā ⢠Store embeddings ā ā
ā ā ⢠Embed text ā ā ⢠Vector search ā ā
ā āāāāāāāāāā¬āāāāāāāāā āāāāāāāāāāāā¬āāāāāāāāāāā ā
ā ā []float32 ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
How It Works
- Document Ingestion ā Text is tokenized and passed through the embedding model to generate a vector representation
- Storage ā Documents and their embeddings are stored in DuckDB using the
FLOAT[]array type - Query ā The query text is embedded, then DuckDB's
array_cosine_similarityfunction finds the most similar documents - Retrieval ā Results are returned sorted by similarity score
Dependencies
| Package | Purpose | |---------|---------| | hybridgroup/yzma | llama.cpp Go bindings for embedding generation | | marcboeker/go-duckdb/v2 | DuckDB Go driver | | modelcontextprotocol/go-sdk | MCP server implementation | | ledongthuc/pdf | PDF text extraction | | gopkg.in/yaml.v3 | YAML configuration parsing |
MCP Tools Reference
| Tool | Description | Parameters |
|------|-------------|------------|
| add_document | Add a document to the knowledge base | id (string, required), content (string, required) |
| query_documents | Search for similar documents | query (string, required), top_k (int, default: 5) |
| list_documents | List all documents | none |
| delete_document | Delete a document | id (string, required) |
License
MIT
Related Skills
taste-skill
121.0kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
114.5kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu ā one CLI, zero API fees.
hyperframes
89.4kOpen-source AI video editor: edit your own footage, or create and remake any video with Claude Code, Codex or the free Studio app. Write HTML, render MP4. By HeyGen.
ruflo
82.4kš The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit ā see the Safety scan above for what the skill file itself contains.
