# starlight-ondocs [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/dgesteves/ondocs  
**GitHub Stars:** 13  
**npm Downloads (last month):** 3500  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/starlight-ondocs

## Description
The ondocs Starlight plugin, under the name Starlight users search for: open-source Ask AI for your docs, with an MCP server for agents. Cited answers on your own model key, from one static index, with no vendor and no vector database.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "starlight-ondocs": {
    "command": "npx",
    "args": ["-y","ondocs"]
  }
}
```

## Documentation

## 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:

```bash
npm i ondocs ai @ai-sdk/openai
```

Register the integration in `astro.config.mjs`:

```js
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.

_Full upstream README: https://allmcps.com/mcp/starlight-ondocs/readme_

