Skip to main content
Glama
by nananaman

DuckDB RAG MCP Sample

This is a sample that embeds and vectorizes a markdown document so that it can be explained using MCP and RAG.

We use Plamo-Embedding-1B for vectorization.

function

  • Extract and vectorize text from markdown files

  • Vector Searching with DuckDB

  • Persisting vector data with Parquet files

  • Vector search from MCP

How to use

Vector data generation

First, place the markdown files you want to search in a specific directory, then convert them to Parquet files with the following command.

uv run main.py --directory ~/path/to/markdown/files --parquet vectors.parquet

Configuring MCP

Build

The following command will generate a single binary in dist/server .

uv run pyinstaller --clean --strip --noconfirm --onefile server.py

MCP Client Configuration

Please set it according to the client you want to use.

For Claude Desktop it looks like this:

For VECTOR_PARQUET, specify the file you just converted.

uv run mcp install server.py -v VECTOR_PARQUET=/path/to/vectors.parquet

It is set as follows:

{ "mcpServers": { "DuckDB-RAG-MCP-Sample": { "command": "/path/to/dist/server", "env": { "VECTOR_PARQUET": "/path/to/vectors.parquet" } } } }

Start the development server

uv run mcp dev server.py

license

The DuckDB RAG MCP Sample is provided under the Apache License, Version 2.0.

-
security - not tested
A
license - permissive license
-
quality - not tested

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    This MCP server utilizes DuckDuckGo for web searches, providing structured search results with metadata and features like smart content classification and language detection, facilitating easy integration with AI clients supporting the MCP protocol.
    Last updated -
    1
    18
    2
    MIT License
  • A
    security
    F
    license
    A
    quality
    An MCP server that enables interaction with Markdown knowledge bases, allowing users to search and retrieve content by tags, text, URL, or date range from their local markdown files.
    Last updated -
    7
    81
    • Apple
  • -
    security
    F
    license
    -
    quality
    An advanced MCP server providing RAG-enabled memory through a knowledge graph with vector search capabilities, enabling intelligent information storage, semantic retrieval, and document processing.
    Last updated -
    33
    37
    • Apple
    • Linux
  • -
    security
    A
    license
    -
    quality
    A server that integrates Retrieval-Augmented Generation (RAG) with the Model Control Protocol (MCP) to provide web search capabilities and document analysis for AI assistants.
    Last updated -
    4
    Apache 2.0

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nananaman/DuckDB-RAG-MCP-Sample'

If you have feedback or need assistance with the MCP directory API, please join our Discord server