Badge and CI gate for your MCP server in 3 steps

The free MCP Readiness GitHub Action connects to your server the way agents do and fails the PR when the score drops or the tool list gets too expensive.

Quick start

1. Scan your server

Paste your MCP URL into the free scan. You get a 0-100 score, the token cost of your tool list and the top issues. No sign-up.

2. Add the badge

Put this in your README, with your URL. It links to your server's public page and refreshes at most every 6 hours.

[![MCP readiness](https://mcp.pacerai.fit/badge.svg?url=https://your-server.example.com/mcp)](https://mcp.pacerai.fit/s/your-server.example.com/mcp)

3. Add the Action

Save as .github/workflows/mcp-readiness.yml. It fails under the score you pick and over your token budget.

name: MCP readiness
on: [pull_request]
jobs:
  mcp-readiness:
    runs-on: ubuntu-latest
    steps:
      - uses: Om3rr/mcp-readiness-check@v1
        id: mcp
        with:
          url: https://your-server.example.com/mcp
          fail-under: 80
          max-context-tokens: 8000
      - run: echo "Score ${{ steps.mcp.outputs.score }}, ~${{ steps.mcp.outputs.context-tokens }} tokens per turn"

Test a local server in CI

Start the server in the job, wait for the port, then scan localhost. Nothing has to be public, and a localhost server gets the stricter Origin check.

name: MCP readiness
on: [pull_request]
jobs:
  mcp-readiness:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - name: Start the MCP server in the background
        run: |
          PORT=8787 npm start &
          for i in $(seq 1 30); do curl -s -o /dev/null http://127.0.0.1:8787/mcp && break; sleep 1; done
      - uses: Om3rr/mcp-readiness-check@v1
        with:
          url: http://127.0.0.1:8787/mcp
          fail-under: 80
          max-context-tokens: 8000

Inputs and outputs

InputRequiredDefaultWhat it does
urlyes""MCP endpoint (Streamable HTTP). Your public https URL, or http://127.0.0.1:PORT/mcp after starting the server in the job.
fail-underno70Fail the job if the score is below this (0-100). 0 never fails.
max-context-tokensno0Fail the job if the tools/list payload costs more than this many tokens (about 4 characters per token). 0 disables.
tokenno""Bearer token for servers behind login, so tools can be listed. Use a test-tenant token from secrets.
json-pathno""Write the JSON report (with the raw tools/list) to this path. Empty disables.
api-keyno""Optional license key. Not needed for the free tier.

Outputs: score, context-tokens, findings, mode. Read them with steps.<id>.outputs.score.

Troubleshooting

The job fails on OAuth discovery. What do I fix?

If your server answers 401, MCP clients need to discover how to log in. Return WWW-Authenticate: Bearer resource_metadata="https://your-server/.well-known/oauth-protected-resource" and serve that protected-resource metadata (RFC 9728) with an authorization_servers list. The authorization server needs its own metadata at /.well-known/oauth-authorization-server (RFC 8414). To scan the tools behind login as well, pass a test-tenant token with the token input from a secret.

It flags CORS or a foreign Origin. Why does that matter?

The scan sends a request with a foreign Origin header. The MCP spec says servers MUST validate Origin, and for a server on localhost accepting it is a fail, because any web page could reach it (DNS rebinding). Reject unknown origins with 403 and keep Access-Control-Allow-Origin to an allowlist rather than *. Public, read-only, unauthenticated servers only get an info note.

The scan times out or cannot connect in CI. What now?

Each request waits up to 15 seconds. In CI the usual cause is that the server has not finished starting: start it in the background and wait for the port, as in the local workflow above. Bind to 127.0.0.1 on the port you pass in url, and point at the Streamable HTTP path (often /mcp), not an SSE-only or stdio entry point. Public URLs must be reachable from GitHub-hosted runners.

The job fails on the token budget. How do I get under it?

max-context-tokens counts what your tools/list costs on every agent turn. Shorten long tool descriptions, drop rarely used tools, and remove repeated text in input schemas. Set it to 0 to only report the number while you work on it.

The score is below fail-under on the first run. Can I start softer?

Yes. Start with fail-under: 0 to see the score and top issues in the job log without failing, fix the top issues, then raise the gate. The free tier runs 50 times a day per repo.