Skip to main content
Glama

DuckDB-RAG-MCP-Sample

by nananaman

Ejemplo de MCP RAG de DuckDB

Este es un ejemplo que integra y vectoriza un documento Markdown para que pueda explicarse utilizando MCP y RAG.

Utilizamos Plamo-Embedding-1B para la vectorización.

función

  • Extraer y vectorizar texto de archivos Markdown
  • Búsqueda de vectores con DuckDB
  • Persistencia de datos vectoriales con archivos Parquet
  • Búsqueda de vectores desde MCP

Cómo utilizar

Generación de datos vectoriales

Primero, coloque los archivos markdown que desea buscar en un directorio específico, luego conviértalos en archivos Parquet con el siguiente comando.

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

Configuración de MCP

Construir

El siguiente comando generará un único binario en dist/server .

uv run pyinstaller --clean --strip --noconfirm --onefile server.py
Configuración del cliente MCP

Configúrelo según el cliente que desee utilizar.

Para Claude Desktop se ve así:

Para VECTOR_PARQUET, especifique el archivo que acaba de convertir.

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

Se establece de la siguiente manera:

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

Iniciar el servidor de desarrollo

uv run mcp dev server.py

licencia

El ejemplo DuckDB RAG MCP se proporciona bajo la licencia Apache, versión 2.0.

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

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Un servidor MCP que habilita RAG (Recuperación-Generación Aumentada) en documentos Markdown convirtiéndolos en vectores de incrustación y realizando una búsqueda de vectores utilizando DuckDB.

  1. función
    1. Cómo utilizar
      1. Generación de datos vectoriales
      2. Configuración de MCP
      3. Iniciar el servidor de desarrollo
    2. licencia

      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
        663
        2
        JavaScript
        MIT License
      • A
        security
        A
        license
        A
        quality
        Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
        Last updated -
        3
        56
        83
        JavaScript
        MIT License
        • Apple
        • Linux
      • 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
        71
        Python
        • 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 -
        35
        16
        TypeScript
        • Apple
        • Linux

      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