Grounded Docs MCP Server: Open-Source Alternative to Context7, Nia, and Ref.Tools https://grounded.tools
  • TypeScript 97.3%
  • CSS 1.4%
  • JavaScript 1.1%
  • Shell 0.1%
Find a file
semantic-release-bot 4e35baa7e8 chore(release): 3.4.1 [skip ci]
## [3.4.1](https://github.com/arabold/docs-mcp-server/compare/v3.4.0...v3.4.1) (2026-10-25)

### Bug fixes
- The CLI recognizes Playwright’s headless shell, installs it with its bundled Playwright when needed, and avoids checking or reinstalling browsers for commands that don’t launch one. Docker images can use their own Chromium without downloading Playwright’s. ([#598](https://github.com/arabold/docs-mcp-server/issues/598), [#549](https://github.com/arabold/docs-mcp-server/issues/549))
- Scraping now backs off across all requests to a throttled host, honors `Retry-After`, and avoids repeated HTTP retries for Cloudflare challenges before falling back to a browser. ([#600](https://github.com/arabold/docs-mcp-server/issues/600))
- Crawls request HTML first so sites that provide Markdown responses don’t lose navigation and pages; Markdown responses are still supported when available. ([#599](https://github.com/arabold/docs-mcp-server/issues/599))
2026-10-25 16:55:59 +00:00
.agent chore: archive 13 completed openspec changes and sync consolidated specs 2026-03-16 13:12:03 -07:00
.agents chore(openspec): upgrade to openspec v1.13.1 2026-09-19 06:57:30 -07:00
.claude chore(openspec): upgrade to openspec v1.13.1 2026-09-19 06:57:30 -07:00
.github fix(release): take every tool away from copilot and check its notes strictly 2026-10-18 14:08:39 -07:00
.husky feat(tooling): configure CI/CD, semantic-release, and commit hooks 2025-03-29 12:57:01 -07:00
.vitest-config-mock fix(pipeline): leave jobs that live processes run to them 2026-10-18 11:51:46 -07:00
db/migrations perf(store): drop redundant and unused indexes and refresh activity on library changes 2026-10-18 08:27:51 -07:00
docs fix(scraper): ask for html first so crawls keep the site navigation 2026-10-25 09:41:14 -07:00
openspec fix(scraper): ask for html first so crawls keep the site navigation 2026-10-25 09:41:14 -07:00
public feat(mcp)!: serve protocol 2026-07-28 under a base path with resource-server auth 2026-10-11 09:13:29 -07:00
scripts test(release): fold the release notes rejection and fallback cases into tables 2026-10-18 16:49:17 -07:00
skills docs: address review of the docs audit 2026-10-18 09:20:09 -07:00
src fix(scraper): ask for html first so crawls keep the site navigation 2026-10-25 09:41:14 -07:00
test fix(cli): accept playwright's headless shell and install it with the bundled cli 2026-10-24 13:06:28 -07:00
tests test(search-eval): fold the context7 provider lookups into tables 2026-10-18 16:49:16 -07:00
.dockerignore build(docker): keep agent worktrees and nested env files out of the context 2026-10-18 14:50:02 -07:00
.env.example feat(telemetry): integrate PostHog analytics configuration and update related functions 2025-08-23 14:38:50 -07:00
.gitignore test(search): add a golden-passage search accuracy benchmark 2026-10-18 12:18:14 -07:00
.nvmrc fix: reverted back to Node v22 due to build issues with tree-sitter 2026-02-02 08:58:38 -08:00
.releaserc.json ci(release): have copilot cli write the release notes 2026-10-18 14:08:39 -07:00
AGENTS.md docs: bring every doc in line with the current code 2026-10-18 09:07:37 -07:00
ARCHITECTURE.md fix(scraper): ask for html first so crawls keep the site navigation 2026-10-25 09:41:14 -07:00
biome.json fix(deps): update dependencies for security fixes 2026-10-24 08:19:07 -07:00
CHANGELOG.md chore(release): 3.4.1 [skip ci] 2026-10-25 16:55:59 +00:00
CLAUDE.md docs(agents): document lockfile platform-conditional optional deps 2026-05-17 06:51:35 -07:00
commitlint.config.js fix(ci): increase allowed footer line length 2025-04-08 14:41:37 -07:00
CONTRIBUTING.md ci(release): have copilot cli write the release notes 2026-10-18 14:08:39 -07:00
docker-compose.yml feat(cli): add ascii art banner on server startup 2026-01-15 07:52:20 -08:00
Dockerfile fix(docker): preserve runtime environment aliases 2026-10-11 15:42:04 -07:00
LICENSE Create LICENSE 2025-03-29 12:13:30 -07:00
package-lock.json fix(deps): keep the real psl type definitions 2026-10-24 08:35:34 -07:00
package.json chore(release): 3.4.1 [skip ci] 2026-10-25 16:55:59 +00:00
README.md fix(scraper): ask for html first so crawls keep the site navigation 2026-10-25 09:41:14 -07:00
tsconfig.build.json refactor(test): refactor testing setup and enhance e2e tests 2025-11-15 05:23:46 -08:00
tsconfig.json feat(web): replace admin UI with a React + Vite + tRPC SPA 2026-08-06 10:41:25 +02:00
vite.config.accuracy.ts fix(test): keep the developer's .env away from spawned clis 2026-10-18 14:50:00 -07:00
vite.config.live.ts fix(test): make npm run test:live actually run the live suite 2026-09-19 14:37:22 -07:00
vite.config.ts fix(test): keep the developer's .env away from spawned clis 2026-10-18 14:50:00 -07:00
vite.config.web.ts feat(mcp)!: serve protocol 2026-07-28 under a base path with resource-server auth 2026-10-11 09:13:29 -07:00

Grounded Docs MCP Server

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.

It is an open-source alternative to Context7, Nia and Ref.Tools.

Docs MCP Server web interface

Features

  • Indexes websites, GitHub repositories, npm and PyPI packages, local folders and archives (ZIP, TAR).
  • Reads HTML, Markdown, PDF, Office and OpenDocument files, EPUB, Jupyter notebooks, source code and more. See Supported Formats.
  • Stores each library version separately, so a search targets the version your project uses.
  • Combines full-text search with optional vector search through OpenAI, Ollama, Gemini, Vertex AI, AWS Bedrock, Azure OpenAI or any OpenAI-compatible server.
  • 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 lists what it sends and how to turn it off.
  • Works with any MCP client, over stdio or Streamable HTTP.

Quick Start

You need Node.js 22 or later, or Docker. Installation covers both in detail, along with Docker Compose and running the server inside your AI client.

1. Start the server

npx @arabold/docs-mcp-server@latest

Or with Docker:

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

2. Turn on vector search (optional)

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:

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

With Docker, add -e OPENAI_API_KEY="sk-proj-...". Embedding Models covers Ollama, Gemini, Azure OpenAI and other providers.

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.

3. Add documentation

Open the web UI at http://localhost:6280 and choose Add library.

4. Connect your AI client

Add the server's MCP endpoint, http://localhost:6280/mcp, to your client. Most clients accept an entry like this:

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

Connecting MCP Clients 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.

Command Line

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.

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

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

# Fetch one page as Markdown without indexing it
npx @arabold/docs-mcp-server@latest fetch-url https://react.dev/reference/react/useEffect

scrape refuses a library version that already exists. Pass --replace to rebuild it, or run refresh to update it in place. The skills/ directory has Agent Skills that teach coding agents these commands. Basic Usage covers every command, output formats and local files.

Web Scraping

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

Documentation

Setup:

Usage:

Deployment:

  • Deployment Modes: one process, or a worker with separate MCP and web services.
  • Reverse Proxy Deployment: serve the server under a path such as https://example.com/docs.
  • Authentication: protect the MCP endpoint with OAuth2/OIDC.
  • Security: trust boundaries and limits on what the scraper may reach.
  • Telemetry: the usage events the server sends, and how to turn them off.

Internals:

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

This project is licensed under the MIT License. See LICENSE for details.