poorman-rag is a high-performance, cost-effective Retrieval-Augmented Generation (RAG) implementation designed to run entirely on AWS Lambda and S3. It natively supports the Model Context Protocol (MCP), making it instantly compatible with AI agents like Claude Desktop and various IDE extensions.
- Zero Infrastructure: No managed vector databases (Pinecone, Weaviate) required. Your data lives in S3 and compute happens in Lambda.
- Insanely Cost-Effective: Pay only for what you use. Ideal for small to medium-sized knowledge bases where a $50/mo vector DB is overkill.
- Hybrid Search: Combines Vector Search (semantic) with SQLite FTS5 (keyword) using Reciprocal Rank Fusion (RRF) for superior result quality.
- Blazing Fast: The search engine is written in Go using
usearchandonnxruntimefor local embedding inference and vector matching. - Protocol Native: Built from the ground up to support MCP, allowing any AI tool to query your knowledge base as a set of tools.
- Indexer (Python): Processes your raw data, generates embeddings, and builds a compact SQLite + Usearch index.
- S3 Storage: Stores the compressed index files and model weights.
- MCP Server (Go): A Lambda function that lazy-loads indexes from S3, performs hybrid search, and communicates via MCP.
- AWS CLI configured
- Serverless Framework installed (
npm install -g serverless) - Go 1.21+ (for building the server)
- Python 3.10+ (for indexing)
Prepare your data using the provided Python scripts in the indexer/ directory.
# Install dependencies
pip install -r indexer/requirements.txt
# Run the indexer (see docs/indexer.md for details)
python indexer/your_indexer.py index# Build the Go binary
GOOS=linux GOARCH=amd64 go build -o bootstrap cmd/mcp/main.go
zip deployment.zip bootstrap lib/libonnxruntime.so
# Deploy using Serverless
export RAG_BUCKET=your-bucket-name
export RAG_KB_ALIASES=docs
sls deploy- Indexer Guide - How to prepare and upload your data.
- Deployment Guide - Detailed AWS setup and configuration.
- MCP Configuration - How to connect poorman-rag to your favorite AI agent.
We welcome contributions! Please check our roadmap and open issues.
MIT License. See LICENSE for details.