Skip to main content
Glama
johnylira

RAG MCP Server

by johnylira

使用 Python、LangChain、LangGraph 和 LlamaIndex 的 MCP RAG

用于索引文档并使用 RAG(检索增强生成)回答问题的 Model Context Protocol (MCP) 服务器项目。该服务器使用 FastMCP 通过 SSE 通信,LlamaIndex + ChromaDB 用于检索,LangGraph 用于编排,LangChain 用于生成。

架构

Cliente MCP -> SSE (/sse) -> FastMCP
                           -> ingest_documents(paths)
                           -> ask_rag(question)
                                  -> LangGraph
                                     -> recuperar contexto (LlamaIndex/Chroma)
                                     -> gerar resposta (LangChain/OpenAI)
                                     -> validar citações

Related MCP server: Antigravity PDF MCP Server

快速开始

cp .env.example .env
# Edite .env e informe OPENAI_API_KEY
docker compose up --build

MCP SSE 端点位于 http://localhost:8000/sse

文档

要将本地文件夹提供给容器,请在 docker-compose.yml 中取消注释卷 ./docs:/workspace/docs:ro。然后使用类似 /workspace/docs/manual.md 的路径调用该工具。

MCP 工具

ingest_documents

索引 .txt.md.pdf 文件。

{"paths": ["/workspace/docs/manual.md"]}

ask_rag

检索最相关的片段,并使用 [S1][S2] 引用进行回答。

{"question": "Quais são os procedimentos de backup?", "top_k": 5}

环境变量

变量

用途

OPENAI_API_KEY

与 OpenAI 兼容的 API 密钥

OPENAI_MODEL

LangChain 生成模型

OPENAI_EMBEDDING_MODEL

LlamaIndex 嵌入模型

OPENAI_BASE_URL

兼容端点的可选基础 URL

RAG_DATA_DIR

ChromaDB 持久化目录

RAG_COLLECTION

向量集合名称

RAG_CHUNK_SIZE

索引片段的大小

RAG_CHUNK_OVERLAP

片段之间的重叠

安全

未经 TLS 和身份验证,请勿公开暴露 SSE。仅挂载授权的文档目录,因为摄取工具会读取所指定的路径。

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables RAG (Retrieval-Augmented Generation) capabilities with document processing, vector storage, and intelligent Q\&A using OpenAI embeddings and semantic search.
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables uploading, organizing, and semantically searching documents with support for various file types and embedding providers.
    27
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables document Q&A with grounded citations using the official Gemini File Search API. Upload documents, create stores, and ask questions that return exact passage citations.
    16
    2
    MIT

View all related MCP servers

Related MCP Connectors

  • Your company's brain for AI agents. Cited, permission-aware knowledge across every system.

  • Citable retrieval across papers, books, patents, Wikipedia, and live social sources.

  • Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.

View all MCP Connectors

Latest Blog Posts

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/johnylira/servidor_mcp_completo_python'

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