A lightweight MCP server that brings RAG capabilities to your LLM over Markdown stored on S3.
3.1K
A lightweight Model Context Protocol (MCP)â server that brings RAG (Retrieval-Augmented Generation) capabilities to your LLM over Markdown documentation stored on S3.
Built for simplicity:
Important
ð§ This project is a work in progress. APIs and behavior may change at any time, and backward compatibility is not ensured. Not suitable for production.
nomic-embed-text model# 1. Prerequisites
# Install Ollama from https://ollama.ai
ollama pull nomic-embed-text
# 2. Configure
cp env.example .env # Add your S3 credentials
# 3. Run
docker run -d \
--name s3-doc-mcp \
-p 3000:3000 \
--env-file .env \
-e OLLAMA_BASE_URL=http://host.docker.internal:11434 \
-v $(pwd)/data:/app/data \
yoanbernabeu/s3-doc-mcp:latest
Or use Docker Compose (Local Build):
docker compose up -d
# 1. Prerequisites
# Install Ollama from https://ollama.ai
ollama pull nomic-embed-text
# 2. Install & Run
npm install
cp env.example .env # Configure your S3 credentials
npm run build && npm start
# 3. For local development
npm run dev
Your MCP server is now running on http://localhost:3000
Once your server is running, you need to configure your MCP client to connect to it.
Edit your ~/.cursor/mcp.json file and add:
{
"mcpServers": {
"doc": {
"type": "streamable-http",
"url": "http://127.0.0.1:3000/mcp",
"note": "S3 Documentation RAG Server"
}
}
}
Edit your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json{
"mcpServers": {
"doc": {
"type": "streamable-http",
"url": "http://127.0.0.1:3000/mcp",
"note": "S3 Documentation RAG Server"
}
}
}
Restart your MCP client, and you should now see the search_documentation and refresh_index tools available.
ðĄ Tip: If using Docker, make sure the port mapping matches your configuration (default is
3000:3000)
search_documentation and refresh_indexThe server follows a simple pipeline:
.md files, downloads their content, and tracks ETags for change detectionnomic-embed-textâ model (running locally)search_documentation and refresh_index tools via HTTP for your LLM to useHNSWLibâ (Hierarchical Navigable Small World) is a lightweight, in-memory vector search library that's perfect for this use case:
It's the sweet spot between simplicity and performance for RAG applications.
Copy env.example to .env and configure your environment variables:
cp env.example .env
# S3 Configuration
S3_BUCKET_NAME=your-bucket-name # Your S3 bucket name
S3_ACCESS_KEY_ID=your-access-key # S3 access key
S3_SECRET_ACCESS_KEY=your-secret-key # S3 secret key
S3_REGION=us-east-1 # S3 region
S3_ENDPOINT= # Optional: for non-AWS S3 (MinIO, Scaleway, etc.)
# Ollama Configuration
OLLAMA_BASE_URL=http://localhost:11434 # Ollama API endpoint
See env.exampleâ for all available options and detailed documentation (RAG parameters, sync mode, chunk size, etc.).
search_documentation{
"query": "How to configure S3?",
"max_results": 4
}
Returns relevant document chunks with similarity scores and sources.
refresh_index{
"force": false // true = full reindex, false = incremental
}
Syncs the index with S3. Use force: true to rebuild everything.
Content type
Image
Digest
sha256:a7ceba7f4âĶ
Size
207.6 MB
Last updated
6 months ago
docker pull yoanbernabeu/s3-doc-mcp