MCP RAG Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP RAG Server with Advanced Keyword Emphasis
A professional, scalable Model Context Protocol (MCP) server featuring intelligent keyword emphasis for precision-focused semantic search and web content extraction.
π― Unique Feature: Keyword Emphasis - Unlike standard semantic search, this server allows you to emphasize specific keywords in your queries, giving you precise control over search focus and dramatically improving result relevance.
Features
π― Advanced Keyword Emphasis: Revolutionary token-level weighting for precision-focused semantic search
Intelligent Web Scraping: Uses Crawl4AI for advanced web content extraction
Semantic Search with Keyword Emphasis: Powered by nomic-ai/nomic-embed-text-v1 embedding model
Vector Storage: ChromaDB for efficient vector storage and retrieval
Precision Query Control: Focus search on specific aspects using keyword emphasis
Rate Limiting: Built-in rate limiting for responsible crawling
Multiple Extraction Strategies: Optimized extractors for articles, products, documentation, and forums
Docker Support: Easy deployment with Docker and docker-compose
Async Architecture: Fully asynchronous for optimal performance
Related MCP server: Crawl4AI RAG MCP Server
Architecture
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β MCP Client ββββββΆβ MCP Server ββββββΆβ Crawl4AI β
β (LLM/Claude) β β β β (Web Scraper) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β ChromaDB β β Nomic AI β
β (Vector Store) βββββββ Embeddings β
βββββββββββββββββββ βββββββββββββββββββInstallation
Using bash script
./scripts/setup_python_mcp.shUsing Poetry
poetry installUsing pip
pip install -r requirements.txtUsing Docker
docker compose up -dor
./scripts/setup_docker_mcp.shQuick Start
Clone the repository
git clone <repository-url> cd mcp-rag-serverSet up environment
cp .env.example .env # Edit .env with your configurationRun the server
./scripts/run_python_mcp.shConnect with MCP client
# For Claude Desktop, add to config: { "mcpServers": { "web-rag": { "command": "mcp-rag-server/scripts/run_python_mcp.sh", "cwd": "mcp-rag-server", "env": { "MCP_CHROMA_PATH": "mcp-rag-server/data/chroma_db" } } } }
Available Tools
1. crawl_website
Crawl a website and store documents in the vector database.
Parameters:
url(str): Starting URL to crawlmax_pages(int): Maximum number of pages to crawl (default: 5)include_external(bool): Whether to include external links (default: false)
Example:
await crawl_website(
url="https://example.com",
max_pages=2,
include_external=False
)2. search_knowledge
Search the knowledge base using semantic search with optional keyword emphasis.
Parameters:
query(str): Search queryn_results(int): Number of results to return (default: 5)keywords(list): Keywords to emphasize in search (optional)
Example:
results = await search_knowledge(
query="What is feature scaling in machine learning?",
n_results=5,
keywords=["feature", "scaling"]
)3. get_database_stats
Get statistics about the vector database.
Example:
stats = await get_database_stats()Keyword Emphasis Feature
The server supports keyword emphasis in search queries, allowing users to focus on specific aspects of their search. This is particularly useful when:
Technical Documentation: Emphasize specific APIs, functions, or concepts
Product Research: Focus on features, pricing, or specifications
Academic Content: Highlight methodologies, results, or theories
Troubleshooting: Emphasize error messages, solutions, or configurations
How it works:
Keywords receive 2x importance weight in the embedding space
Uses token-level weighting during embedding generation
Combines weighted pooling with CLS token representation
Gracefully falls back to standard search if keyword weighting fails
Example Use Cases:
# Focus on performance aspects
search_knowledge(
query="database optimization techniques",
keywords=["database", "optimization"]
)
# Emphasize specific technologies
search_knowledge(
query="React Vue Angular web development frameworks comparison",
keywords=["React", "Vue", "Angular"]
)Development
Running Tests
pytest tests/Deployment
Docker Deployment
# Build and run with docker-compose
docker compose up -d
# View logs
docker compose logs -f mcp-rag-serverProduction Considerations
Database Persistence: Mount ChromaDB directory as volume
Scaling: Use multiple instances with shared ChromaDB
Monitoring: Enable comprehensive logging and metrics
Security: Implement authentication for MCP endpoints
Rate Limiting: Configure appropriate limits for your use case
Troubleshooting
Common Issues
ChromaDB Connection Error
Ensure ChromaDB service is running
Check connection settings in config
Embedding Model Download
First run downloads the model (~500MB)
Ensure sufficient disk space
Rate Limiting
Adjust
max_requests_per_minuteif getting blockedAdd delays between requests
Memory Usage
Large crawls can consume significant memory
Use smaller
max_pagesvaluesEnable chunking for large documents
Contributing
Fork the repository
Create a feature branch
Make your changes
Run tests and linting
Submit a pull request
License
MIT License - see LICENSE file for details
Acknowledgments
Crawl4AI for web scraping
Nomic AI for embedding models
ChromaDB for vector storage
Model Context Protocol for the MCP specification
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Web search, URL content extraction to Markdown, site mapping, and recursive web crawler.
Web data for agents. Extract web pages, crawl websites, discover URLs, and search the web.
Search the web, fetch any URL and map a site as clean, LLM-ready Markdown.
Crawl websites into LLM-ready RAG Markdown chunks and extract verified MX emails & tech stacks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search the web, crawl websites, and perform intelligent RAG queries with semantic search capabilities. Includes integrated private search engine, vector database storage, and optional knowledge graph for AI hallucination detection in code repositories.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to crawl websites, extract and store web content with semantic search capabilities using vector embeddings, and retrieve information through natural language queries with tag-based filtering and intelligent content cleaning.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to query and retrieve topic-specific knowledge from recursively crawled and indexed web pages.297 npm11MIT
- AlicenseNot gradedqualityDmaintenanceProvides web crawling and RAG capabilities for AI agents, enabling scraping of websites, storing content in a vector database (Supabase), and performing semantic search over crawled data.MIT