SkillAgentSearch skills...

yzma-duckdb-rag

A Retrieval-Augmented Generation (RAG) system implemented in Go

Install / Use

claude mcp add innomon -- npx -y github:innomon/yzma-duckdb-rag

If the server publishes to npm under a different name, use that package instead — check the repo README.

About this skill
šŸ”Œ

MCP Server

Model Context Protocol server

Quality Score

74/100

Supported Platforms

Claude Code
Claude Desktop

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.

Substance
29/30
Structure
20/20
Description
12/15
Adoption
3/20
Freshness
11/15

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.

SkillScoreStarsUpdatedFormat
yzma-duckdb-rag (this skill)by innomon7438mo agoMCP Server
taste-skillby Leonxlnx100121.0ktodayCLAUDE.md
Agent-Reachby Panniantong100114.5ktodayCLAUDE.md
hyperframesby heygen-com10089.4ktodayCLAUDE.md
rufloby ruvnet10082.4ktodayCLAUDE.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.

YDRAG - 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

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 base
  • query_documents — Search for similar documents
  • list_documents — List all documents
  • delete_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

  1. Document Ingestion — Text is tokenized and passed through the embedding model to generate a vector representation
  2. Storage — Documents and their embeddings are stored in DuckDB using the FLOAT[] array type
  3. Query — The query text is embedded, then DuckDB's array_cosine_similarity function finds the most similar documents
  4. 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

View on GitHub
GitHub Stars3
CategoryDevelopment
Updated7mo ago
Forks0

Languages

Go

Trust signals

81/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

3 low
yzma-duckdb-rag — MCP Server: Install & Safety Check | SkillAgent