Skip to main content
Glama
johnylira

RAG MCP Server

by johnylira

MCP RAG com Python, LangChain, LangGraph e LlamaIndex

Projeto de servidor Model Context Protocol (MCP) para indexar documentos e responder perguntas com RAG (Retrieval-Augmented Generation). O servidor usa FastMCP via SSE, LlamaIndex + ChromaDB para recuperação, LangGraph para orquestração e LangChain para geração.

Arquitetura

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

Início rápido

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

O endpoint MCP SSE fica em http://localhost:8000/sse.

Documentos

Para tornar uma pasta local disponível ao contêiner, descomente o volume ./docs:/workspace/docs:ro no docker-compose.yml. Em seguida, chame a ferramenta com um caminho como /workspace/docs/manual.md.

Ferramentas MCP

ingest_documents

Indexa arquivos .txt, .md e .pdf.

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

ask_rag

Recupera os trechos mais relevantes e responde com referências [S1], [S2].

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

Variáveis de ambiente

Variável

Uso

OPENAI_API_KEY

Chave da API compatível com OpenAI

OPENAI_MODEL

Modelo de geração LangChain

OPENAI_EMBEDDING_MODEL

Modelo de embeddings LlamaIndex

OPENAI_BASE_URL

URL-base opcional de endpoint compatível

RAG_DATA_DIR

Diretório persistente do ChromaDB

RAG_COLLECTION

Nome da coleção vetorial

RAG_CHUNK_SIZE

Tamanho dos trechos indexados

RAG_CHUNK_OVERLAP

Sobreposição entre trechos

Segurança

Não exponha o SSE publicamente sem TLS e autenticação. Monte somente diretórios de documentos autorizados, pois a ferramenta de ingestão lê os caminhos informados.

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