Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .github/pages/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
title: '@modelcontextprotocol/sdk'

# Include generated files and directories which may start with underscores
include:
- '_*'
19 changes: 19 additions & 0 deletions .github/pages/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# Empty Jekyll front matter to enable Liquid templating (see {{ ... }} below)
---

<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Redirecting to latest documentation...</title>
<meta http-equiv="refresh" content="0; url=v{{ site.data.versions[0] }}/" />
<link rel="canonical" href="v{{ site.data.versions[0] }}/" />
</head>
<body>
<p>Redirecting to <a href="v{{ site.data.versions[0] }}/">latest documentation</a>...</p>
<script>
window.location.href = 'v{{ site.data.versions[0] }}/';
</script>
</body>
</html>
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,35 @@ jobs:
- run: npm publish --provenance --access public ${{ steps.npm-tag.outputs.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-gh-pages:
runs-on: ubuntu-latest
if: github.event_name == 'release'
needs: [publish]

permissions:
contents: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches

- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci

- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Generate documentation
run: ./scripts/generate-gh-pages.sh ${{ github.ref_name }}

- name: Push to gh-pages
run: git push origin gh-pages
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ pnpm-lock.yaml

# Ignore generated files
src/spec.types.ts

# Jekyll/Liquid template files with special formatting requirements
docs/index.md
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ For more details on how to run these examples (including recommended commands an
- [docs/capabilities.md](docs/capabilities.md) – sampling, elicitation (form and URL), and experimental task-based execution.
- [docs/faq.md](docs/faq.md) – environment and troubleshooting FAQs (including Node.js Web Crypto support).
- External references:
- [SDK API documentation](https://modelcontextprotocol.github.io/typescript-sdk/)
- [Model Context Protocol documentation](https://modelcontextprotocol.io)
- [MCP Specification](https://spec.modelcontextprotocol.io)
- [Example Servers](https://github.com/modelcontextprotocol/servers)
Expand Down
216 changes: 216 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading