Development · MODEL CONTEXT PROTOCOL
buger docs mcp
Turn any github repo to MCP server, and chat with code or docs
WHAT IT CONNECTS
buger docs mcp 为 AI Agent 提供什么
- **Powered by Probe:** Leverages the [Probe](https://probeai.dev/) search engine for efficient and relevant results.
- **Flexible Content Sources:** Include a specific local directory or clone a Git repository.
- **Pre-build Content:** Optionally bundle documentation/claude-code content directly into the package.
- **Dynamic Configuration:** Configure content sources, Git settings, and MCP tool details via config file, CLI arguments, or environment variables.
- **Automatic Git Updates:** Keep content fresh by automatically pulling changes from a Git repository at a configurable interval.
- **Customizable MCP Tool:** Define the name and description of the search tool exposed to AI assistants.
- **AI Integration:** Seamlessly integrates with AI assistants supporting the Model Context Protocol (MCP).
- `includeDir`: **(Build/Runtime)** Absolute path to a local directory whose contents will be copied to the `data` directory during build, or used directly at runtime if `dataDir` is not specified. Use this OR `gitUrl`.
- `gitUrl`: **(Build/Runtime)** URL of the Git repository. Use this OR `includeDir`.
- If `autoUpdateInterval` is 0 (default), the server attempts to download a `.tar.gz` archive directly (currently assumes GitHub URL structure: `https://github.com/{owner}/{repo}/archive/{ref}.tar.gz`). This is faster but doesn't support updates.
- If `autoUpdateInterval` > 0, the server performs a `git clone` and enables periodic updates.
- `gitRef`: **(Build/Runtime)** The branch, tag, or commit hash to use from the `gitUrl` (default: `main`). Used for both tarball download and Git clone/pull.
- `autoUpdateInterval`: **(Runtime)** Interval in minutes to automatically check for Git updates (default: 0, meaning disabled). Setting this to a value > 0 enables Git cloning and periodic `git pull` operations. Requires the `git` command to be available in the system path.
- `dataDir`: **(Runtime)** Path to the directory containing the content to be searched at runtime. Overrides content sourced from `includeDir` or `gitUrl` defined in the config file or built into the package. Useful for pointing the server to live data without rebuilding.
- `toolName`: **(Build/Runtime)** The name of the MCP tool exposed by the server (default: `search_docs`). Choose a descriptive name relevant to the content.
- `toolDescription`: **(Build/Runtime)** The description of the MCP tool shown to AI assistants (default: "Search documentation using the probe search engine.").
- `ignorePatterns`: **(Build/Runtime)** An array of glob patterns.
- `enableBuildCleanup`: **(Build)** If `true` (default), removes common binary/media files (images, videos, archives, etc.) and files larger than 100KB from the `data` directory after the build step. Set to `false` to disable this cleanup.
- If using `includeDir` during build: Files matching these patterns are excluded when copying to `data`. `.gitignore` rules are also respected.
- If using `gitUrl` or `dataDir` at runtime: Files matching these patterns within the `data` directory are ignored by the search indexer.
- **Runtime Configuration (Highest):** CLI arguments (`--dataDir`, `--gitUrl`, etc.) and Environment Variables (`DATA_DIR`, `GIT_URL`, etc.) override all other settings. CLI arguments take precedence over Environment Variables.
- **Build-time Configuration:** Settings in `docs-mcp.config.json` (`includeDir`, `gitUrl`, `toolName`, etc.) define defaults used during `npm run build` and also serve as runtime defaults if not overridden.
- **Default Values (Lowest):** Internal defaults are used if no configuration is provided (e.g., `toolName: 'search_docs'`, `autoUpdateInterval: 5`).
- **Fork/Clone this Repository:** Start with this project's code.
- **Configure `docs-mcp.config.json`:** Define the `includeDir` or `gitUrl` pointing to your content source. Set the default `toolName` and `toolDescription`.
- **Update `package.json`:** Change the `name` (e.g., `@my-org/my-docs-mcp`), `version`, `description`, etc.
- **Build:** Run `npm run build`. This clones/copies your content into the `data` directory and makes the package ready.
- **Publish:** Run `npm publish` (you'll need npm authentication configured).
- `query`: A natural language query or keywords describing what to search for (e.g., "how to configure the gateway", "database connection example", "user authentication"). The server uses Probe's search capabilities to find relevant content. (Required)
- `page`: The page number for results when dealing with many matches. Defaults to 1 if omitted. (Optional)
SECURITY
MCP 收录不等于安全审核
MCP 服务器可能获得模型上下文、凭据、本地文件或调用外部系统的权限。连接 Agent 前,请检查代码、环境变量、网络行为、软件包来源与维护状态。