An MCP (Model Context Protocol) server that exposes your DocFX documentation site — whether hosted on Cloudflare Pages, GitHub Pages, or any other static host — as a set of AI-usable tools.
Use it with GitHub Copilot in Visual Studio, VS Code, or any MCP-compatible client to let the AI search, browse, and read your docs without leaving the editor.
| Tool | Description |
|---|---|
list_articles |
Lists all articles from the site TOC |
search_docs |
Keyword/phrase search across the documentation |
fetch_article |
Fetches the full text of any documentation page |
- Multi-site support — configure one server for multiple DocFX sites
- Docker Compose — one command to run locally or on a server
- Pre-built image on GHCR —
ghcr.io/scribblesbykk/docfx-mcp-server:latest - stdio transport — works directly with VS / VS Code Copilot without a network server
- HTTP transport — for Docker or remote deployments (Streamable HTTP, MCP spec §5.2)
# Single site
DOCFX_SITE_URL=https://scribblesbykk.github.io/Cyclotron \
DOCFX_SITE_NAME=Cyclotron \
node src/index.jsPull and run the published image directly from GitHub Container Registry — no cloning required:
docker run -d \
--name docfx-mcp-server \
-p 3000:3000 \
-e MCP_TRANSPORT=http \
-e DOCFX_SITE_URL=https://scribblesbykk.github.io/Cyclotron \
-e DOCFX_SITE_NAME=Cyclotron \
ghcr.io/scribblesbykk/docfx-mcp-server:latestThe MCP endpoint is available at http://localhost:3000/mcp.
- Edit
docker-compose.ymland set your site URL(s) underDOCFX_SITES. - Run:
docker compose up -dThe docker-compose.yml pulls ghcr.io/scribblesbykk/docfx-mcp-server:latest by default.
To build the image locally instead (e.g. after editing source), switch the image: line for the commented-out build: . line in the file.
The MCP endpoint is available at http://localhost:3000/mcp.
| Variable | Required | Description |
|---|---|---|
DOCFX_SITE_URL |
Yes (single-site) | Base URL of your DocFX site |
DOCFX_SITE_NAME |
No | Display name for the site (default: docs) |
DOCFX_SITES |
Yes (multi-site) | JSON array of {name, url} objects |
MCP_TRANSPORT |
No | stdio (default) or http |
PORT |
No | HTTP server port (default: 3000) |
[
{ "name": "Cyclotron", "url": "https://scribblesbykk.github.io/Cyclotron" },
{ "name": "AnotherLib", "url": "https://another-lib.pages.dev" }
]When multiple sites are configured, all tools accept an optional site argument (the name value above).
Add an MCP server entry in your solution's .github/copilot-mcp.json:
{
"servers": {
"docfx": {
"command": "node",
"args": ["${workspaceFolder}/path/to/docfx-mcp-server/src/index.js"],
"env": {
"DOCFX_SITE_URL": "https://scribblesbykk.github.io/Cyclotron",
"DOCFX_SITE_NAME": "Cyclotron"
}
}
}
}Or, for Docker Compose HTTP transport, use a URL-based entry:
{
"servers": {
"docfx": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}Add to .vscode/mcp.json in your workspace:
{
"servers": {
"docfx": {
"command": "node",
"args": ["${workspaceFolder}/path/to/docfx-mcp-server/src/index.js"],
"env": {
"DOCFX_SITE_URL": "https://scribblesbykk.github.io/Cyclotron"
}
}
}
}In VS Code settings.json:
{
"github.copilot.chat.mcp.servers": {
"docfx": {
"command": "node",
"args": ["/absolute/path/to/docfx-mcp-server/src/index.js"],
"env": {
"DOCFX_SITE_URL": "https://scribblesbykk.github.io/Cyclotron"
}
}
}
}Start the server:
docker compose up -dThen in .vscode/mcp.json or .github/copilot-mcp.json:
{
"servers": {
"docfx": {
"type": "http",
"url": "http://localhost:3000/mcp"
}
}
}Once configured, you can ask Copilot:
@docfx list all articles
@docfx search for "dependency injection"
@docfx fetch https://scribblesbykk.github.io/Cyclotron/api/Cyclotron.html
Or naturally in chat:
"What does the Cyclotron FileSystemAdapter do? Check the docs."
DocFX generates a set of well-known files on the static site:
| File | Used by |
|---|---|
/toc.json |
list_articles — root table of contents |
/api/toc.json |
list_articles — API reference TOC |
/index.json |
search_docs — full-text search index (modern theme) |
/{page}.html |
fetch_article — individual page content |
The server fetches these files directly from the hosted site — no local build required.
npm install
# Run locally (stdio)
DOCFX_SITE_URL=https://scribblesbykk.github.io/Cyclotron node src/index.js
# Run locally (HTTP)
MCP_TRANSPORT=http DOCFX_SITE_URL=https://scribblesbykk.github.io/Cyclotron node src/index.js
# Test
DOCFX_SITE_URL=https://scribblesbykk.github.io/Cyclotron npm testThis server is designed to be repo-agnostic. Each DocFX site is just a base URL. To use it with a new docs site, simply add an entry to DOCFX_SITES — no code changes needed.
You can run a single Docker Compose instance and point multiple project repos' Copilot configs at http://localhost:3000/mcp.
MIT