MCP RAG Server
Planned integration to support Hugging Face embedding models, enabling use of community models for embedding generation.
Provides integration with OpenAI's embedding models (text-embedding-3-small) for generating vector embeddings used in semantic search and RAG workflows.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP RAG ServerSearch my documents for information about vector embeddings."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP RAG Server
Servidor MCP para RAG com Embeddings Vetoriais e Chunking Inteligente
Servidor MCP completo para Retrieval Augmented Generation — embeddings vetoriais, chunking inteligente e busca semantica.
Funcionalidades | Screenshots | Instalacao | Uso | API
Stack Tecnologica
Tecnologia | Versao | Uso |
3.11+ | Backend async | |
0.104+ | API REST | |
24+ | Containerizacao |
Related MCP server: RAG MCP Server
Screenshots
Swagger UI — Endpoints da API
Qdrant Dashboard — Busca Semantica
Nota: Substitua as imagens por screenshots reais do servidor.
Funcionalidades
Tools MCP
ingest_document— Ingerir documentorag_query— Busca semanticalist_documents— Listar docsdelete_document— Remover dochealth_check— Status
Recursos
Chunking inteligente (paragrafos, sentencas)
Embeddings locais ou OpenAI
Cache de embeddings
CLI para testes rapidos
API REST complementar
Providers de Embedding
Provider | Modelo | Dimensoes | Custo |
Local | all-MiniLM-L6-v2 | 384 | Gratuito |
OpenAI | text-embedding-3-small | 1536 | Pago |
Instalacao
Pre-requisitos
Requisito | Versao Minima | Como verificar |
Python | 3.11+ |
|
Docker | 24+ |
|
Opcao 1 — Docker (Recomendado)
# Clonar
git clone https://github.com/amaralphp/mcp-rag-server.git
cd mcp-rag-server
# Configurar
cp .env.example .env
# Iniciar (Qdrant + Server)
docker compose up -d
# Acessar
# API: http://localhost:8000
# Swagger: http://localhost:8000/docs
# Qdrant: http://localhost:6333/dashboardOpcao 2 — Instalacao Manual
# Clonar
git clone https://github.com/amaralphp/mcp-rag-server.git
cd mcp-rag-server
# Ambiente virtual
python -m venv venv
source venv/bin/activate # Linux/Mac
.\venv\Scripts\Activate.ps1 # Windows
# Dependencias
pip install -e .
# Qdrant (Docker separado)
docker run -d --name qdrant -p 6333:6333 -p 6334:6334 qdrant/qdrant
# Iniciar servidor MCP
python -m src.mcp_server
# OU API REST
uvicorn src.api.main:app --reload --port 8000Variaveis de Ambiente
Variavel | Padrao | Descricao |
|
|
|
| — | Chave OpenAI (se usar) |
|
| Host do Qdrant |
|
| Porta HTTP Qdrant |
|
| Tamanho do chunk |
|
| Overlap entre chunks |
Uso
Via MCP
# Ingerir documento
result = await ingest(
content="Texto do documento...",
source="arquivo.md",
chunk_size=500
)
# Buscar contexto
result = await query(
query="Qual e a pergunta?",
top_k=5
)Via CLI
mcp-rag ingest --file documento.md
mcp-rag query "minha pergunta"
mcp-rag list
mcp-rag delete <doc_id>
mcp-rag healthVia API REST
# Ingerir
curl -X POST http://localhost:8000/ingest \
-H "Content-Type: application/json" \
-d '{"content": "Texto...", "source": "doc.md"}'
# Buscar
curl -X POST http://localhost:8000/query \
-H "Content-Type: application/json" \
-d '{"query": "minha pergunta", "top_k": 5}'API
Metodo | Endpoint | Descricao |
|
| Ingerir documento |
|
| Busca semantica |
|
| Listar documentos |
|
| Remover documento |
|
| Health check |
Estrutura do Projeto
mcp-rag-server/
├── src/
│ ├── mcp_server.py
│ ├── cli.py
│ ├── tools/
│ ├── chunking/
│ ├── embeddings/
│ ├── vectorstore/
│ └── api/
│ ├── main.py
│ ├── routes/
│ └── schemas.py
├── tests/
├── docker-compose.yml
├── Dockerfile
├── requirements.txt
├── pyproject.toml
├── .env.example
├── .github/workflows/ci.yml
├── LICENSE
└── README.mdTestes
pytest -v
pytest --cov=src --cov-report=htmlCI/CD
flowchart LR
A[Push/PR] --> B[Ruff Lint]
B --> C[MyPy]
C --> D[Pytest]
D --> E[Docker Build]
E --> F{Branch main?}
F -->|Sim| G[Push Image]
F -->|Nao| H[Pronto]Roadmap
Hugging Face embeddings
Cohere embeddings
Reranking de resultados
Suporte a PDF/DOCX
Dashboard de metricas
Contribuindo
Fork o repositorio
Crie uma branch (
git checkout -b feature/minha-feature)Commit (
git commit -m 'feat: novo provider')Push (
git push origin feature/minha-feature)Abra um Pull Request
Licenca
Este projeto esta licenciado sob a MIT License.
Veja o arquivo LICENSE para detalhes.
Feito com :heart: para a comunidade de AI/ML
This server cannot be deployed
Maintenance
Related MCP Connectors
Ingest, manage, and retrieve documents for RAG-powered AI applications
Make your knowledge agent-ready. One MCP endpoint, 5 connectors, 3 search modes.
The Needle MCP server enables semantic search on documents stored in files like PDFs, DOCX, and XLSX by connecting AI applications to external data sources. It provides capabilities to create and manage document collections, perform natural language searches on stored content, and retrieve relevant information without requiring exact keyword matches.
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables RAG (Retrieval-Augmented Generation) capabilities with document processing, vector storage, and intelligent Q\&A using OpenAI embeddings and semantic search.-
- FlicenseNot gradedqualityDmaintenanceProvides tools for ingesting documents into a local vector database and retrieving relevant information via semantic search, enabling retrieval-augmented generation for MCP clients.7-
- FlicenseNot gradedqualityDmaintenanceEnables semantic search and AI-powered Q&A over ingested GitHub documentation repositories via MCP tools.-
- AlicenseNot gradedqualityBmaintenanceEnables document-based Q&A with multi-modal RAG, hybrid retrieval, knowledge graph reasoning, and multi-agent orchestration via MCP tools.4MIT