Skip to content
Back to search

docs-mcp-server

Grounded Docs MCP Server: Open-Source Alternative to Context7, Nia, and Ref.Tools

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/arabold--docs-mcp-server/badge.svg)](/listings/arabold--docs-mcp-server)

HTML

<a href="/listings/arabold--docs-mcp-server"><img src="/api/listings/arabold--docs-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

CLI First

For agents and scripts, the CLI is usually the simplest way to use Grounded Docs.

**1. Index documentation** (requires Node.js 22+):

npx @arabold/docs-mcp-server@latest scrape react https://react.dev/reference/react

For hash-routed SPA docs sites, enable hash preservation explicitly:

npx @arabold/docs-mcp-server@latest scrape my-spa https://docs.example.com/#/guide --preserve-hashes

**2. Query the index:**

npx @arabold/docs-mcp-server@latest search react "useEffect cleanup" --output yaml

**3. Fetch a single page as Markdown:**

npx @arabold/docs-mcp-server@latest fetch-url https://react.dev/reference/react/useEffect

Output Behavior

- Structured commands default to clean JSON on stdout in non-interactive runs. - Use `--output json|yaml|toon` to pick a structured format. - Plain-text commands such as `fetch-url` keep their text payload on stdout. - Diagnostics go through the shared logger and are kept off stdout in non-interactive runs. - Use `--quiet` to suppress non-error diagnostics or `--verbose` to enable debug output.

Agent Skills

The [`skills/`](skills/) directory contains [Agent Skills](https://agentskills.io) that teach AI coding assistants how to use the CLI — covering documentation search, index management, and URL fetching.

MCP Server

If you want a long-running MCP endpoint for Claude, Cline, Copilot, Gemini CLI, or other MCP clients:

**1. Start the server:**

npx @arabold/docs-mcp-server@latest

**2. Open the Web UI** at **[http://localhost:6280](http://localhost:6280)** to add documentation.

**3. Connect your AI client** by adding this to your MCP settings (e.g., `claude_desktop_config.json`):

{
  "mcpServers": {
    "docs-mcp-server": {
      "type": "sse",
      "url": "http://localhost:6280/sse"
    }
  }
}

See **[Connecting Clients](docs/guides/mcp-clients.md)** for VS Code (Cline, Roo) and other setup options.

`scrape_docs` also accepts `preserveHashes: true` for documentation sites that use hash-based client-side routing. Use it only for hash-routed SPAs; normal sites typically use hash fragments for in-page anchors.

<details> <summary>Alternative: Run with Docker</summary>

docker run --rm \
  -v docs-mcp-data:/data \
  -v docs-mcp-config:/config \
  -p 6280:6280 \
  ghcr.io/arabold/docs-mcp-server:latest \
  --protocol http --host 0.0.0.0 --port 6280

</details>

🧠 Configure Embedding Model (Recommended)

Using an embedding model is **optional** but dramatically improves search quality by enabling semantic vector search.

**Example: Enable OpenAI Embeddings**

OPENAI_API_KEY="sk-proj-..." npx @arabold/docs-mcp-server@latest

See **[Embedding Models](docs/guides/embedding-models.md)** for configuring **Ollama**, **Gemini**, **Azure**, and others.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 126 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Grounded Docs MCP Server
  2. Grounded Docs gives your AI coding assistant a documentation index that matches the library versions you use. It fetches documentation from websites, GitHub repositories, npm, PyPI and local folders, and serves search over the Model Context Protocol (MCP), a command line and a web UI. Your assistant answers from that documentation instead of from what it remembers.
  3. It is an open-source alternative to Context7, Nia and Ref.Tools.
  4. ![Docs MCP Server web interface](docs/docs-mcp-server.png)
  5. ## Features
  6. - Indexes websites, GitHub repositories, npm and PyPI packages, local folders and archives (ZIP, TAR).
  7. - Reads HTML, Markdown, PDF, Office and OpenDocument files, EPUB, Jupyter notebooks, source code and more. See [Supported Formats](docs/concepts/supported-formats.md).
  8. - Stores each library version separately, so a search targets the version your project uses.
  9. - Combines full-text search with optional vector search through OpenAI, Ollama, Gemini, Vertex AI, AWS Bedrock, Azure OpenAI or any OpenAI-compatible server.
  10. - Runs on your machine and keeps its index in a local SQLite database. Document text goes only to the embedding provider you configure; with a local one, such as Ollama, it stays on your machine. Usage telemetry is on by default; [Telemetry](docs/infrastructure/telemetry.md) lists what it sends and how to turn it off.
  11. - Works with any MCP client, over stdio or Streamable HTTP.
  12. ## Quick Start
  13. You need Node.js 22 or later, or Docker. [Installation](docs/setup/installation.md) covers both in detail, along with Docker Compose and running the server inside your AI client.
  14. ### 1. Start the server
  15. ```bash
  16. npx @arabold/docs-mcp-server@latest
  17. ```
  18. Or with Docker:
  19. ```bash
  20. docker run --rm \
  21. -v docs-mcp-data:/data \
  22. -v docs-mcp-config:/config \
  23. -p 6280:6280 \
  24. ghcr.io/arabold/docs-mcp-server:latest
  25. ```
  26. ### 2. Turn on vector search (optional)
  27. Without an embedding model, search uses full-text matching. Vector search also finds passages by meaning. To use OpenAI, start the server with `OPENAI_API_KEY` set:
  28. ```bash
  29. OPENAI_API_KEY="sk-proj-..." npx @arabold/docs-mcp-server@latest
  30. ```
  31. With Docker, add `-e OPENAI_API_KEY="sk-proj-..."`. [Embedding Models](docs/guides/embedding-models.md) covers Ollama, Gemini, Azure OpenAI and other providers.
  32. Do this before you add documentation. Embeddings are computed when a page is indexed, so documentation indexed without a model gets no vectors until you scrape it again with `--replace`.
  33. ### 3. Add documentation
  34. Open the web UI at [http://localhost:6280](http://localhost:6280) and choose **Add library**.
  35. ### 4. Connect your AI client
  36. Add the server's MCP endpoint, `http://localhost:6280/mcp`, to your client. Most clients accept an entry like this:
  37. ```json
  38. {
  39. "mcpServers": {
  40. "docs-mcp-server": {
  41. "url": "http://localhost:6280/mcp"
  42. }
  43. }
  44. }
  45. ```
  46. [Connecting MCP Clients](docs/guides/mcp-clients.md) has the exact settings for Claude Code, Claude Desktop, Zed and other clients, how a client can start the server itself over stdio, and the list of MCP tools.
  47. ## Command Line
  48. The CLI indexes and searches without a running server, which suits scripts and coding agents. It shares its database with a server on the same machine.
  49. ```bash
  50. # Index documentation
  51. npx @arabold/docs-mcp-server@latest scrape react https://react.dev/reference/react
  52. # Search it
  53. npx @arabold/docs-mcp-server@latest search react "useEffect cleanup" --output yaml
  54. # Fetch one page as Markdown without indexing it
  55. npx @arabold/docs-mcp-server@latest fetch-url https://react.dev/reference/react/useEffect
  56. ```
  57. `scrape` refuses a library version that already exists. Pass `--replace` to rebuild it, or run `refresh` to update it in place. The [`skills/`](skills/) directory has Agent Skills that teach coding agents these commands. [Basic Usage](docs/guides/basic-usage.md) covers every command, output formats and local files.
  58. ## Web Scraping
  59. - Before it crawls a website, a scrape or refresh looks for an `llms.txt` file in the start URL's directory and at the site root. The links listed there become extra starting points, and for those pages the scraper first tries the Markdown version of the URL, such as `/guide/index.html.md` or `/page.html.md`.
  60. - Requests ask for HTML first, like a browser. Markdown that a server converts on request leaves out the site's navigation, so a crawl would miss most pages. The scraper uses Markdown where the site publishes it: pages listed in `llms.txt` and links to `.md` files. A custom `Accept` header replaces the default one.
  61. - For documentation sites that route with hash URLs, such as `https://docs.example.com/#/guide`, turn on hash routes for the scrape. See [Hash Route Behavior](docs/setup/configuration.md#hash-route-behavior).
  62. ## Documentation
  63. Setup:
  64. - [Installation](docs/setup/installation.md): npx, Docker, Docker Compose and the embedded server.
  65. - [Configuration](docs/setup/configuration.md): config file, environment variables and every setting.
  66. - [Embedding Models](docs/guides/embedding-models.md): providers, models and changing the model.
  67. Usage:
  68. - [Basic Usage](docs/guides/basic-usage.md): the web UI, the CLI and local files.
  69. - [Connecting MCP Clients](docs/guides/mcp-clients.md): client settings and MCP tools.
  70. - [Supported Formats](docs/concepts/supported-formats.md): file formats and how each is processed.
  71. - [Search Quality Benchmark](docs/guides/benchmarking.md): measure retrieval quality.
  72. Deployment:
  73. - [Deployment Modes](docs/infrastructure/deployment-modes.md): one process, or a worker with separate MCP and web services.
  74. - [Reverse Proxy Deployment](docs/infrastructure/reverse-proxy.md): serve the server under a path such as `https://example.com/docs`.
  75. - [Authentication](docs/infrastructure/authentication.md): protect the MCP endpoint with OAuth2/OIDC.
  76. - [Security](docs/infrastructure/security.md): trust boundaries and limits on what the scraper may reach.
  77. - [Telemetry](docs/infrastructure/telemetry.md): the usage events the server sends, and how to turn them off.
  78. Internals:
  79. - [Architecture](ARCHITECTURE.md): system design for contributors.
  80. ## Contributing
  81. See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
  82. ## License
  83. This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.