# thevibeworks/claude-code-docs architecture

> Architecture diagram of the GitHub repository thevibeworks/claude-code-docs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thevibeworks/claude-code-docs
- Repository: https://github.com/thevibeworks/claude-code-docs

## Overview

Claude Code Docs is an auto-updating archive of Anthropic builder documentation, also exposed through an MCP server for Claude Code clients. The principal workflow is a client request routed to local search, documentation resources, or guided prompts; an HTTP transport can instead search and serve remote documentation. Separately, the fetcher collects published Markdown into the archive and supports source discovery and stale-page reaping. README documents the archive’s broad source and content coverage; sampled excerpts show MCP routing and file access, but not every fetcher stage.

Main entry points: [`mcp/src/main.ts`](https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/main.ts) (Stdio server), [`mcp/src/server-http.ts`](https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/server-http.ts) (HTTP server), [`mcp/src/tools/search.ts`](https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/tools/search.ts) (Local search), [`mcp/src/resources/index.ts`](https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/resources/index.ts) (Local resources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_archive["Documentation archive"]
  node_resources["Local resources<br/>[index.ts]"]
  node_remote["Remote resources<br/>[index.ts]"]
  node_archivefiles["Markdown archive"]
end

subgraph group_mcp["MCP access"]
  node_stdio["Stdio server<br/>[main.ts]"]
  node_http["HTTP server<br/>[server-http.ts]"]
  node_search["Local search<br/>[search.ts]"]
end

subgraph group_guidance["Guided assistance"]
  node_prompts["Guidance prompts<br/>[index.ts]"]
end

subgraph group_ingestion["Content ingestion"]
  node_fetcher["Fetcher and discovery<br/>[fetcher.py]"]
end

node_client(("Claude Code client"))
node_sources(("Documentation sources"))
node_github["GitHub raw content"]

node_client -->|"sends MCP requests"| node_stdio
node_client -.->|"sends HTTP requests"| node_http
node_stdio -->|"dispatches search"| node_search
node_stdio -->|"routes resource requests"| node_resources
node_stdio -->|"routes prompt requests"| node_prompts
node_search -->|"gets docs path"| node_resources
node_search -->|"reads Markdown"| node_archivefiles
node_resources -->|"lists and reads files"| node_archivefiles
node_http -->|"routes resource requests"| node_remote
node_http -->|"routes prompt requests"| node_prompts
node_http -->|"searches remote docs"| node_remote
node_remote -->|"fetches Markdown"| node_github
node_sources -->|"provides published docs"| node_fetcher
node_fetcher -->|"updates archive"| node_archivefiles

click node_stdio "https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/main.ts"
click node_http "https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/server-http.ts"
click node_search "https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/tools/search.ts"
click node_resources "https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/resources/index.ts"
click node_remote "https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/remote-resources/index.ts"
click node_archivefiles "https://github.com/thevibeworks/claude-code-docs/tree/main/content"
click node_prompts "https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/prompts/index.ts"
click node_fetcher "https://github.com/thevibeworks/claude-code-docs/blob/main/scripts/fetcher.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_resources,node_remote,node_archivefiles,node_client toneBlue
class node_stdio,node_http,node_search toneAmber
class node_prompts toneMint
class node_fetcher toneRose
class node_sources,node_github toneIndigo
```

## Components

### Documentation archive

- [Local resources](https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/resources/index.ts): `mcp/src/resources/index.ts`
- [Remote resources](https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/remote-resources/index.ts): `mcp/src/remote-resources/index.ts`
- [Markdown archive](https://github.com/thevibeworks/claude-code-docs/tree/main/content): `content`

### MCP access

- [Stdio server](https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/main.ts): `mcp/src/main.ts`
- [HTTP server](https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/server-http.ts): `mcp/src/server-http.ts`
- [Local search](https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/tools/search.ts): `mcp/src/tools/search.ts`

### Guided assistance

- [Guidance prompts](https://github.com/thevibeworks/claude-code-docs/blob/main/mcp/src/prompts/index.ts): `mcp/src/prompts/index.ts`

### Content ingestion

- [Fetcher and discovery](https://github.com/thevibeworks/claude-code-docs/blob/main/scripts/fetcher.py): `scripts/fetcher.py`

### Other components

- **Claude Code client**
- **Documentation sources**
- **GitHub raw content**

## Connections

- Claude Code client → Stdio server: sends MCP requests (evidence: `mcp/src/main.ts`)
- Claude Code client → HTTP server: sends HTTP requests (evidence: `mcp/src/server-http.ts`)
- Stdio server → Local search: dispatches search (evidence: `mcp/src/main.ts`)
- Stdio server → Local resources: routes resource requests (evidence: `mcp/src/main.ts`)
- Stdio server → Guidance prompts: routes prompt requests (evidence: `mcp/src/main.ts`)
- Local search → Local resources: gets docs path (evidence: `mcp/src/tools/search.ts`)
- Local search → Markdown archive: reads Markdown (evidence: `mcp/src/tools/search.ts`)
- Local resources → Markdown archive: lists and reads files (evidence: `mcp/src/resources/index.ts`)
- HTTP server → Remote resources: routes resource requests (evidence: `mcp/src/server-http.ts`)
- HTTP server → Guidance prompts: routes prompt requests (evidence: `mcp/src/server-http.ts`)
- HTTP server → Remote resources: searches remote docs (evidence: `mcp/src/server-http.ts`)
- Remote resources → GitHub raw content: fetches Markdown (evidence: `mcp/src/remote-resources/index.ts`)
- Documentation sources → Fetcher and discovery: provides published docs (evidence: `README.md`)
- Fetcher and discovery → Markdown archive: updates archive (evidence: `README.md`)
