Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f511d3c
docs: replace MkDocs with Zensical
claude Jul 7, 2026
4793412
docs: fix serve-docs.sh usage text
claude Jul 7, 2026
9e87ecb
docs: single-source the Zensical build recipe in scripts/docs/build.sh
maxisbey Jul 9, 2026
bb164d1
docs: fail the docs build when the nav references a missing page
maxisbey Jul 9, 2026
4b13682
docs: correct stale comments and the nav type alias
maxisbey Jul 9, 2026
13b42dc
docs: relock for zensical 0.0.48
maxisbey Jul 9, 2026
3786d39
docs: fix the PERF401 lint error in gen_ref_pages.py
maxisbey Jul 9, 2026
6ef1f84
docs: pin the API index rendering for cross-package re-exports
maxisbey Jul 9, 2026
eb1ffae
docs: restore watch and drop the stale banner env
maxisbey Jul 9, 2026
a05482d
docs: catch the failure modes zensical builds green
maxisbey Jul 9, 2026
5464185
docs: fix summary truncation and harden the API generator
maxisbey Jul 9, 2026
878e21e
docs: trim dead config knobs and clarify the griffelib dependency
maxisbey Jul 9, 2026
d629160
docs: preload cross-package alias targets in the compact index stub
maxisbey Jul 9, 2026
e927853
docs: port the sidebar styling to Zensical's nav and restore the slat…
maxisbey Jul 9, 2026
153d384
docs: give generated API stubs explicit page titles
maxisbey Jul 9, 2026
7d3d1dd
docs: fix the sidebar rule cascade and print scheme scoping
maxisbey Jul 9, 2026
de9d8fa
docs: align top-level nav pages and the API Reference label flush left
maxisbey Jul 9, 2026
c8449b7
docs: rebuild the sidebar styling as one coordinate system
maxisbey Jul 9, 2026
0d3ef49
docs: put the pill inset on the elements that paint it
maxisbey Jul 9, 2026
b0dc3d9
docs: composite inline code over admonition tints
maxisbey Jul 9, 2026
0fc3242
docs: replace the llms_txt link regexes with a total classifier
maxisbey Jul 10, 2026
a483385
docs: validate crossrefs and inventories from the built site
maxisbey Jul 10, 2026
72f1d97
docs: compact-index every package that re-exports from outside its su…
maxisbey Jul 10, 2026
029a47c
docs: restore the markdown extensions pymdownx.extra bundled
maxisbey Jul 10, 2026
d479b22
docs: fail the build on pages missing from the nav
maxisbey Jul 10, 2026
f7db9d9
docs: pin the Zensical toolchain exactly
maxisbey Jul 10, 2026
57f9e0a
docs: bump zensical to 0.0.50 to fix search
maxisbey Jul 10, 2026
d90f709
docs: compact every module that re-exports from outside its subtree
maxisbey Jul 10, 2026
8acb8dd
docs: tighten the prose extractor and link classifier edge cases
maxisbey Jul 10, 2026
f978b68
docs: close nav containment, HTML-comment, and whitespace link gaps
maxisbey Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- src/mcp/**
- src/mcp-types/**
- scripts/build-docs.sh
- scripts/docs/**
- pyproject.toml
- uv.lock
- .github/workflows/deploy-docs.yml
Expand Down Expand Up @@ -49,9 +50,6 @@ jobs:

- name: Build combined docs (v1.x at /, main at /v2/)
run: bash scripts/build-docs.sh site
env:
# Silence mkdocs-material's MkDocs 2.0 warning banner in CI logs.
NO_MKDOCS_2_WARNING: "1"

- name: Configure Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,13 @@ jobs:
- name: Check README snippets are up to date
run: uv run --frozen scripts/update_readme_snippets.py --check

# `mkdocs.yml` sets `strict: true` and `pymdownx.snippets: check_paths: true`,
# but until this job existed the docs were only ever built post-merge by
# `deploy-docs.yml`, so a broken link, a missing nav target, or a deleted
# `docs_src/` include went green on the PR and broke the next deploy of main.
# This is the check path; `deploy-docs.yml` stays the deploy path.
# `zensical build --strict` fails on broken links / missing nav targets and
# `pymdownx.snippets: check_paths: true` fails on a deleted `docs_src/`
# include; the llms_txt step additionally re-resolves every snippet and link.
# Until this job existed the docs were only ever built post-merge by
# `deploy-docs.yml`, so those failures went green on the PR and broke the next
# deploy of main. This is the check path; `deploy-docs.yml` stays the deploy
# path.
Comment thread
claude[bot] marked this conversation as resolved.
Outdated
docs:
runs-on: ubuntu-latest
steps:
Expand All @@ -168,11 +170,5 @@ jobs:
enable-cache: true
version: 0.9.5

- name: Install dependencies
run: uv sync --frozen --all-extras --python 3.10

- name: Build the docs in strict mode
run: uv run --frozen --no-sync mkdocs build --strict
env:
# Silence mkdocs-material's MkDocs 2.0 warning banner in CI logs.
NO_MKDOCS_2_WARNING: "1"
run: bash scripts/docs/build.sh
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,13 @@ venv.bak/
# Rope project settings
.ropeproject

# mkdocs documentation
# documentation
/site
/.worktrees/
# Generated at build time by scripts/docs/ (the API reference tree and the
# concrete Zensical config spliced from mkdocs.yml).
/docs/api/
/mkdocs.gen.yml

# mypy
.mypy_cache/
Expand Down
40 changes: 0 additions & 40 deletions docs/hooks/gen_ref_pages.py

This file was deleted.

184 changes: 0 additions & 184 deletions docs/hooks/llms_txt.py

This file was deleted.

57 changes: 25 additions & 32 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
site_name: MCP Python SDK
site_description: The official Python SDK for the Model Context Protocol
strict: true

repo_name: modelcontextprotocol/python-sdk
repo_url: https://github.com/modelcontextprotocol/python-sdk
Expand All @@ -10,6 +9,9 @@ site_url: https://py.sdk.modelcontextprotocol.io/v2/
# TODO(Marcelo): Add Anthropic copyright?
# copyright: © Model Context Protocol 2025 to present

# The "API Reference" entry is a placeholder: `scripts/docs/gen_ref_pages.py`
# generates the `docs/api/` tree and `scripts/docs/build_config.py` splices the
# real nested nav in before the build. See `scripts/docs/build.sh`.
nav:
- MCP Python SDK: index.md
- "What's new in v2": whats-new.md
Expand Down Expand Up @@ -122,13 +124,6 @@ theme:
extra_css:
- extra.css

# https://www.mkdocs.org/user-guide/configuration/#validation
validation:
omitted_files: warn
absolute_links: warn
unrecognized_links: warn
anchors: warn

markdown_extensions:
- tables
- admonition
Expand All @@ -138,29 +133,28 @@ markdown_extensions:
- pymdownx.caret
- pymdownx.critic
- pymdownx.mark
- pymdownx.superfences
# Code examples live as complete, importable, tested files under `docs_src/`
# and are included into pages with `--8<-- "docs_src/<chapter>/tutorialNNN.py"`
# (resolved against the repo root regardless of the build's working
# directory; the extension's default base_path is the CWD).
# `check_paths: true` + `strict: true` turn a renamed/deleted example into a
# build failure instead of a silently empty code block.
# (resolved against the repo root, which is the build's working directory).
# `check_paths: true` turns a renamed/deleted example into a build failure
# instead of a silently empty code block.
- pymdownx.snippets:
base_path: !relative $config_dir
base_path: [.]
check_paths: true
- pymdownx.tilde
- pymdownx.inlinehilite
- pymdownx.highlight:
Comment thread
claude[bot] marked this conversation as resolved.
pygments_lang_class: true
- pymdownx.extra:
pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: pymdownx.superfences.fence_code_format
# Zensical re-implements the emoji extension; the generator/index functions
# live under `zensical.extensions.emoji`, not `material.extensions.emoji`.
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
emoji_index: zensical.extensions.emoji.twemoji
emoji_generator: zensical.extensions.emoji.to_svg
options:
custom_icons:
- docs/.overrides/.icons
Expand All @@ -170,23 +164,22 @@ markdown_extensions:
custom_checkbox: true
- sane_lists # this means you can start a list from any number

# Zensical natively watches these beyond docs/: page content is assembled
# from src/ (mkdocstrings) and docs_src/ (snippet includes), so serve
# live-reload must react to both.
watch:
- src
- docs_src

hooks:
- docs/hooks/llms_txt.py

# Zensical natively re-implements `search`, `glightbox` and `mkdocstrings`; it
# does not run arbitrary MkDocs plugins or hooks. The former `gen-files`,
# `literate-nav` and `llms_txt` hook are handled by the standalone scripts
# under `scripts/docs/` (see scripts/docs/build.sh). The `social` plugin was
# dropped: Zensical has no social-card support, and the cards were gated on
# ENABLE_SOCIAL_CARDS, which no workflow ever set.
plugins:
- search
- social:
enabled: !ENV [ENABLE_SOCIAL_CARDS, false]
- glightbox
- gen-files:
scripts:
- docs/hooks/gen_ref_pages.py
- literate-nav:
nav_file: SUMMARY.md
- mkdocstrings:
handlers:
python:
Expand Down
Loading
Loading