arabold_docs_mcp_server

arabold_docs_mcp_server

by arabold
An MCP server designed to scrape, index, and search documentation for third-party libraries, integrating with Claude Desktop.

Documentation Management for Claude via MCP Server

Overview

The Documentation Management for Claude via MCP Server is a specialized MCP server designed to fetch, process, and search third-party library documentation. It integrates with Claude Desktop, enabling seamless access to documentation for various software libraries. The server scrapes content from specified URLs, processes it using semantic splitting techniques, and indexes it with OpenAI-generated vector embeddings. It supports versioning, hybrid search capabilities, and efficient storage in an SQLite database.

Tools

The server provides the following tools:

  • Scraping (scrape_docs): Fetches and indexes documentation from specified URLs.
  • Searching (search_docs): Performs hybrid searches (vector + full-text) on indexed documentation.
  • Listing Libraries (list_libraries): Lists all indexed libraries.
  • Finding Versions (find_version): Identifies the best matching version for a library.

Configuration

Environment Setup

  1. Create a .env file based on .env.example:
    shell cp .env.example .env
  2. Update your OpenAI API key in .env:
    shell OPENAI_API_KEY=your-api-key-here

Installation with Claude Desktop

To integrate the server with Claude Desktop, add the following configuration:

  • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "docs-mcp-server": {
      "command": "node",
      "args": ["/path/to/docs-mcp-server/dist/server.js"],
      "env": {
        "OPENAI_API_KEY": "sk-proj-..."
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Usage

CLI Commands

The docs-mcp CLI provides commands for managing documentation. To see available commands and options:

# Show all commands
docs-mcp --help

# Show help for a specific command
docs-mcp scrape --help
docs-mcp search --help
docs-mcp find-version --help

Scraping Documentation (scrape)

Scrapes and indexes documentation from a given URL for a specific library.

docs-mcp scrape <library> <url> [options]

Options:
- -v, --version <string>: The specific version to associate with the scraped documents.
- -p, --max-pages <number>: Maximum pages to scrape (default: 100).
- -d, --max-depth <number>: Maximum navigation depth (default: 3).
- -c, --max-concurrency <number>: Maximum concurrent requests (default: 3).
- --ignore-errors: Ignore errors during scraping (default: true).

Examples:

# Scrape React 18.2.0 docs
docs-mcp scrape react --version 18.2.0 https://react.dev/

# Scrape React docs without a specific version
docs-mcp scrape react https://react.dev/

Searching Documentation (search)

Searches the indexed documentation for a library, optionally filtering by version.

docs-mcp search <library> <query> [options]

Options:
- -v, --version <string>: The target version or range to search within.
- -l, --limit <number>: Maximum number of results (default: 5).
- -e, --exact-match: Only match the exact version specified (default: false).

Examples:

# Search latest React docs for 'hooks'
docs-mcp search react 'hooks'

# Search React 18.x docs for 'hooks'
docs-mcp search react --version 18.x 'hooks'

Finding Available Versions (find-version)

Checks the index for the best matching version for a library based on a target.

docs-mcp find-version <library> [options]

Options:
- -v, --version <string>: The target version or range.

Examples:

# Find the latest indexed version for react
docs-mcp find-version react

# Find the best match for react version 17.x
docs-mcp find-version react --version 17.x

Listing Libraries (list-libraries)

Lists all libraries currently indexed in the store.

docs-mcp list-libraries

Running with Docker

Build and Run the Docker Container

  1. Build the Docker image:
    shell docker build -t docs-mcp-server .
  2. Run the Docker container:
    shell docker run -p 8000:8000 --env-file .env --name docs-mcp-server-container docs-mcp-server

Available Endpoints

  • SSE Endpoint: http://localhost:8000/sse
  • POST Messages: http://localhost:8000/message

Development

For details on the project's architecture and design principles, see ARCHITECTURE.md.

Debugging

Use the MCP Inspector for debugging:

npx @modelcontextprotocol/inspector node dist/server.js

About

This MCP server is designed to enhance Claude Desktop's capabilities by providing efficient access to third-party library documentation. It supports versioning, hybrid search, and seamless integration with Claude Desktop.

Resources

Features & Capabilities

Categories
mcp_server model_context_protocol typescript javascript docker search api_integration claude openai documentation_management

Implementation Details

Stats

0 Views
2 GitHub Stars

Repository Info

arabold Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300