Skip to content

Commit 8aca27e

Browse files
committed
Merge origin/main into feat/app-tool-registration
- Resolve import conflicts in src/app.ts (keep both ReadResource* and Tool* imports) - Fix threejs-server wrapper: preserve registerWidgetTools + adopt main's fullscreen sizing - Fix pdf-server description: adopt disableInteract ternary, keep app-tool mention - Remove redundant bridge.connect() in app-bridge.test.ts (parent beforeEach already connects) - Remove orphaned codePreview declaration in shadertoy (usage removed in branch refactor) - Fix pre-commit hook: exclude deleted files from re-staging (--diff-filter=ACMR) - Add .claude/ to .prettierignore (local dev artifacts)
2 parents 74ae7e9 + a7273bb commit 8aca27e

176 files changed

Lines changed: 19780 additions & 2128 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 60 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,36 @@ permissions:
1010
contents: read
1111

1212
jobs:
13+
prettier-fix:
14+
name: Auto-fix formatting
15+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
steps:
20+
- uses: actions/checkout@v6
21+
with:
22+
ref: ${{ github.head_ref }}
23+
token: ${{ github.token }}
24+
25+
- uses: actions/setup-node@v6
26+
with:
27+
node-version: "22"
28+
cache: npm
29+
30+
- run: npm ci
31+
32+
- run: npm run prettier:fix
33+
34+
- name: Commit formatting changes
35+
run: |
36+
git diff --quiet && exit 0
37+
git config user.name "github-actions[bot]"
38+
git config user.email "github-actions[bot]@users.noreply.github.com"
39+
git add -A
40+
git commit -m "style: auto-fix prettier formatting"
41+
git push
42+
1343
build:
1444
strategy:
1545
fail-fast: false
@@ -30,7 +60,7 @@ jobs:
3060
runs-on: ${{ matrix.os }}
3161

3262
steps:
33-
- uses: actions/checkout@v4
63+
- uses: actions/checkout@v6
3464

3565
- name: Verify no private URLs in package-lock.json
3666
shell: bash
@@ -40,14 +70,19 @@ jobs:
4070
shell: bash
4171
run: node scripts/check-versions.mjs
4272

43-
- uses: actions/setup-node@v4
73+
- uses: actions/setup-node@v6
4474
with:
45-
node-version: "20"
75+
node-version: "22"
76+
cache: npm
4677

47-
- run: npm install
78+
- run: npm ci
4879

4980
- run: npm run build
5081

82+
- name: Validate TypeDoc links
83+
if: runner.os == 'Linux' && matrix.name == 'Linux x64'
84+
run: npm exec typedoc -- --treatValidationWarningsAsErrors --emit none
85+
5186
- run: npm run examples:build
5287

5388
- name: Verify generated schemas are up-to-date
@@ -66,20 +101,26 @@ jobs:
66101

67102
- run: npm run prettier
68103

104+
- name: Build MCPB bundle (pdf-server)
105+
if: runner.os == 'Linux' && matrix.name == 'Linux x64'
106+
run: npx -y @anthropic-ai/mcpb pack
107+
working-directory: examples/pdf-server
108+
69109
e2e:
70110
runs-on: ubuntu-latest
71111
steps:
72-
- uses: actions/checkout@v4
112+
- uses: actions/checkout@v6
73113

74114
- uses: oven-sh/setup-bun@v2
75115
with:
76116
bun-version: latest
77117

78-
- uses: actions/setup-node@v4
118+
- uses: actions/setup-node@v6
79119
with:
80-
node-version: "20"
120+
node-version: "22"
121+
cache: npm
81122

82-
- uses: astral-sh/setup-uv@v5
123+
- uses: astral-sh/setup-uv@v7
83124

84125
- run: npm ci
85126

@@ -90,7 +131,7 @@ jobs:
90131
run: npx playwright test --reporter=list
91132

92133
- name: Upload test results
93-
uses: actions/upload-artifact@v4
134+
uses: actions/upload-artifact@v6
94135
if: failure()
95136
with:
96137
name: test-results
@@ -103,23 +144,23 @@ jobs:
103144
runs-on: windows-latest
104145

105146
steps:
106-
- uses: actions/checkout@v4
147+
- uses: actions/checkout@v6
107148

108-
- uses: Vampire/setup-wsl@v5
149+
- uses: Vampire/setup-wsl@v6
109150
with:
110151
distribution: Ubuntu-24.04
111152

112153
- name: Install Node.js in WSL
113154
shell: wsl-bash {0}
114155
run: |
115156
sudo apt-get update
116-
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
157+
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
117158
sudo apt-get install -y nodejs
118159
119160
- name: Build and test in WSL
120161
shell: wsl-bash {0}
121162
run: |
122-
npm install
163+
npm ci
123164
npm run build
124165
npm run examples:build
125166
npm test
@@ -146,17 +187,20 @@ jobs:
146187
runs-on: ${{ matrix.os }}
147188

148189
steps:
149-
- uses: actions/setup-node@v4
190+
- uses: actions/setup-node@v6
150191
with:
151-
node-version: "20"
192+
node-version: "22"
152193

153194
- name: Create test project and install from git
154195
shell: bash
196+
env:
197+
HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
198+
HEAD_REF: ${{ github.head_ref || github.ref_name }}
155199
run: |
156200
mkdir test-project
157201
cd test-project
158202
npm init -y
159203
# Install from the PR branch (use head repo for fork PRs)
160-
npm install "git+https://github.com/${{ github.event.pull_request.head.repo.full_name || github.repository }}#${{ github.head_ref || github.ref_name }}"
204+
npm install "git+https://github.com/${HEAD_REPO}#${HEAD_REF}"
161205
# Verify the package is usable (ESM import)
162206
node --input-type=module -e "import { App } from '@modelcontextprotocol/ext-apps'; console.log('Import successful:', typeof App)"

.github/workflows/docs-preview.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Docs Preview
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, closed]
6+
paths:
7+
- "docs/**"
8+
- "src/**"
9+
- "README.md"
10+
- "typedoc.config.mjs"
11+
- "scripts/typedoc-*.mjs"
12+
- ".github/workflows/docs-preview.yml"
13+
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
18+
concurrency:
19+
group: docs-preview-${{ github.event.pull_request.number }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
build-and-deploy:
24+
# Refuse to run for fork PRs — forks do not have access to the Cloudflare
25+
# secrets, so deploys would fail anyway.
26+
if: >-
27+
github.event.action != 'closed' &&
28+
github.event.pull_request.head.repo.full_name == github.repository
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v6
32+
33+
- uses: actions/setup-node@v6
34+
with:
35+
node-version: "22"
36+
cache: npm
37+
38+
- run: npm ci
39+
40+
- run: npm run build
41+
42+
- run: npm run docs
43+
44+
- name: Deploy preview
45+
uses: modelcontextprotocol/actions/cloudflare-pages-preview/deploy@main
46+
with:
47+
directory: docs
48+
project-name: mcp-ext-apps-docs-preview
49+
api-token: ${{ secrets.CF_PAGES_PREVIEW_API_TOKEN }}
50+
account-id: ${{ secrets.CF_PAGES_PREVIEW_ACCOUNT_ID }}
51+
comment-title: "📖 Docs Preview Deployed"
52+
comment-marker: "<!-- docs-preview-comment -->"
53+
54+
cleanup:
55+
if: >-
56+
github.event.action == 'closed' &&
57+
github.event.pull_request.head.repo.full_name == github.repository
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: modelcontextprotocol/actions/cloudflare-pages-preview/cleanup@main
61+
with:
62+
project-name: mcp-ext-apps-docs-preview
63+
api-token: ${{ secrets.CF_PAGES_PREVIEW_API_TOKEN }}
64+
account-id: ${{ secrets.CF_PAGES_PREVIEW_ACCOUNT_ID }}
65+
comment-marker: "<!-- docs-preview-comment -->"

.github/workflows/docs.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ jobs:
1212
deploy:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v6
1616
- uses: oven-sh/setup-bun@v2
17-
- uses: actions/setup-node@v4
17+
- uses: actions/setup-node@v6
1818
with:
19-
node-version: "20"
20-
- run: npm install
19+
node-version: "22"
20+
cache: npm
21+
- run: npm ci
2122
- run: npm run build
2223
- run: npm run docs
2324
- uses: peaceiris/actions-gh-pages@v4
@@ -26,3 +27,4 @@ jobs:
2627
publish_dir: ./docs
2728
publish_branch: gh-pages
2829
keep_files: true
30+
cname: apps.extensions.modelcontextprotocol.io

.github/workflows/npm-publish.yml

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
permissions:
1515
contents: read
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818
- uses: oven-sh/setup-bun@v2
1919
with:
2020
bun-version: latest
21-
- uses: actions/setup-node@v4
21+
- uses: actions/setup-node@v6
2222
with:
2323
node-version: "22"
2424
cache: npm
@@ -31,11 +31,11 @@ jobs:
3131
permissions:
3232
contents: read
3333
steps:
34-
- uses: actions/checkout@v4
34+
- uses: actions/checkout@v6
3535
- uses: oven-sh/setup-bun@v2
3636
with:
3737
bun-version: latest
38-
- uses: actions/setup-node@v4
38+
- uses: actions/setup-node@v6
3939
with:
4040
node-version: "22"
4141
cache: npm
@@ -53,11 +53,11 @@ jobs:
5353
id-token: write
5454

5555
steps:
56-
- uses: actions/checkout@v4
56+
- uses: actions/checkout@v6
5757
- uses: oven-sh/setup-bun@v2
5858
with:
5959
bun-version: latest
60-
- uses: actions/setup-node@v4
60+
- uses: actions/setup-node@v6
6161
with:
6262
node-version: "22"
6363
cache: npm
@@ -107,6 +107,7 @@ jobs:
107107
- budget-allocator-server
108108
- cohort-heatmap-server
109109
- customer-segmentation-server
110+
- debug-server
110111
- map-server
111112
- pdf-server
112113
- scenario-modeler-server
@@ -119,11 +120,11 @@ jobs:
119120
- wiki-explorer-server
120121

121122
steps:
122-
- uses: actions/checkout@v4
123+
- uses: actions/checkout@v6
123124
- uses: oven-sh/setup-bun@v2
124125
with:
125126
bun-version: latest
126-
- uses: actions/setup-node@v4
127+
- uses: actions/setup-node@v6
127128
with:
128129
node-version: "22"
129130
cache: npm
@@ -137,3 +138,35 @@ jobs:
137138
run: npm publish --workspace examples/${{ matrix.example }} --provenance --access public
138139
env:
139140
NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}
141+
142+
publish-mcpb:
143+
runs-on: ubuntu-latest
144+
if: github.event_name == 'release'
145+
environment: Release
146+
needs: [publish-examples]
147+
148+
permissions:
149+
contents: write
150+
151+
steps:
152+
- uses: actions/checkout@v6
153+
- uses: oven-sh/setup-bun@v2
154+
with:
155+
bun-version: latest
156+
- uses: actions/setup-node@v6
157+
with:
158+
node-version: "22"
159+
cache: npm
160+
- run: npm ci
161+
162+
- name: Build pdf-server
163+
run: npm run build --workspace examples/pdf-server
164+
165+
- name: Pack MCPB bundle
166+
run: npx -y @anthropic-ai/mcpb pack
167+
working-directory: examples/pdf-server
168+
169+
- name: Upload MCPB to release
170+
run: gh release upload "${{ github.event.release.tag_name }}" examples/pdf-server/*.mcpb --clobber
171+
env:
172+
GH_TOKEN: ${{ github.token }}

.github/workflows/publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
pkg-publish:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/setup-node@v4
16+
- uses: actions/checkout@v6
17+
- uses: actions/setup-node@v6
1818
with:
1919
node-version: 22
2020
cache: npm
@@ -24,11 +24,16 @@ jobs:
2424
- run: |
2525
npx pkg-pr-new publish \
2626
. \
27+
./examples/basic-server-preact \
2728
./examples/basic-server-react \
29+
./examples/basic-server-solid \
30+
./examples/basic-server-svelte \
2831
./examples/basic-server-vanillajs \
32+
./examples/basic-server-vue \
2933
./examples/budget-allocator-server \
3034
./examples/cohort-heatmap-server \
3135
./examples/customer-segmentation-server \
36+
./examples/debug-server \
3237
./examples/map-server \
3338
./examples/pdf-server \
3439
./examples/scenario-modeler-server \

0 commit comments

Comments
 (0)