Skip to content

feat: add mcp-assert CI integration#294

Closed
blackwell-systems wants to merge 4 commits into
antvis:mainfrom
blackwell-systems:feat/mcp-assert-ci
Closed

feat: add mcp-assert CI integration#294
blackwell-systems wants to merge 4 commits into
antvis:mainfrom
blackwell-systems:feat/mcp-assert-ci

Conversation

@blackwell-systems

Copy link
Copy Markdown
Contributor

Follow-up to #292 as requested by @hustcc.

What this adds

  • evals/ directory with 25 assertion YAML files covering all chart generation tools
  • .github/workflows/mcp-assert.yml workflow that runs on push and PR to main
  • Dynamic CI badge in README that shows real pass/fail status

How it works

Each assertion calls a tool with known inputs and verifies the response is not an error. If a tool regresses (e.g. starts throwing unhandled exceptions like #291), the CI fails and the badge turns red.

The workflow uses blackwell-systems/mcp-assert-action@v1, which installs mcp-assert and runs the assertion suite.

Badge

The badge links to the workflow runs page, not an external service. It uses the standard GitHub Actions badge format:

[![MCP Assert](https://github.com/antvis/mcp-server-chart/actions/workflows/mcp-assert.yml/badge.svg)](https://github.com/antvis/mcp-server-chart/actions/workflows/mcp-assert.yml)

Add deterministic MCP tool testing to CI using mcp-assert.

- evals/ directory with 25 assertion YAML files covering all chart tools
- GitHub Actions workflow running on push and PR to main
- Dynamic CI badge in README (shows real pass/fail status)

Each assertion calls a tool with known inputs and verifies the response
is not an error. Catches regressions like the unhandled exceptions
fixed in #292.

Requested by @hustcc in #292.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds an "MCP Assert" badge to the README and introduces a comprehensive set of evaluation YAML files for testing various chart generation tools, with some tests currently skipped due to known issues. The review feedback suggests improving the README's maintainability by placing badges on separate lines and recommends using block sequence formatting for arguments in all evaluation files to ensure stylistic consistency.

Comment thread README.md
Comment thread evals/generate_district_map.yaml Outdated
The MCP Assert workflow was spawning `npx -y @antv/mcp-server-chart`
which fails in CI with "transport closed" because the server process
exits before initialization completes.

Changes:
- Add setup-node, npm ci, npm run build steps to workflow
- Point all 25 eval files at `node build/index.js` (local build)
- Normalize YAML args to block sequence style
@blackwell-systems

Copy link
Copy Markdown
Contributor Author

Fixed in 217da46. The CI was failing because npx -y @antv/mcp-server-chart exits before initialization completes in the GitHub Actions environment.

Changes:

  • Added setup-node, npm ci, and npm run build steps so the workflow builds from source
  • Updated all 25 eval files to use node build/index.js (local build) instead of npx
  • Normalized YAML args to block sequence style per review feedback

This also means CI now tests the actual PR code rather than the published npm package, which is what you want for catching regressions.

Re: badge formatting — I kept the existing single-line format to match the rest of the README. Splitting badges onto separate lines would change the style of all existing badges, which is outside the scope of this PR.

The 9 tools that crashed on empty input (#291) now return graceful
isError responses after #292. Convert skip+not_error to is_error
assertions so all 25 tools are tested and pass rate reaches 100%.
@blackwell-systems

Copy link
Copy Markdown
Contributor Author

@hustcc CI is green and all 25 assertions pass. Ready for review whenever you have a chance.

@hustcc

hustcc commented May 2, 2026

Copy link
Copy Markdown
Member

Sorry, I don't think I'll merge the PR, as it adds a bit of a comprehension overhead.

Sorry again.

@hustcc hustcc closed this May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants