Metadata-Version: 2.5
Name: mcp-win-stdio-rag
Version: 0.5.7
Summary: Windows-optimized RAG MCP Server with Playwright crawling, Link Graph trees, and local hybrid search.
Author: Mohan Kumar Indala
License-Expression: MIT
Keywords: crawler,knowledge-graph,mcp,playwright,rag,stdio,vector-search
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Requires-Dist: mcp-win-stdio>=0.5.7
Requires-Dist: mcp>=2.0.0
Requires-Dist: networkx>=3.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: playwright>=1.40.0
Description-Content-Type: text/markdown

# mcp-win-stdio-rag

Windows-optimized RAG MCP server for indexing documentation and repositories, then retrieving cited, bounded context for coding agents.

## Tools

The server exposes 11 tools:

| Workflow | Tools |
| --- | --- |
| Indexing | `crawl_and_index_url`, `index_local_codebase`, `index_remote_repo` |
| Retrieval | `query_knowledge_base`, `get_chunk_context`, `find_related_chunks`, `get_knowledge_tree` |
| Collection management | `list_rag_collections`, `rag_status`, `delete_rag_collection`, `prune_rag_cache` |

## Agent workflow

1. Index a local workspace with `index_local_codebase` or documentation with `crawl_and_index_url`; use `index_remote_repo` for GitHub sources.
2. Call `list_rag_collections` to discover available sources, then search with `query_knowledge_base`. Omit the collection to search all indexed sources.
3. Follow citations and pass both the result's `chunk_id` and `collection` to `get_chunk_context` and `find_related_chunks`; chunk IDs can repeat across collections. Use `get_knowledge_tree` to browse a collection.
4. Treat retrieval confidence as a relevance signal, not proof; confirm cited material before relying on it.

## Search and storage

Search combines SQLite FTS5 BM25 with TF-IDF ranking when scikit-learn is installed, and falls back to token overlap when it is not. Confidence uses normalized whole-term overlap rather than substring matches, ignores common question filler, and abstains when fewer than one quarter of meaningful query terms are covered by the top results. Indexes are stored locally under `%USERPROFILE%\\.mcp-win-stdio\\rag_stores` by default; set `MCP_RAG_DATA_DIR` to choose another location.

`prune_rag_cache` removes expired temporary collections first. Unless `purge_temp_only` is enabled, it then removes oldest-modified collections until storage is within `max_total_mb`. `delete_rag_collection` permanently removes one selected collection.

## Installation & CLI Usage

```powershell
pip install mcp-win-stdio-rag
```

```powershell
mws guide rag                            # Print client configuration snippets
mws run rag                              # Launch server over stdio via mws
mws-rag                                  # Standalone stdio server
mws-rag --transport sse --port 8080      # Standalone SSE HTTP server
```
