Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/arabold/docs-mcp-server/llms.txt

Use this file to discover all available pages before exploring further.

The Grounded Docs MCP Server provides a powerful CLI for managing documentation indexes, running servers, and querying documentation.

Installation

Install globally via npm:
npm install -g docs-mcp-server
Or use via npx:
npx docs-mcp-server <command>

Quick Start

# Scrape and index documentation
docs-mcp-server scrape react https://react.dev/reference/react

# Search the indexed documentation
docs-mcp-server search react "hooks"

# List all indexed libraries
docs-mcp-server list

# Start the MCP server (default command)
docs-mcp-server

Available Commands

CommandDescription
server (default)Start the unified MCP server
scrapeScrape and index documentation from a URL or local directory
searchQuery the documentation index
listList all indexed libraries and versions
removeDelete a library’s documentation from the index
refreshUpdate an existing library by re-scraping changed pages
configView or modify configuration
mcpStart MCP server in standalone mode
webStart web interface only
workerStart pipeline worker in standalone mode
fetch-urlFetch and display a single URL (debugging)
find-versionFind the best matching version for a library

Global Options

These options are available for all commands:
--verbose
boolean
default:"false"
Enable verbose (debug) logging
--silent
boolean
default:"false"
Disable all logging except errors (mutually exclusive with --verbose)
--telemetry
boolean
Enable/disable telemetry collection. Use --no-telemetry to disable.
--store-path
string
Custom path for data storage directory. Defaults to system-specific location. Can also be set via DOCS_MCP_STORE_PATH environment variable.
--config
string
Path to configuration file. If specified, the config is read-only and cannot be modified via config set.
Show ASCII art logo on startup (for server commands)
--help
boolean
Show help information for a command
--version
boolean
Show version information

Common Patterns

Scraping Local Documentation

Use the file:// protocol to scrape local HTML files or directories:
# Single HTML file
docs-mcp-server scrape mylib file:///Users/me/docs/index.html

# Directory of HTML files
docs-mcp-server scrape mylib file:///Users/me/docs/my-library
When using Docker, mount the local directory and use the container path.

Working with Versions

Version matching supports flexible patterns:
# Exact version
docs-mcp-server search react "hooks" --version 18.0.0 --exact-match

# Semantic version range (matches 18.0.0 or earlier)
docs-mcp-server search react "hooks" --version 18.0.0

# Wildcard patterns
docs-mcp-server search typescript "types" --version 5.x
docs-mcp-server search typescript "types" --version 5.2.x

Using External Pipeline Workers

For distributed setups, connect CLI commands to a remote pipeline worker:
# Scrape using remote worker
docs-mcp-server scrape react https://react.dev \
  --server-url http://localhost:8080/api

# Search using remote worker
docs-mcp-server search react "hooks" \
  --server-url http://localhost:8080/api

Custom Embedding Models

Specify embedding models per command:
# Use OpenAI embeddings
docs-mcp-server scrape react https://react.dev \
  --embedding-model openai:text-embedding-3-small

# Use Vertex AI embeddings
docs-mcp-server scrape react https://react.dev \
  --embedding-model vertex:text-embedding-004

Output Formats

The config command supports multiple output formats:
# JSON output (default)
docs-mcp-server config get scraper.maxPages --json

# YAML output
docs-mcp-server config --yaml

# Plain text for scalars
docs-mcp-server config get scraper.maxPages

Error Handling

Common Issues

Mutually Exclusive Options
# Error: Cannot use both --verbose and --silent
docs-mcp-server --verbose --silent list
Invalid Configuration Path
# Error: Use a more specific path
docs-mcp-server config set scraper "value"

# Correct: Set a leaf value
docs-mcp-server config set scraper.maxPages 200
Read-Only Configuration
# Error: Cannot modify when using explicit --config
docs-mcp-server --config /path/to/config.yaml config set scraper.maxPages 200

# Correct: Remove --config to modify default config
docs-mcp-server config set scraper.maxPages 200

Exit Codes

  • 0 - Success
  • 1 - Error (invalid arguments, operation failed, etc.)

Shell Completion

The CLI is built with Yargs, which supports shell completion. Generate completion scripts:
# Bash
docs-mcp-server completion >> ~/.bashrc

# Zsh
docs-mcp-server completion >> ~/.zshrc

Next Steps

Scrape Command

Index documentation from URLs or local files

Search Command

Query your documentation index

Configuration

Manage server configuration

Environment Variables

Configure via environment variables