Labsco
buger logo

Docs MCP Server

โ˜… 89

from buger

An MCP server that makes documentation and codebases searchable for AI assistants, supporting local directories and Git repositories.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys

Docs MCP Server

A flexible Model Context Protocol (MCP) server powered by Probe that makes any documentation or codebase searchable by AI assistants.

Chat with code or your docs by simply pointing to a git repo or folder:

Copy & paste โ€” that's it
npx -y @probelabs/docs-mcp@latest --gitUrl https://github.com/probelabs/probe

Use Cases:

  • Chat with any GitHub Repository: Point the server to a public or private Git repository to enable natural language queries about its contents.
  • Search Your Documentation: Integrate your project's documentation (from a local directory or Git) for easy searching.
  • Build Custom MCP Servers: Use this project as a template to create your own official MCP servers tailored to specific documentation sets or even codebases.

The content source (documentation or code) can be pre-built into the package during the npm run build step, or configured dynamically at runtime using local directories or Git repositories. By default, when using a gitUrl without enabling auto-updates, the server downloads a .tar.gz archive for faster startup. Full Git cloning is used only when autoUpdateInterval is greater than 0.

Features

  • Powered by Probe: Leverages the Probe 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/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).

Creating Your Own Pre-built MCP Server

You can use this project as a template to create and publish your own npm package with documentation or code pre-built into it. This provides a zero-configuration experience for users (like Example 2 above).

  1. Fork/Clone this Repository: Start with this project's code.
  2. Configure docs-mcp.config.json: Define the includeDir or gitUrl pointing to your content source. Set the default toolName and toolDescription.
  3. Update package.json: Change the name (e.g., @my-org/my-docs-mcp), version, description, etc.
  4. Build: Run npm run build. This clones/copies your content into the data directory and makes the package ready.
  5. Publish: Run npm publish (you'll need npm authentication configured).

Now, users can run your specific documentation server easily: npx @my-org/my-docs-mcp@latest.

(The previous "Running", "Dynamic Configuration at Runtime", and "Environment Variables" sections have been removed as npx usage with arguments within client configurations is now the primary documented method.)

Using with AI Assistants

This MCP server exposes a search tool to connected AI assistants via the Model Context Protocol. The tool's name and description are configurable (see Configuration section). It searches the content within the currently active data directory (determined by build settings, config file, CLI args, or environment variables).

Tool Parameters:

  • 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)

Example Tool Call (using search_tyk_docs from Usage Example 1):

Copy & paste โ€” that's it
{
  "tool_name": "search_tyk_docs",
  "arguments": {
    "query": "gateway rate limiting",
    "page": 1 // Requesting the first page
  }
}

Example Tool Call (using the tool from the @tyk/docs-mcp package):

Assuming the pre-built package @tyk/docs-mcp defined its tool name as search_tyk_official_docs:

Copy & paste โ€” that's it
{
  "tool_name": "search_tyk_official_docs",
  "arguments": {
    "query": "dashboard api access",
    "page": 2 // Requesting the second page
  }
}

(The previous "Publishing as an npm Package" section has been replaced by the "Creating Your Own Pre-built MCP Server" section above.)

Third-Party Integrations

Install via Smithery

To install Docs MCP Server for Claude Desktop automatically via Smithery:

Copy & paste โ€” that's it
npx -y @smithery/cli install @probelabs/docs-mcp --client claude

smithery badge

Community Listings

<a href="https://glama.ai/mcp/servers/@probelabs/docs-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@probelabs/docs-mcp/badge" alt="Docs Server MCP server" /> </a>

MseeP.ai Security Assessment Badge

Automated NPM Releases with GitHub Actions

This project includes a reusable GitHub Actions workflow that makes releasing MCP servers to NPM incredibly simple. You can use this workflow in any project to automatically build and publish your MCP server when you push a git tag.

Using the Reusable Release Workflow

To use this automated release system in your own project, create a single file .github/workflows/release.yml:

Copy & paste โ€” that's it
name: Release MCP

on:
  push:
    tags:
      - 'v*'

jobs:
  release:
    uses: probelabs/docs-mcp/.github/workflows/release-mcp.yml@main
    with:
      package-name: '@yourorg/your-mcp-server'
      package-description: 'Your MCP Server Description'
      include-folders: 'src,data,bin'  # Folders to include in the package
      include-files: '*.json,*.md'     # File patterns to include
    secrets:
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Then simply create a git tag to trigger a release:

Copy & paste โ€” that's it
git tag v1.0.0
git push origin v1.0.0

Workflow Input Parameters

ParameterRequiredDefaultDescription
package-nameYes-NPM package name (e.g., @org/my-mcp)
package-descriptionNoMCP ServerPackage description
entry-pointNosrc/index.jsMain entry file path
include-foldersNosrc,data,binComma-separated list of folders to include
include-filesNo*.json,*.md,LICENSEComma-separated list of file patterns
dependenciesNo{}Additional dependencies as JSON string
build-commandNo-Build command to run before publishing
node-versionNo18Node.js version to use

Example Configurations

Minimal Configuration

Copy & paste โ€” that's it
jobs:
  release:
    uses: probelabs/docs-mcp/.github/workflows/release-mcp.yml@main
    with:
      package-name: '@myorg/simple-mcp'
    secrets:
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

With Custom Dependencies

Copy & paste โ€” that's it
jobs:
  release:
    uses: probelabs/docs-mcp/.github/workflows/release-mcp.yml@main
    with:
      package-name: '@myorg/custom-mcp'
      dependencies: '{"lodash": "^4.17.21", "dotenv": "^16.0.0"}'
    secrets:
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

With Build Step

Copy & paste โ€” that's it
jobs:
  release:
    uses: probelabs/docs-mcp/.github/workflows/release-mcp.yml@main
    with:
      package-name: '@myorg/built-mcp'
      build-command: 'npm run build && npm run prepare-data'
      include-folders: 'dist,assets'
    secrets:
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Prerequisites

  1. Add NPM_TOKEN secret to your GitHub repository (Settings โ†’ Secrets โ†’ Actions)
  2. Ensure you have npm publish access for your organization/scope

The workflow automatically:

  • Extracts version from git tags (e.g., v1.0.0 โ†’ 1.0.0)
  • Generates a complete package.json with MCP dependencies
  • Runs optional build commands
  • Publishes to NPM with public access

License

MIT