MCP Shipyard
Docs menu
Docs

GitHub Action

Scan a remote MCP server on every pull request, diff its tools against a baseline, and get one updated PR comment plus a job summary.

The action scans a remote MCP server on every pull request, diffs its tools against a baseline, writes a job summary and keeps one updated comment on the pull request.

- uses: mcpshipyard/check@v1
  with:
    url: https://my-preview.vercel.app/mcp
    baseline: tools.json
    fail-on: blocker

Inputs

InputDefaultMeaning
urlrequiredMCP endpoint to check
baselinenoneTools snapshot made with shipyard snapshot <url> > tools.json. Removed tools or new required parameters fail the check
fail-onneverblocker or major: fail on failing findings at that severity or worse
headernoneRequest header Name: value, for protected previews. Pass it from a secret
commenttruePost or update the PR comment. Needs pull-requests: write
pr-numberautoDetected from the PR event, or from the commit for deployment_status events
versionlatestnpm version of mcpshipyard to run

The action has one output, exit-code. It also has a selection mode that gates on tool-selection share. See selection gate.

Preview deployment workflow

This workflow checks the MCP endpoint of every successful Vercel preview deployment and comments on the pull request.

name: MCP Shipyard check
on:
  deployment_status:

permissions:
  contents: read
  pull-requests: write

jobs:
  mcp-check:
    if: github.event.deployment_status.state == 'success' && github.event.deployment.environment == 'Preview'
    runs-on: ubuntu-latest
    steps:
      # Only needed when the baseline file lives in the repo.
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.deployment.sha }}
      - uses: mcpshipyard/check@v1   # or: uses: ./action when vendored
        with:
          url: ${{ github.event.deployment_status.environment_url }}/mcp
          baseline: tools.json        # made with: npx mcpshipyard snapshot <prod-url> > tools.json
          fail-on: blocker
          # For Vercel Deployment Protection, pass the automation bypass secret:
          header: "x-vercel-protection-bypass: ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}"

Behavior

  • The PR comment starts with a hidden marker, so reruns edit the same comment instead of adding new ones.
  • If no pull request is found for the commit, for example a push to the main branch, the comment is skipped and the job summary still has the report.
  • The job exits with the scan's exit code: 1 for an unreachable server, a fail-on hit, or a breaking tool change.

Tips

  • Scan a deployed environment, not source code. The scan is a client of your server, so it needs a URL the runner can reach.
  • Keep the baseline in the repository and update it with shipyard snapshot in the pull request that intentionally changes tools, so tool changes show up as a diff in review.
  • Start with fail-on: blocker and move to major once the backlog is clean.
  • Pass any token or bypass header from a secret, and use a test account, not a production user.

npm package note

The action runs npx -y mcpshipyard@<version> scan ..., which assumes the CLI is published to npm as mcpshipyard. If you use a vendored copy of the repository, replace that line in action.yml with npx tsx packages/cli/src/bin.ts.

Publishing to the registry

The launch kit generates a separate workflow that publishes server.json to the official MCP Registry on a version tag. See publish to the official MCP Registry.

Related: CLI, monitoring.