Starlight Ondocs logo

Starlight Ondocs

MCP access to a Starlight site's indexed documentation through search, fetch, and page-listing tools.

Install Starlight Ondocs

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "starlight-ondocs": {
      "command": "npx",
      "args": [
        "-y",
        "ondocs"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y ondocs

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

starlight-ondocs exposes a Starlight site's generated documentation index through an MCP endpoint for coding agents and ChatGPT. It provides search, fetch, and list_pages tools over the same ask-index.json used by the site's Ask AI interface. Search uses in-memory BM25 and vector retrieval combined with reciprocal rank fusion, with keyword search avoiding model calls. Reach for it when an agent needs answers grounded in a self-hosted documentation site rather than a separate hosted knowledge service.

Use cases

  • Search a Starlight documentation site from a coding agent
  • Fetch exact documentation pages for implementation questions
  • List available documentation pages before selecting a source
  • Ground agent answers in a site's generated documentation index

Key features

  • MCP search, fetch, and list_pages tools
  • Starlight build integration
  • BM25 and vector retrieval with reciprocal rank fusion
  • In-memory search without a vector database
  • Generated ask-index.json, llms.txt, and Markdown pages
  • Cited Ask AI answers for the documentation site

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

7/7 checks healthy over the last 27d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · ondocs (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars13Stargazers on the source repository.
npm downloads3.5kPackage downloads in the last 30 days.
Last commit6d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.

How Starlight Ondocs works

What starlight-ondocs does

starlight-ondocs connects an MCP client to documentation published with Starlight. The site build creates an ask-index.json file containing the material used for retrieval, and the deployed endpoint exposes that index to agents. The same build can also produce llms.txt, llms-full.txt, and Markdown copies of the site's pages.

The package is part of ondocs, an open-source documentation assistant that can use model providers through the AI SDK for its website Ask interface. The MCP portion is intended for agents that bring their own model and need structured access to the site's content.

How it works

A Starlight integration is added to the Astro configuration. During astro build, ondocs indexes the documentation into the site's output directory, adds the Ask AI interface, and writes the generated text files and page copies. The MCP endpoint then serves the index from a function deployed alongside the site.

Retrieval runs in memory. The default keyword path uses BM25, while vector retrieval is also available; both result types can be combined with reciprocal rank fusion. This keeps the default agent search path independent of a model call. The public example endpoint is available at /api/mcp on the ondocs site, while deployments can place the endpoint next to their own documentation site.

Setup and configuration

Install the package and the dependencies used by the Starlight integration:

Terminal
npm i ondocs ai @ai-sdk/openai

Register the integration in astro.config.mjs:

server.ts
import starlight from '@astrojs/starlight';
import ondocs from 'ondocs/starlight';
import { defineConfig } from 'astro/config';

export default defineConfig({
  integrations: [
    starlight({
      title: 'Acme Docs',
      plugins: [ondocs()],
    }),
  ],
});

After building, the index is written to dist/ask-index.json. The project also supports initialization for static deployments through npx ondocs init; deployment targets listed for that command include Vercel, Netlify, Cloudflare, and GitHub Pages. Cloudflare Worker deployment can use Workers AI without an API key.

Tools and capabilities

The MCP endpoint exposes three tools:

  • search finds relevant documentation from the shared index.
  • fetch retrieves a page or indexed documentation content.
  • list_pages enumerates available documentation pages.

These tools let an agent locate relevant sections, retrieve their contents, and inspect the documentation set without requiring a separate vector database. The generated index is also used by the browser-based Ask interface, which streams cited answers and links citations to the relevant documentation sections.

Limitations and notes

The MCP tools operate on the documentation captured when the site is built, so content changes require another build and deployment. Agents supply their own model; model-provider configuration is relevant to the website's Ask interface rather than to the basic keyword search path. The endpoint is designed to run as a function next to the documentation site and is rate-limited by default.

The integration is specifically documented for Starlight and other Astro sites, while the wider ondocs project also supports Docusaurus, VitePress, and several other site setups. Its license is MIT.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Starlight Ondocs

starlight-ondocs is an MCP server that connects coding agents and ChatGPT to a Starlight site's generated documentation index. Its main tools are search for relevant content, fetch for retrieving indexed pages, and list_pages for enumerating available pages. Agents use the site's shared ask-index.json and bring their own model.

Install ondocs with `npm i ondocs ai @ai-sdk/openai`, then add the `ondocs/starlight` integration to the Astro Starlight configuration. Run `astro build` to generate the index and endpoint assets. The broader project also provides `npx ondocs init` for supported deployment setups.

starlight-ondocs provides `search`, `fetch`, and `list_pages`. Search locates relevant documentation, fetch returns indexed page content, and list_pages shows the available pages. All three operate over the documentation index generated during the site build.

Yes, starlight-ondocs works with Cursor through an MCP server connection. The project includes a Cursor installation link for its hosted endpoint, and the server exposes documentation through the standard search, fetch, and list_pages tools.

No, starlight-ondocs does not require a vector database. Retrieval runs in memory from the generated ask-index.json file, using BM25 and vectors combined with reciprocal rank fusion. The default keyword search does not call a model.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewStarlight Ondocs AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/starlight-ondocs?style=directory)](https://allmcps.com/mcp/starlight-ondocs)
HTML Embed
<a href="https://allmcps.com/mcp/starlight-ondocs"><img src="https://allmcps.com/api/badge/starlight-ondocs?style=directory" alt="Starlight Ondocs on AllMCPs" /></a>