BerryRAG
Supports OpenAI embeddings as one of multiple embedding provider options for generating vector representations of documents in the RAG system.
Click on "Install 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., "@BerryRAGsearch for React hooks documentation in the vector database"
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.
š BerryRAG: Local Vector Database with Playwright MCP Integration
A complete local RAG (Retrieval-Augmented Generation) system that integrates Playwright MCP web scraping with vector database storage for Claude.
⨠Features
Zero-cost self-hosted vector database
Playwright MCP integration for automated web scraping
Multiple embedding providers (sentence-transformers, OpenAI, fallback)
Smart content processing with quality filters
Claude-optimized context formatting
MCP server for direct Claude integration
Command-line tools for manual operation
Related MCP server: local_lense
š Quick Start
1. Installation
git clone https://github.com/berrydev-ai/berry-rag.git
cd berry-rag
# Install dependencies
npm run install-deps
# Setup directories and instructions
npm run setup2. Configure Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest"]
},
"berry-rag": {
"command": "node",
"args": ["mcp_servers/vector_db_server.js"],
"cwd": "/Users/eberry/BerryDev/berry-rag"
}
}
}3. Start Using
# Example workflow:
# 1. Scrape with Playwright MCP through Claude
# 2. Process into vector DB
npm run process-scraped
# 3. Search your knowledge base
npm run search "React hooks"š Project Structure
berry-rag/
āāā src/ # Python source code
ā āāā rag_system.py # Core vector database system
ā āāā playwright_integration.py # Playwright MCP integration
āāā mcp_servers/ # MCP server implementations
ā āāā vector_db_server.ts # TypeScript MCP server
āāā storage/ # Vector database storage
ā āāā documents.db # SQLite metadata
ā āāā vectors/ # NumPy embedding files
āāā scraped_content/ # Playwright saves content here
āāā dist/ # Compiled TypeScriptš§ Commands
Streamlit Web Interface
Launch the web interface for easy interaction with your RAG system:
# Start the Streamlit web interface
python run_streamlit.py
# Or directly with streamlit
streamlit run streamlit_app.pyThe web interface provides:
š Search: Interactive document search with similarity controls
š Context: Generate formatted context for AI assistants
ā Add Document: Upload files or paste content directly
š List Documents: Browse your document library
š Statistics: System health and performance metrics
NPM Scripts
Command | Description |
| Install all dependencies |
| Initialize directories and instructions |
| Compile TypeScript MCP server |
| Process scraped files into vector DB |
| Search the knowledge base |
| List all documents |
Python CLI
# RAG System Operations
python src/rag_system.py search "query"
python src/rag_system.py context "query" # Claude-formatted
python src/rag_system.py add <url> <title> <file>
python src/rag_system.py list
python src/rag_system.py stats
# Playwright Integration
python src/playwright_integration.py process
python src/playwright_integration.py setup
python src/playwright_integration.py statsš¤ Usage with Claude
1. Scraping Documentation
"Use Playwright to scrape the React hooks documentation from https://react.dev/reference/react and save it to the scraped_content directory"2. Processing into Vector Database
"Process all new scraped files and add them to the BerryRAG vector database"3. Querying Knowledge Base
"Search the BerryRAG database for information about React useState best practices"
"Get context from the vector database about implementing custom hooks"š MCP Tools Available to Claude
BerryRAG provides two powerful MCP servers for Claude integration:
Vector DB Server Tools
add_document- Add content directly to vector DBsearch_documents- Search for similar contentget_context- Get formatted context for querieslist_documents- List all stored documentsget_stats- Vector database statisticsprocess_scraped_files- Process Playwright scraped contentsave_scraped_content- Save content for later processing
BerryExa Server Tools
crawl_content- Advanced web content extraction with subpage supportextract_links- Extract internal links for subpage discoveryget_content_preview- Quick content preview without full processing
š For complete MCP setup and usage guide, see BERRY_MCP.md
š§ Embedding Providers
The system supports multiple embedding providers with automatic fallback:
sentence-transformers (recommended, free, local)
OpenAI embeddings (requires API key, set
OPENAI_API_KEY)Simple hash-based (fallback, not recommended for production)
āļø Configuration
Environment Variables
# Optional: for OpenAI embeddings
export OPENAI_API_KEY=your_key_hereContent Quality Filters
The system automatically filters out:
Content shorter than 100 characters
Navigation-only content
Repetitive/duplicate content
Files larger than 500KB
Chunking Strategy
Default chunk size: 500 characters
Overlap: 50 characters
Smart boundary detection (sentences, paragraphs)
š Monitoring
Check System Status
# Vector database statistics
python src/rag_system.py stats
# Processing status
python src/playwright_integration.py stats
# View recent documents
python src/rag_system.py listStorage Information
Database:
storage/documents.db(SQLite metadata)Vectors:
storage/vectors/(NumPy arrays)Scraped Content:
scraped_content/(Markdown files)
š Example Workflows
Academic Research
Scrape research papers with Playwright
Process into vector database
Query for specific concepts across all papers
Documentation Management
Scrape API documentation from multiple sources
Build unified searchable knowledge base
Get contextual answers about implementation details
Content Aggregation
Scrape blog posts and articles
Create topic-based knowledge clusters
Find related content across sources
š ļø Development
Building the MCP Server
npm run buildRunning in Development Mode
npm run dev # TypeScript watch modeTesting
# Test RAG system
python src/rag_system.py stats
# Test integration
python src/playwright_integration.py setup
# Test MCP server
node mcp_servers/vector_db_server.jsšØ Troubleshooting
Common Issues
Python dependencies missing:
pip install -r requirements.txtTypeScript compilation errors:
npm install
npm run buildEmbedding model download slow: The first run downloads sentence-transformers model (~90MB). This is normal.
No results from search:
Check if documents were processed:
python src/rag_system.py listVerify content quality filters aren't too strict
Try broader search terms
Logs and Debugging
Python logs: Check console output
MCP server logs: Stderr output
Processing status:
scraped_content/.processed_files.json
š License
MIT License - feel free to modify and extend for your needs.
š¤ Contributing
This is a personal project for Eric Berry, but feel free to fork and adapt for your own use cases.
Happy scraping and searching! š·ļøšāØ
This server cannot be installed
Maintenance
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
- Flicense-qualityDmaintenanceA local-first MCP server that enables semantic search over PDF and DOCX documents using structure-aware parsing and vector storage. It allows users to query their local knowledge base through Claude Code without cloud dependencies or GPU requirements.
- Alicense-qualityDmaintenanceA local RAG-powered documentation search system that uses vector embeddings and Qdrant to enable semantic search across markdown, HTML, and other file formats. It provides an MCP interface for AI tools like Cursor to intelligently query and retrieve information from local knowledge bases.MIT
- Alicense-qualityDmaintenanceA database-agnostic MCP server that integrates web crawling with Retrieval Augmented Generation, supporting multiple AI providers and vector database backends for flexible and intelligent content retrieval.1MIT
- Alicense-qualityDmaintenanceA local RAG MCP server that enables AI tools like Claude to search indexed codebases and documentation using vector search with Ollama models.Apache 2.0
Related MCP Connectors
A personal RAG database you build from chat, so AI creates work that sounds like you.
Jina AI Reader/Search MCP ā turn any URL into clean LLM-ready markdown, plus web search.
Hosted MCP memory: save sessions/decisions once, search from Claude, Cursor, ChatGPT. EU-hosted FTS.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/berrydev-ai/berry-rag'
If you have feedback or need assistance with the MCP directory API, please join our Discord server