Skip to content

Commit 157745d

Browse files
committed
Merge branch 'main' into fix/tool-not-found-invalid-params
2 parents c7df85c + 7fe8867 commit 157745d

219 files changed

Lines changed: 15080 additions & 584 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/conformance-weekly.yaml

Lines changed: 54 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
name: conformance-weekly
22

3-
# Runs the MCP conformance suite weekly against the latest
4-
# @modelcontextprotocol/conformance release. The on:pull_request pipeline
5-
# pins to whatever version is available at PR time; this schedule catches
6-
# upstream releases that add scenarios between PRs.
7-
#
8-
# It also scores each run and publishes the client/server pass-rate as
9-
# shields.io endpoint JSON to the orphan `badges` branch (consumed by the
10-
# README); that branch is created on the first run.
3+
# Tracks the newest published @modelcontextprotocol/conformance; the
4+
# on:pull_request pipeline pins an exact version instead. Also publishes
5+
# score badges to the orphan `badges` branch, consumed by the README.
116
on:
127
schedule:
138
- cron: '0 6 * * 1' # Mondays 06:00 UTC
@@ -19,8 +14,20 @@ permissions:
1914

2015
jobs:
2116
server:
22-
name: conformance / server (latest)
17+
name: conformance / server (${{ matrix.spec-version }}, ${{ matrix.dist-tag }})
2318
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- spec-version: '2025-11-25'
24+
dist-tag: latest
25+
path: '/'
26+
baseline: conformance-baseline-2025-11-25.yml
27+
- spec-version: '2026-07-28'
28+
dist-tag: alpha
29+
path: '/'
30+
baseline: conformance-baseline-2026-07-28.yml
2431
steps:
2532
- uses: actions/checkout@v7
2633
- uses: actions/setup-node@v7
@@ -35,31 +42,47 @@ jobs:
3542
sleep 5
3643
- name: Run conformance tests
3744
working-directory: ./tests/Conformance
38-
run: npx --yes @modelcontextprotocol/conformance@latest server --url http://localhost:8000/ --expected-failures conformance-baseline.yml --output-dir results
45+
run: >-
46+
npx --yes @modelcontextprotocol/conformance@${{ matrix.dist-tag }} server
47+
--url http://localhost:8000${{ matrix.path }}
48+
--suite all
49+
--spec-version ${{ matrix.spec-version }}
50+
--expected-failures ${{ matrix.baseline }}
51+
--output-dir results
3952
- name: Generate score badge
4053
if: always()
41-
run: php tests/Conformance/score.php server
54+
run: php tests/Conformance/score.php server ${{ matrix.spec-version }}
4255
- name: Show docker logs on failure
4356
if: failure()
4457
run: docker compose -f tests/Conformance/Fixtures/docker-compose.yml logs
4558
- name: Upload conformance results
4659
if: failure()
4760
uses: actions/upload-artifact@v7
4861
with:
49-
name: conformance-server-results
62+
name: conformance-server-results-${{ matrix.spec-version }}
5063
path: |
5164
tests/Conformance/logs
5265
tests/Conformance/results
5366
- name: Upload score badge
5467
if: always()
5568
uses: actions/upload-artifact@v7
5669
with:
57-
name: server-badge
58-
path: tests/Conformance/server-conformance.json
70+
name: badge-server-${{ matrix.spec-version }}
71+
path: tests/Conformance/server-conformance-${{ matrix.spec-version }}.json
5972

6073
client:
61-
name: conformance / client (latest)
74+
name: conformance / client (${{ matrix.spec-version }}, ${{ matrix.dist-tag }})
6275
runs-on: ubuntu-latest
76+
strategy:
77+
fail-fast: false
78+
matrix:
79+
include:
80+
- spec-version: '2025-11-25'
81+
dist-tag: latest
82+
baseline: conformance-baseline-2025-11-25.yml
83+
- spec-version: '2026-07-28'
84+
dist-tag: alpha
85+
baseline: conformance-baseline-2026-07-28.yml
6386
steps:
6487
- uses: actions/checkout@v7
6588
- uses: shivammathur/setup-php@v2
@@ -73,24 +96,30 @@ jobs:
7396
- run: mkdir -p tests/Conformance/logs
7497
- name: Run conformance tests
7598
working-directory: ./tests/Conformance
76-
run: npx --yes @modelcontextprotocol/conformance@latest client --command "php ${{ github.workspace }}/tests/Conformance/client.php" --suite all --expected-failures conformance-baseline.yml --output-dir results
99+
run: >-
100+
npx --yes @modelcontextprotocol/conformance@${{ matrix.dist-tag }} client
101+
--command "php ${{ github.workspace }}/tests/Conformance/client.php"
102+
--suite all
103+
--spec-version ${{ matrix.spec-version }}
104+
--expected-failures ${{ matrix.baseline }}
105+
--output-dir results
77106
- name: Generate score badge
78107
if: always()
79-
run: php tests/Conformance/score.php client
108+
run: php tests/Conformance/score.php client ${{ matrix.spec-version }}
80109
- name: Upload conformance results
81110
if: failure()
82111
uses: actions/upload-artifact@v7
83112
with:
84-
name: conformance-client-results
113+
name: conformance-client-results-${{ matrix.spec-version }}
85114
path: |
86115
tests/Conformance/logs
87116
tests/Conformance/results
88117
- name: Upload score badge
89118
if: always()
90119
uses: actions/upload-artifact@v7
91120
with:
92-
name: client-badge
93-
path: tests/Conformance/client-conformance.json
121+
name: badge-client-${{ matrix.spec-version }}
122+
path: tests/Conformance/client-conformance-${{ matrix.spec-version }}.json
94123

95124
notify:
96125
name: Open issue on failure
@@ -116,26 +145,21 @@ jobs:
116145
- Run: $RUN_URL
117146
- Triggered: $(date -u +%FT%TZ)
118147
119-
Upstream likely published a release whose scenarios the SDK does not satisfy. Either fix the SDK, update the conformance fixtures, or add the new failure to \`tests/Conformance/conformance-baseline.yml\`."
148+
Upstream likely published a release whose scenarios the SDK does not satisfy. Either fix the SDK, update the conformance fixtures, or add the new failure to \`tests/Conformance/conformance-baseline-2025-11-25.yml\`."
120149
fi
121150
122151
publish:
123152
name: Publish conformance badges
124153
runs-on: ubuntu-latest
125154
needs: [server, client]
126-
# Publish even when the suite regressed (the badge should reflect reality);
127-
# skip on forks, which cannot push the `badges` branch.
128155
if: ${{ !cancelled() && github.repository == 'modelcontextprotocol/php-sdk' }}
129156
steps:
130157
- uses: actions/checkout@v7
131158
- uses: actions/download-artifact@v8
132159
with:
133-
name: server-badge
134-
path: badges-in
135-
- uses: actions/download-artifact@v8
136-
with:
137-
name: client-badge
160+
pattern: badge-*
138161
path: badges-in
162+
merge-multiple: true
139163
- name: Publish to badges branch
140164
run: |
141165
git config user.name "github-actions[bot]"
@@ -150,7 +174,8 @@ jobs:
150174
git -C badges-wt rm -rf --quiet . >/dev/null 2>&1 || true
151175
fi
152176
153-
cp badges-in/server-conformance.json badges-in/client-conformance.json badges-wt/
177+
rm -f badges-wt/server-conformance.json badges-wt/client-conformance.json
178+
cp badges-in/*.json badges-wt/
154179
155180
cd badges-wt
156181
git add -A

.github/workflows/pipeline.yaml

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ permissions:
55
contents: read
66
pull-requests: write
77

8+
env:
9+
# Pinned exact version; conformance-weekly.yaml tracks upstream releases.
10+
CONFORMANCE_PKG: "@modelcontextprotocol/conformance@0.2.0-alpha.11"
11+
812
jobs:
913
unit:
1014
runs-on: ubuntu-latest
@@ -95,8 +99,19 @@ jobs:
9599
run: vendor/bin/phpunit --testsuite=inspector
96100

97101
conformance-server:
98-
name: conformance / server
102+
name: conformance / server (${{ matrix.spec-version }})
99103
runs-on: ubuntu-latest
104+
strategy:
105+
fail-fast: false
106+
matrix:
107+
include:
108+
- spec-version: '2025-11-25'
109+
path: '/'
110+
baseline: conformance-baseline-2025-11-25.yml
111+
- spec-version: '2026-07-28'
112+
path: '/'
113+
baseline: conformance-baseline-2026-07-28.yml
114+
100115
steps:
101116
- name: Checkout
102117
uses: actions/checkout@v7
@@ -118,7 +133,12 @@ jobs:
118133
119134
- name: Run conformance tests
120135
working-directory: ./tests/Conformance
121-
run: npx @modelcontextprotocol/conformance server --url http://localhost:8000/ --expected-failures conformance-baseline.yml
136+
run: >-
137+
npx --yes ${{ env.CONFORMANCE_PKG }} server
138+
--url http://localhost:8000${{ matrix.path }}
139+
--suite all
140+
--spec-version ${{ matrix.spec-version }}
141+
--expected-failures ${{ matrix.baseline }}
122142
123143
- name: Show logs on failure
124144
if: failure()
@@ -146,8 +166,17 @@ jobs:
146166
run: docker compose -f tests/Conformance/Fixtures/docker-compose.yml down
147167

148168
conformance-client:
149-
name: conformance / client
169+
name: conformance / client (${{ matrix.spec-version }})
150170
runs-on: ubuntu-latest
171+
strategy:
172+
fail-fast: false
173+
matrix:
174+
include:
175+
- spec-version: '2025-11-25'
176+
baseline: conformance-baseline-2025-11-25.yml
177+
- spec-version: '2026-07-28'
178+
baseline: conformance-baseline-2026-07-28.yml
179+
151180
steps:
152181
- name: Checkout
153182
uses: actions/checkout@v7
@@ -171,7 +200,12 @@ jobs:
171200

172201
- name: Run client conformance tests
173202
working-directory: ./tests/Conformance
174-
run: npx @modelcontextprotocol/conformance client --command "php ${{ github.workspace }}/tests/Conformance/client.php" --suite all --expected-failures conformance-baseline.yml
203+
run: >-
204+
npx --yes ${{ env.CONFORMANCE_PKG }} client
205+
--command "php ${{ github.workspace }}/tests/Conformance/client.php"
206+
--suite all
207+
--spec-version ${{ matrix.spec-version }}
208+
--expected-failures ${{ matrix.baseline }}
175209
176210
- name: Show logs on failure
177211
if: failure()

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ examples/**/cache
88
examples/**/sessions
99
tests/Conformance/client-conformance.json
1010
tests/Conformance/server-conformance.json
11-
tests/Conformance/results
11+
tests/Conformance/results*
1212
tests/Conformance/sessions
1313
tests/Conformance/logs/*.log
1414

0 commit comments

Comments
 (0)