Skip to content

Commit 2c79940

Browse files
feat: add mcp-assert CI integration
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.
1 parent 9fd0bb4 commit 2c79940

27 files changed

Lines changed: 336 additions & 1 deletion

.github/workflows/mcp-assert.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: MCP Assert
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
mcp-assert:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: blackwell-systems/mcp-assert-action@v1
16+
with:
17+
suite: evals/
18+
timeout: 30s

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A Model Context Protocol server for generating charts using [AntV](https://github.com/antvis/). We can use this mcp server for _chart generation_ and _data analysis_.
44

5-
![](https://badge.mcpx.dev?type=server "MCP Server") [![build](https://github.com/antvis/mcp-server-chart/actions/workflows/build.yml/badge.svg)](https://github.com/antvis/mcp-server-chart/actions/workflows/build.yml) [![npm Version](https://img.shields.io/npm/v/@antv/mcp-server-chart.svg)](https://www.npmjs.com/package/@antv/mcp-server-chart) [![npm License](https://img.shields.io/npm/l/@antv/mcp-server-chart.svg)](https://www.npmjs.com/package/@antv/mcp-server-chart) [![codecov](https://codecov.io/gh/antvis/mcp-server-chart/graph/badge.svg?token=7R98VGO5GL)](https://codecov.io/gh/antvis/mcp-server-chart) [![smithery installations badge](https://smithery.ai/badge/antvis/mcp-server-chart)](https://smithery.ai/servers/antvis/mcp-server-chart) ![Visitors](https://hitscounter.dev/api/hit?url=https://github.com/antvis/mcp-server-chart&label=Visitors&icon=graph-up&color=%23dc3545&message=&style=flat&tz=UTC)
5+
![](https://badge.mcpx.dev?type=server "MCP Server") [![build](https://github.com/antvis/mcp-server-chart/actions/workflows/build.yml/badge.svg)](https://github.com/antvis/mcp-server-chart/actions/workflows/build.yml) [![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) [![npm Version](https://img.shields.io/npm/v/@antv/mcp-server-chart.svg)](https://www.npmjs.com/package/@antv/mcp-server-chart) [![npm License](https://img.shields.io/npm/l/@antv/mcp-server-chart.svg)](https://www.npmjs.com/package/@antv/mcp-server-chart) [![codecov](https://codecov.io/gh/antvis/mcp-server-chart/graph/badge.svg?token=7R98VGO5GL)](https://codecov.io/gh/antvis/mcp-server-chart) [![smithery installations badge](https://smithery.ai/badge/antvis/mcp-server-chart)](https://smithery.ai/servers/antvis/mcp-server-chart) ![Visitors](https://hitscounter.dev/api/hit?url=https://github.com/antvis/mcp-server-chart&label=Visitors&icon=graph-up&color=%23dc3545&message=&style=flat&tz=UTC)
66

77
<img width="768" alt="mcp-server-chart technical digram" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*XVH-Srg-b9UAAAAAgGAAAAgAemJ7AQ/fmt.avif" />
88

evals/generate_area_chart.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: generate_area_chart returns expected result
2+
server:
3+
command: npx
4+
args:
5+
- -y
6+
- '@antv/mcp-server-chart'
7+
assert:
8+
tool: generate_area_chart
9+
args:
10+
data: []
11+
expect:
12+
not_error: true
13+
timeout: 30s

evals/generate_bar_chart.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: generate_bar_chart returns expected result
2+
server:
3+
command: npx
4+
args:
5+
- -y
6+
- '@antv/mcp-server-chart'
7+
assert:
8+
tool: generate_bar_chart
9+
args:
10+
data: []
11+
expect:
12+
not_error: true
13+
timeout: 30s

evals/generate_boxplot_chart.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: generate_boxplot_chart returns expected result
2+
server:
3+
command: npx
4+
args:
5+
- -y
6+
- '@antv/mcp-server-chart'
7+
assert:
8+
tool: generate_boxplot_chart
9+
args:
10+
data: []
11+
expect:
12+
not_error: true
13+
timeout: 30s

evals/generate_column_chart.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: generate_column_chart returns expected result
2+
server:
3+
command: npx
4+
args:
5+
- -y
6+
- '@antv/mcp-server-chart'
7+
assert:
8+
tool: generate_column_chart
9+
args:
10+
data: []
11+
expect:
12+
not_error: true
13+
timeout: 30s

evals/generate_district_map.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "generate_district_map crashes on empty data (antvis/mcp-server-chart#291)"
2+
server:
3+
command: npx
4+
args: [-y, '@antv/mcp-server-chart']
5+
assert:
6+
tool: generate_district_map
7+
args:
8+
data: {}
9+
expect:
10+
not_error: true
11+
skip: true
12+
timeout: 30s
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: generate_dual_axes_chart returns expected result
2+
server:
3+
command: npx
4+
args:
5+
- -y
6+
- '@antv/mcp-server-chart'
7+
assert:
8+
tool: generate_dual_axes_chart
9+
args:
10+
categories: []
11+
series: []
12+
expect:
13+
not_error: true
14+
timeout: 30s
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "generate_fishbone_diagram crashes on empty data (antvis/mcp-server-chart#291)"
2+
server:
3+
command: npx
4+
args: [-y, '@antv/mcp-server-chart']
5+
assert:
6+
tool: generate_fishbone_diagram
7+
args:
8+
data: {}
9+
expect:
10+
not_error: true
11+
skip: true
12+
timeout: 30s

evals/generate_flow_diagram.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: "generate_flow_diagram crashes on empty data (antvis/mcp-server-chart#291)"
2+
server:
3+
command: npx
4+
args: [-y, '@antv/mcp-server-chart']
5+
assert:
6+
tool: generate_flow_diagram
7+
args:
8+
data: {}
9+
expect:
10+
not_error: true
11+
skip: true
12+
timeout: 30s

0 commit comments

Comments
 (0)