-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ci(conformance): integrate MCP server conformance test pipeline #3106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
anubhav756
wants to merge
7
commits into
main
Choose a base branch
from
anubhav-conformance
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+231
−0
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
82dbf77
ci(conformance): integrate MCP server conformance test pipeline
anubhav756 d9d2aa4
chore: beautify issue content format
anubhav756 5c666fa
chore: add baseline
anubhav756 7440966
ci: fix toolbox server startup
anubhav756 af4e745
ci: remove passing tests from baseline
anubhav756 b24e7b5
ci: fix wording in the generated github repo
anubhav756 d21190b
chore: move conformance baseline file to a more appropriate location
anubhav756 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: conformance | ||
| on: | ||
| pull_request: | ||
| pull_request_target: | ||
| types: [labeled] | ||
|
|
||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| conformance: | ||
| if: "${{ github.event.action != 'labeled' || github.event.label.name == 'tests: run' }}" | ||
| name: conformance | ||
| runs-on: ubuntu-latest | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| permissions: | ||
| contents: 'read' | ||
| issues: 'write' | ||
| pull-requests: 'write' | ||
| steps: | ||
| - name: Remove PR Label | ||
| if: "${{ github.event.action == 'labeled' && github.event.label.name == 'tests: run' }}" | ||
| uses: actions/github-script@v9 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| try { | ||
| await github.rest.issues.removeLabel({ | ||
| name: 'tests: run', | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.payload.pull_request.number | ||
| }); | ||
| } catch (e) { | ||
| console.log('Failed to remove label. Another job may have already removed it!'); | ||
| } | ||
|
|
||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.23' | ||
|
|
||
| - name: Start MCP Toolbox Server | ||
| run: | | ||
| echo "sources: {}" > tools.yaml | ||
| go build -o toolbox | ||
| ./toolbox & | ||
| sleep 5 # Give the server a moment to bind to port 5000 | ||
|
|
||
| - name: Run Conformance Tests | ||
| uses: modelcontextprotocol/conformance@main | ||
| with: | ||
| mode: server | ||
| url: 'http://localhost:5000/mcp' | ||
| suite: active | ||
| expected-failures: tests/conformance-baseline.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: Nightly Server Tier Assessment | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 6 * * *' # Runs at 6 AM every morning | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
|
|
||
| jobs: | ||
| tier-check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version: '1.23' | ||
|
|
||
| - name: Start MCP Toolbox Server | ||
| run: | | ||
| echo "sources: {}" > tools.yaml | ||
| go build -o toolbox | ||
| ./toolbox & | ||
| sleep 5 # Give the server a moment to bind to port 5000 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "22" | ||
|
|
||
| - name: Run Server Tier Assessment | ||
| id: assessment | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| npx --yes @modelcontextprotocol/conformance@latest tier-check --repo ${{ github.repository }} --output markdown --conformance-server-url "http://localhost:5000/mcp" > tier_report.txt | ||
| continue-on-error: true | ||
|
|
||
| - name: Report Tier Status | ||
| uses: actions/github-script@v9 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| const fs = require('fs'); | ||
| const report = fs.readFileSync('tier_report.txt', 'utf8'); | ||
| const title = 'Nightly Server Tier Assessment Failure'; | ||
| const periodicLabel = 'periodic-failure'; | ||
|
|
||
| const prevIssues = await github.rest.issues.listForRepo({ | ||
| ...context.repo, | ||
| state: 'open', | ||
| creator: 'github-actions[bot]', | ||
| labels: [periodicLabel] | ||
| }); | ||
|
|
||
| let existingIssue = prevIssues.data.find(issue => issue.title === title); | ||
|
|
||
| if (report.includes('Tier Assessment: Tier 1')) { | ||
| console.log('Tier 1 achieved! Closing open issue if it exists.'); | ||
| if (existingIssue) { | ||
| await github.rest.issues.createComment({ | ||
| ...context.repo, | ||
| issue_number: existingIssue.number, | ||
| body: "🎉 The nightly Server Tier Assessment confirms we are now **Tier 1**! Closing this issue." | ||
| }); | ||
| await github.rest.issues.update({ | ||
| ...context.repo, | ||
| issue_number: existingIssue.number, | ||
| state: 'closed' | ||
| }); | ||
| } | ||
| return; | ||
| } | ||
|
|
||
| const body = `The nightly Server Tier Assessment found gaps preventing Tier 1 status:\n\n${report}\n\nPlease fix these operational gaps.`; | ||
|
|
||
| if (existingIssue) { | ||
| console.log(`Found previous issue ${existingIssue.html_url}, updating body`); | ||
| await github.rest.issues.update({ | ||
| ...context.repo, | ||
| issue_number: existingIssue.number, | ||
| body: body | ||
| }); | ||
| } else { | ||
| console.log('No previous issue found, creating one'); | ||
| await github.rest.issues.create({ | ||
| ...context.repo, | ||
| title: title, | ||
| body: body, | ||
| labels: [periodicLabel] | ||
| }); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| server: | ||
| - logging-set-level | ||
| - completion-complete | ||
| - tools-list | ||
| - tools-call-simple-text | ||
| - tools-call-image | ||
| - tools-call-audio | ||
| - tools-call-embedded-resource | ||
| - tools-call-mixed-content | ||
| - tools-call-with-logging | ||
| - tools-call-error | ||
| - tools-call-with-progress | ||
| - tools-call-sampling | ||
| - tools-call-elicitation | ||
| - elicitation-sep1034-defaults | ||
| - server-sse-multiple-streams | ||
| - elicitation-sep1330-enums | ||
| - resources-list | ||
| - resources-read-text | ||
| - resources-read-binary | ||
| - resources-templates-read | ||
| - resources-subscribe | ||
| - resources-unsubscribe | ||
| - prompts-get-simple | ||
| - prompts-get-with-args | ||
| - prompts-get-embedded-resource | ||
| - prompts-get-with-image | ||
| - dns-rebinding-protection | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.