Skip to main content
Glama

RAG MCP server

by proofofsid

RAG-MCP服务器

使用模型控制协议 (MCP) 的通用检索增强生成 (RAG) 服务器,旨在使用 RISC Zero 的 Bonsai 文档进行测试。

概述

该项目实现了一个 RAG 服务器,它:

  • 使用 MCP(模型控制协议)进行标准化通信
  • 实现用于文档查询的 RAG(检索增强生成)工作流程
  • 可以使用 RISC Zero 的 Bonsai 文档进行测试
  • 通过 Ollama 支持本地 LLM 集成

特征

  • 文档提取和索引
  • 语义搜索功能
  • 本地法学硕士整合
  • MCP 协议合规性
  • RISC Zero Bonsai 文档支持

先决条件

  • Python 3.12+
  • Ollama(用于本地法学硕士支持)
  • 诗歌(用于依赖管理)

安装

  1. 安装 Python 依赖项:
poetry install
  1. 安装并启动 Ollama:
# Install Ollama brew install ollama # for macOS # or curl -fsSL https://ollama.com/install.sh | sh # for Linux # Start Ollama service ollama serve
  1. 拉取所需模型:
ollama pull llama2

用法

  1. 启动 MCP 服务器:
poetry run python mcp_server.py
  1. 服务器将:
    • 初始化 LLM 和嵌入模型
    • 从数据目录提取文档
    • 使用 RAG 工作流处理查询
  2. 使用 RISC Zero Bonsai 文档进行测试:
    • 将 RISC Zero Bonsai 文档放在data/目录中
    • 向服务器查询 Bonsai 的功能和实现

项目结构

  • mcp_server.py :主服务器实现
  • rag.py :RAG 工作流程实现
  • data/ :文档提取目录
  • storage/ :向量存储和文档存储
  • start_ollama.sh :启动 Ollama 服务的脚本

使用 RISC Zero Bonsai 进行测试

该服务器已配置为与 RISC Zero 的 Bonsai 文档配合使用。您可以:

  1. 将 Bonsai 文档添加到data/目录
  2. 询问 Bonsai 的功能、实现细节和使用方法
  3. 使用 Bonsai 特定问题测试 RAG 工作流程

proofofsid用 ❤️ 制作

-
security - not tested
-
license - not tested
-
quality - not tested

hybrid server

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

实现与任何自定义知识库集成并可直接从 Cursor IDE 触发的 RAG 工作流。

  1. 概述
    1. 特征
      1. 先决条件
        1. 安装
          1. 用法
            1. 项目结构
              1. 使用 RISC Zero Bonsai 进行测试
                1. 由proofofsid用 ❤️ 制作

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    A simple template for creating custom tools for Cursor IDE using Model Context Protocol, deployable via Heroku, Docker, or directly within Cursor IDE.
                    Last updated -
                    2
                    Python
                    MIT License
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A template for creating custom tools for Cursor IDE using Model Context Protocol that allows users to deploy their own MCP server to Heroku and connect it to Cursor IDE.
                    Last updated -
                    2
                    1
                    Python
                    MIT License
                    • Linux
                    • Apple
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A template for creating custom tools for Cursor IDE using Model Context Protocol (MCP), allowing developers to extend Cursor's functionality with their own server-based tools.
                    Last updated -
                    11
                    2
                    Python
                    MIT License
                    • 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/proofofsid/rag-mcp'

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