# vb0402/modelcontextprotocol architecture

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

- Interactive diagram: https://gitdiagram.com/vb0402/modelcontextprotocol
- Repository: https://github.com/vb0402/modelcontextprotocol

## Overview

This repository publishes the Model Context Protocol specification, versioned protocol schemas, and official documentation. Its main user-facing path is engineers consulting the docs and specification to understand or implement MCP; the README confirms the documentation and schema roles, but does not describe their internal build or navigation links. A separate SEP lifecycle automation tool detects and analyzes proposals, applies lifecycle actions through GitHub, and can notify Discord. Automation relationships below follow the sampled source; documentation capability nodes reflect the repository tree, not inspected implementation details.

Main entry points: [`tools/sep-automation/src/index.ts`](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/index.ts) (Automation Entry), [`tools/sep-automation/src/github/client.ts`](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/github/client.ts) (GitHub API Client), [`tools/sep-automation/src/processor.ts`](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/processor.ts) (SEP Processing), [`tools/sep-automation/src/actions/transition.ts`](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/actions/transition.ts) (State Transitions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_protocol["Protocol Definition"]
  node_spec["MCP Specification"]
  node_schemas["Protocol Schemas<br/>[schema.ts]"]
end

subgraph group_docs["Developer Documentation"]
  node_getting_started["Getting Started<br/>[intro.mdx]"]
  node_client_guides["Client Guides"]
  node_server_guides["Server Guides<br/>[build-server.mdx]"]
  node_security_guides["Security Guides"]
  node_extensions["Extensions"]
  node_inspector["Inspector Guides<br/>[inspector.mdx]"]
end

subgraph group_automation["SEP Automation"]
  node_config["Automation Config<br/>[config.ts]"]
  node_entry["Automation Entry<br/>[index.ts]"]
  node_detector["SEP Detection<br/>[detector.ts]"]
  node_processor["SEP Processing<br/>[processor.ts]"]
  node_analyzer["Staleness Analysis<br/>[analyzer.ts]"]
  node_rules["Lifecycle Rules<br/>[rules.ts]"]
  node_maintainers["Sponsor Lookup<br/>[resolver.ts]"]
  node_transitions["State Transitions<br/>[transition.ts]"]
  node_pings["Stale Notifications<br/>[ping.ts]"]
  node_comments["Comment Templates<br/>[comment.ts]"]
  node_github_client["GitHub API Client<br/>[client.ts]"]
  node_discord_hooks["Discord Hook<br/>[discord.ts]"]
  node_hook_registry["Hook Registry<br/>[registry.ts]"]
end

node_engineers(("Engineers"))
node_github(("GitHub"))
node_discord(("Discord"))

node_engineers -->|"consult"| node_spec
node_engineers -->|"use schema"| node_schemas
node_engineers -->|"consult"| node_getting_started
node_entry -->|"loads"| node_config
node_entry -->|"creates"| node_github_client
node_entry -->|"creates"| node_detector
node_entry -->|"creates"| node_analyzer
node_entry -->|"creates"| node_transitions
node_entry -->|"creates"| node_pings
node_entry -->|"initializes"| node_processor
node_entry -->|"fetches SEP"| node_detector
node_processor -->|"analyzes"| node_analyzer
node_processor -->|"resolves sponsors"| node_maintainers
node_processor -->|"executes transition"| node_transitions
node_processor -->|"executes pings"| node_pings
node_analyzer -->|"reads activity"| node_github_client
node_analyzer -.->|"uses thresholds"| node_rules
node_maintainers -->|"loads teams"| node_github_client
node_transitions -->|"validates state"| node_rules
node_transitions -->|"updates labels"| node_github_client
node_transitions -->|"formats comment"| node_comments
node_pings -->|"formats comments"| node_comments
node_pings -->|"posts comments"| node_github_client
node_github_client -->|"calls API"| node_github
node_hook_registry -->|"registers hook"| node_discord_hooks
node_discord_hooks -.->|"sends notifications"| node_discord

click node_spec "https://github.com/vb0402/modelcontextprotocol/tree/main/docs/specification/2026-07-28"
click node_schemas "https://github.com/vb0402/modelcontextprotocol/blob/main/schema/2026-07-28/schema.ts"
click node_getting_started "https://github.com/vb0402/modelcontextprotocol/blob/main/docs/docs/2026-07-28/getting-started/intro.mdx"
click node_client_guides "https://github.com/vb0402/modelcontextprotocol/tree/main/docs/docs/2026-07-28/develop"
click node_server_guides "https://github.com/vb0402/modelcontextprotocol/blob/main/docs/docs/2026-07-28/develop/build-server.mdx"
click node_security_guides "https://github.com/vb0402/modelcontextprotocol/tree/main/docs/docs/2026-07-28/tutorials/security"
click node_extensions "https://github.com/vb0402/modelcontextprotocol/tree/main/docs/extensions"
click node_inspector "https://github.com/vb0402/modelcontextprotocol/blob/main/docs/docs/2026-07-28/tools/inspector.mdx"
click node_config "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/config.ts"
click node_entry "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/index.ts"
click node_detector "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/sep/detector.ts"
click node_processor "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/processor.ts"
click node_analyzer "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/sep/analyzer.ts"
click node_rules "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/rules.ts"
click node_maintainers "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/maintainers/resolver.ts"
click node_transitions "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/actions/transition.ts"
click node_pings "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/actions/ping.ts"
click node_comments "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/actions/comment.ts"
click node_github_client "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/github/client.ts"
click node_discord_hooks "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/hooks/discord.ts"
click node_hook_registry "https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/hooks/registry.ts"

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_spec,node_schemas toneBlue
class node_getting_started,node_client_guides,node_server_guides,node_security_guides,node_extensions,node_inspector toneAmber
class node_config,node_entry,node_detector,node_processor,node_analyzer,node_rules,node_maintainers,node_transitions,node_pings,node_comments,node_github_client,node_discord_hooks,node_hook_registry toneMint
class node_engineers,node_github,node_discord toneIndigo
```

## Components

### Protocol Definition

- [MCP Specification](https://github.com/vb0402/modelcontextprotocol/tree/main/docs/specification/2026-07-28): `docs/specification/2026-07-28`
- [Protocol Schemas](https://github.com/vb0402/modelcontextprotocol/blob/main/schema/2026-07-28/schema.ts): `schema/2026-07-28/schema.ts`

### Developer Documentation

- [Getting Started](https://github.com/vb0402/modelcontextprotocol/blob/main/docs/docs/2026-07-28/getting-started/intro.mdx): `docs/docs/2026-07-28/getting-started/intro.mdx`
- [Client Guides](https://github.com/vb0402/modelcontextprotocol/tree/main/docs/docs/2026-07-28/develop): `docs/docs/2026-07-28/develop`
- [Server Guides](https://github.com/vb0402/modelcontextprotocol/blob/main/docs/docs/2026-07-28/develop/build-server.mdx): `docs/docs/2026-07-28/develop/build-server.mdx`
- [Security Guides](https://github.com/vb0402/modelcontextprotocol/tree/main/docs/docs/2026-07-28/tutorials/security): `docs/docs/2026-07-28/tutorials/security`
- [Extensions](https://github.com/vb0402/modelcontextprotocol/tree/main/docs/extensions): `docs/extensions`
- [Inspector Guides](https://github.com/vb0402/modelcontextprotocol/blob/main/docs/docs/2026-07-28/tools/inspector.mdx): `docs/docs/2026-07-28/tools/inspector.mdx`

### SEP Automation

- [Automation Config](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/config.ts): `tools/sep-automation/src/config.ts`
- [Automation Entry](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/index.ts): `tools/sep-automation/src/index.ts`
- [SEP Detection](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/sep/detector.ts): `tools/sep-automation/src/sep/detector.ts`
- [SEP Processing](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/processor.ts): `tools/sep-automation/src/processor.ts`
- [Staleness Analysis](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/sep/analyzer.ts): `tools/sep-automation/src/sep/analyzer.ts`
- [Lifecycle Rules](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/rules.ts): `tools/sep-automation/src/rules.ts`
- [Sponsor Lookup](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/maintainers/resolver.ts): `tools/sep-automation/src/maintainers/resolver.ts`
- [State Transitions](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/actions/transition.ts): `tools/sep-automation/src/actions/transition.ts`
- [Stale Notifications](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/actions/ping.ts): `tools/sep-automation/src/actions/ping.ts`
- [Comment Templates](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/actions/comment.ts): `tools/sep-automation/src/actions/comment.ts`
- [GitHub API Client](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/github/client.ts): `tools/sep-automation/src/github/client.ts`
- [Discord Hook](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/hooks/discord.ts): `tools/sep-automation/src/hooks/discord.ts`
- [Hook Registry](https://github.com/vb0402/modelcontextprotocol/blob/main/tools/sep-automation/src/hooks/registry.ts): `tools/sep-automation/src/hooks/registry.ts`

### Other components

- **Engineers**
- **GitHub**
- **Discord**

## Connections

- Engineers → MCP Specification: consult (evidence: `README.md`)
- Engineers → Protocol Schemas: use schema (evidence: `README.md`)
- Engineers → Getting Started: consult (evidence: `README.md`)
- Automation Entry → Automation Config: loads (evidence: `tools/sep-automation/src/index.ts`)
- Automation Entry → GitHub API Client: creates (evidence: `tools/sep-automation/src/index.ts`)
- Automation Entry → SEP Detection: creates (evidence: `tools/sep-automation/src/index.ts`)
- Automation Entry → Staleness Analysis: creates (evidence: `tools/sep-automation/src/index.ts`)
- Automation Entry → State Transitions: creates (evidence: `tools/sep-automation/src/index.ts`)
- Automation Entry → Stale Notifications: creates (evidence: `tools/sep-automation/src/index.ts`)
- Automation Entry → SEP Processing: initializes (evidence: `tools/sep-automation/src/index.ts`)
- Automation Entry → SEP Detection: fetches SEP (evidence: `tools/sep-automation/src/index.ts`)
- SEP Processing → Staleness Analysis: analyzes (evidence: `tools/sep-automation/src/processor.ts`)
- SEP Processing → Sponsor Lookup: resolves sponsors (evidence: `tools/sep-automation/src/processor.ts`)
- SEP Processing → State Transitions: executes transition (evidence: `tools/sep-automation/src/processor.ts`)
- SEP Processing → Stale Notifications: executes pings (evidence: `tools/sep-automation/src/processor.ts`)
- Staleness Analysis → GitHub API Client: reads activity (evidence: `tools/sep-automation/src/sep/analyzer.ts`)
- Staleness Analysis → Lifecycle Rules: uses thresholds
- Sponsor Lookup → GitHub API Client: loads teams (evidence: `tools/sep-automation/src/maintainers/resolver.ts`)
- State Transitions → Lifecycle Rules: validates state (evidence: `tools/sep-automation/src/actions/transition.ts`)
- State Transitions → GitHub API Client: updates labels (evidence: `tools/sep-automation/src/actions/transition.ts`)
- State Transitions → Comment Templates: formats comment (evidence: `tools/sep-automation/src/actions/transition.ts`)
- Stale Notifications → Comment Templates: formats comments (evidence: `tools/sep-automation/src/actions/ping.ts`)
- Stale Notifications → GitHub API Client: posts comments (evidence: `tools/sep-automation/src/actions/ping.ts`)
- GitHub API Client → GitHub: calls API (evidence: `tools/sep-automation/src/github/client.ts`)
- Hook Registry → Discord Hook: registers hook (evidence: `tools/sep-automation/src/hooks/registry.ts`)
- Discord Hook → Discord: sends notifications
