
alizdavoodi/mcpdocsearch
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
alizdavoodi / mcpdocsearch - кандидат на сервер MCP, импортированный из https://github.com/alizdavoodi/mcpdocsearch.
Обзор
alizdavoodi / mcpdocsearch - кандидат на сервер MCP, импортированный из https://github.com/alizdavoodi/mcpdocsearch.
Обзор (машинный перевод)
Этот проект предоставляет набор инструментов для сканирования веб-сайтов, создания документации Markdown и обеспечения поиска этой документации с помощью сервера Model Context Protocol (MCP), предназначенного для интеграции с такими инструментами, как Cursor.
Особенности
- Web Crawler (
crawler_cli): - Сканирует веб-сайты, начиная с данного URL-адреса, используя
crawl4ai. Настраиваемая глубина сканирования, шаблоны URL (включают / исключают), типы контента и т. Д. - Факультативная очистка HTML перед конверсией Markdown (удаляет нав-ссылки, заголовки, нижние колонтитулы).
Создает единый консолидированный файл Markdown из сканированного контента.
Сохраняет вывод
./storage/по умолчанию. MCP Server (mcp_server): Загружает файлы Markdown из каталога./storage/. - Разбивает Маркдаун на семантические куски на основе заголовков.
- Генерирует векторные встраивания для каждого фрагмента с использованием
sentence-transformersmulti-qa-mpnet-base-dot-v1. **Caching: ** Использует файл кэша (storage/document_chunks_cache.pkl) для хранения обработанных фрагментов и встраивания. Первый забег Первоначальный запуск сервера после сканирования новых документов может занять некоторое время, поскольку он должен анализировать, фрагментировать и генерировать вложения для всего контента.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
Documentation Crawler & MCP Server
This project provides a toolset to crawl websites, generate Markdown documentation, and make that documentation searchable via a Model Context Protocol (MCP) server, designed for integration with tools like Cursor.
Features
- Web Crawler (
crawler_cli):- Crawls websites starting from a given URL using
crawl4ai. - Configurable crawl depth, URL patterns (include/exclude), content types, etc.
- Optional cleaning of HTML before Markdown conversion (removes nav links, headers, footers).
- Generates a single, consolidated Markdown file from crawled content.
- Saves output to
./storage/by default.
- Crawls websites starting from a given URL using
- MCP Server (
mcp_server):- Loads Markdown files from the
./storage/directory. - Parses Markdown into semantic chunks based on headings.
- Generates vector embeddings for each chunk using
sentence-transformers(multi-qa-mpnet-base-dot-v1). - Caching: Utilizes a cache file (
storage/document_chunks_cache.pkl) to store processed chunks and embeddings.- First Run: The initial server startup after crawling new documents may take some time as it needs to parse, chunk, and generate embeddings for all content.
- Subsequent Runs: If the cache file exists and the modification times of the source
.mdfiles in./storage/haven’t changed, the server loads directly from the cache, resulting in much faster startup times. - Cache Invalidation: The cache is automatically invalidated and regenerated if any
.mdfile in./storage/is modified, added, or removed since the cache was last created.
- Exposes MCP tools via
fastmcpfor clients like Cursor:list_documents: Lists available crawled documents.get_document_headings: Retrieves the heading structure for a document.search_documentation: Performs semantic search over document chunks using vector similarity.
- Loads Markdown files from the
- Cursor Integration: Designed to run the MCP server via
stdiotransport for use within Cursor.
Workflow
- Crawl: Use the
crawler_clitool to crawl a website and generate a.mdfile in./storage/. - Run Server: Configure and run the
mcp_server(typically managed by an MCP client like Cursor). - Load & Embed: The server automatically loads, chunks, and embeds the content from the
.mdfiles in./storage/. - Query: Use the MCP client (e.g., Cursor Agent) to interact with the server’s tools (
list_documents,search_documentation, etc.) to query the crawled content.
Setup
This project uses uv for dependency management and execution.
-
Install
uv: Follow the instructions on the uv website. -
Clone the repository:
git clone https://github.com/alizdavoodi/MCPDocSearch.git cd MCPDocSearch -
Install dependencies:
uv sync
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"doc-query-server": {
"command": "uv",
"args": [
"--directory",
// IMPORTANT: Replace with the ABSOLUTE path to this project directory on your machine
"/path/to/your/MCPDocSearch",
"run",
"python",
"-m",
"mcp_server.main"
],
"env": {}
}
}
}