loading…
Search for a command to run...
loading…
An MCP server that provides full-text search over documentation using Whoosh, enabling AI assistants to find up-to-date, authoritative answers.
An MCP server that provides full-text search over documentation using Whoosh, enabling AI assistants to find up-to-date, authoritative answers.
A Model Context Protocol (MCP) server that provides full-text search capabilities for documentation using Whoosh. This allows AI assistants like Cline and GitHub Copilot to search and retrieve relevant documentation.
Large language models (LLMs) are often trained on outdated code and documentation, which can lead to suggestions that use deprecated functions or patterns. This MCP server uses Whoosh for fast, precise, and explainable full-text search over your latest documentation, helping AI assistants and users find up-to-date, authoritative answers. This improves coding correctness and reliability, especially in technical environments. Whoosh is lightweight, CPU-friendly, and requires no embeddings or GPUs. For best results, include synonyms in your queries to broaden coverage.
The MCP server exposes the following tools to AI assistants:
search_documentation - Search indexed documentation with full-text searchbuild_documentation_index - Build/rebuild the search index from documentation filesupdate_documentation_index - Update the existing index (currently performs full rebuild)get_index_info - Get information about the current index statusThe easiest way to install the package is from PyPI:
pip install whoosh-rag-mcp
Alternatively, you can install directly from GitHub:
pip install git+https://github.com/jianlins/whoosh_rag_mcp.git
Or for development (editable install):
git clone https://github.com/jianlins/whoosh_rag_mcp.git
cd whoosh_rag_mcp
pip install -e .
The server uses environment variables to locate documentation:
DOCS_ROOT - Path to your documentation directory (default: ./references)INDEX_DIR - Path to store the Whoosh index (default: ./whoosh_index)Choose the appropriate configuration method based on your AI assistant:
Add the server configuration to your Cline MCP settings file:
Windows: %APPDATA%\Code - Insiders\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
macOS: ~/Library/Application Support/Code - Insiders/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Linux: ~/.config/Code - Insiders/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Add this configuration to the mcpServers object:
{
"mcpServers": {
"whoosh-rag-docs": {
"command": "python",
"args": ["-m", "whoosh_rag_mcp.mcp_server"],
"env": {
"DOCS_ROOT": "c:/Users/YourUsername/Projects/whoosh_rag_mcp/references",
"INDEX_DIR": "c:/Users/YourUsername/Projects/whoosh_rag_mcp/whoosh_index"
},
"disabled": false,
"autoApprove": []
}
}
}
Important: Replace the paths with your actual project directory paths.
Cline MCP Configuration Example:

GitHub Copilot uses a different configuration format than Cline. You'll create an mcp.json file instead of editing settings.json.
Method 1: Using the Command Palette (Recommended)
Open the Command Palette (Ctrl+Shift+P on Windows/Linux or Cmd+Shift+P on macOS)
Run the command: MCP: Add Server
When prompted, select stdio as the server type
Fill in the server details:
whoosh-rag-docspython (or full path to Python if not in PATH)-mwhoosh_rag_mcp.mcp_serverAdd environment variables:
DOCS_ROOT, Value: c:/Users/YourUsername/Projects/whoosh_rag_mcp/referencesINDEX_DIR, Value: c:/Users/YourUsername/Projects/whoosh_rag_mcp/whoosh_indexSelect where to save: Choose Global (for all workspaces) or Workspace (current project only)
Method 2: Manual Configuration
Create the MCP configuration file:
.vscode/mcp.json in your projectAdd the server configuration:
{
"servers": {
"whoosh-rag-docs": {
"command": "python",
"args": ["-m", "whoosh_rag_mcp.mcp_server"],
"env": {
"DOCS_ROOT": "c:/Users/YourUsername/Projects/whoosh_rag_mcp/references",
"INDEX_DIR": "c:/Users/YourUsername/Projects/whoosh_rag_mcp/whoosh_index"
}
}
}
}
Note: Using python -m whoosh_rag_mcp.mcp_server is more portable than specifying the direct file path. Make sure the package is installed or your Python path includes the project directory.
If Python is not in your PATH, use the full path:
"command": "c:/Users/YourUsername/AppData/Local/Programs/Python/Python311/python.exe"
Start the MCP server:
whoosh-rag-docs and click Start Serverchat.mcp.autostart to true in VS Code settingsVerify the connection:
whoosh-rag-docs listedBefore searching, you need to build the index. You can either:
Option A: Use Cline to build the index:
Option B: Build manually from command line:
python -m whoosh_rag_mcp.doc_retriever --build
Safety Feature: If an index already exists, you'll be prompted to confirm before overwriting it. This prevents accidental loss of your existing index.
CLI Options:
--build: Prompts for confirmation if index existspython -m whoosh_rag_mcp.doc_retriever --build
--build-force: Skips confirmation and rebuilds immediatelypython -m whoosh_rag_mcp.doc_retriever --build-force
MCP Tool: When calling build_documentation_index, if an index exists, you must set the force parameter to true:
{
"force": true
}
Once configured, AI assistants can use the tools automatically.
Here are some example prompts:
You can interact with the MCP server in several ways:
Method 1: Using @participant syntax (if supported):
@whoosh-rag-docs search for information about task retries
Method 2: Direct tool invocation (recommended):
Can you search the documentation for "flow decorators"?
Method 3: Natural language requests:
I need help understanding deployment configuration. Can you search the docs?
Example Copilot Chat interactions:
whoosh_rag_mcp/
├── src/
│ └── whoosh_rag_mcp/
│ ├── __init__.py # Package initialization
│ ├── mcp_server.py # MCP server implementation
│ └── doc_retriever.py # Core search and indexing logic
├── references/ # Your documentation files go here
│ ├── dask_docs/
│ ├── prefect_docs/
│ └── setuptools_docs/
├── whoosh_index/ # Search index (auto-generated)
├── pyproject.toml # Package configuration (setuptools)
├── requirements.txt # Python dependencies
└── README.md # This file
search_documentation toolYou can also use the search functionality directly from the command line:
# Build the index (will prompt for confirmation if index exists)
python -m whoosh_rag_mcp.doc_retriever --build
# Force rebuild the index (skips confirmation prompt)
python -m whoosh_rag_mcp.doc_retriever --build-force
# Update the index (currently same as --build, will prompt if index exists)
python -m whoosh_rag_mcp.doc_retriever --update
# Search documentation
python -m whoosh_rag_mcp.doc_retriever --query "your search terms" --json
# Search by section
python -m whoosh_rag_mcp.doc_retriever --query "your search terms" --section --json
# Get full content
python -m whoosh_rag_mcp.doc_retriever --query "your search terms" --full --json
pip install -r requirements.txtVisual Reference:

MCP server not appearing or not starting:
Verify the configuration file:
mcp.json, NOT settings.json.vscode/mcp.json (for workspace)Check the configuration format:
"servers" key (not "mcpServers" like Cline){
"servers": {
"whoosh-rag-docs": {
"command": "python",
"args": ["-m", "whoosh_rag_mcp.mcp_server"],
"env": {
"DOCS_ROOT": "c:/path/to/references",
"INDEX_DIR": "c:/path/to/whoosh_index"
}
}
}
}
Start the MCP server:
whoosh-rag-docs and select Start ServerVerify Python path:
python --version"command" field"c:/Users/YourUsername/AppData/Local/Programs/Python/Python311/python.exe""/usr/local/bin/python3" or "/usr/bin/python3"Check VS Code Output panel:
View > OutputRestart VS Code completely:
Test the MCP server manually:
python -m whoosh_rag_mcp.mcp_server
Ctrl+C to stopCopilot not using the MCP tools:
Build the index first (required before searches work):
python -m whoosh_rag_mcp.doc_retriever --build
Be explicit in your requests:
Check if GitHub Copilot Chat supports MCP:
Extensions > Search for "GitHub Copilot" > Update if availableget_index_infobuild_documentation_indexDOCS_ROOT points to a directory containing .md, .mdx, or .rst filesDOCS_ROOT directory exists and contains documentation filesINDEX_DIRMIT License - see LICENSE file for details
Выполни в терминале:
claude mcp add whoosh-rag-mcp -- npx Web content fetching and conversion for efficient LLM usage.
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolProvides auto-configuration for setting up an MCP server in Spring Boot applications.
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzНе уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai