// npm package
@antv/mcp-server-chart
A Model Context Protocol server for generating charts using AntV. This is a TypeScript-based MCP server that provides chart generation capabilities. It allows you to create various types of charts through MCP tools.
versions
44
maintainers
51
license
MIT
first publish
2025-04-27
publisher
atool
tarball
162,603 B
AUTO-PUBLISHED·1 version indexed·latest published 2026-02-25
// publisher campaignby atool
9 caught packages from this accountThis is not an isolated catch. The same publisher has shipped 8 other packages that our pipeline flagged — the shape of a coordinated campaign, not a one-off. Each link below opens that sibling's analysis.
// offending code· @0.9.10· no static-pattern hits
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
- @0.9.10··AUTO-PUBLISHED·publisher: atoolheuristic 75/100static flags 0llm benign (0.85) via ollamamature-packagepublisher-multi-name-burst:5ai-agent-frameworkosv-flagged:MAL-2026-4069
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
// offending code· no static-pattern hits
--- install scripts --- ### prepare husky && npm run build ### prepublishOnly npm run build --- package.json (entry) --- { "name": "@antv/mcp-server-chart", "description": "A Model Context Protocol server for generating charts using AntV. This is a TypeScript-based MCP server that provides chart generation capabilities. It allows you to create various types of charts through MCP tools.", "mcpName": "io.github.antvis/mcp-server-chart", "version": "0.9.10", "main": "build/index.js", "types": "build/index.d.ts", "exports": { "./sdk": "./build/sdk.js" }, "scripts": { "prebuild": "rm -rf build/*", "build": "tsc && tsc-alias -p tsconfig.json", "postbuild": "chmod +x build/index.js", "start": "npx @modelcontextprotocol/inspector node build/index.js", "prepare": "husky && npm run build", "prepublishOnly": "npm run build", "test": "vitest" }, "lint-staged": { "*.{ts,js,json}": [ "biome check --write", "biome format --write", "biome lint" ] }, "bin": { "mcp-server-chart": "./build/index.js" }, "publishConfig": { "registry": "https://registry.npmjs.org/", "access": "public" }, "files": ["build"], "keywords": ["antv", "mcp", "data-visualization", "chart", "graph", "map"], "repository": { "type": "git", --- index.js (entry) --- #!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const node_util_1 = require("node:util"); const server_1 = require("./server.js"); const logger_1 = require("./utils/logger.js"); // Parse command line arguments const { values } = (0, node_util_1.parseArgs)({ options: { transport: { type: "string", short: "t", default: "stdio", }, host: { type: "string", short: "h", default: "localhost", }, port: { type: "string", short: "p", default: "1122", }, endpoint: { type: "string", short: "e", default: "", // We'll handle defaults per transport type }, help: { type: "boolean", short: "H", }, }, }); // Display help information if requested if (values.help) { console.log(` MCP Server Chart CLI Options: --transport, -t Specify the transport protocol: "stdio", "sse", or "streamable" (default: "stdio") --host, -h Specify the host for SSE or streamable transport (default: localhost) --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- build/index.d.ts (bundled) --- #!/usr/bin/env node export {}; --- build/index.js (bundled) --- #!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const node_util_1 = require("node:util"); const server_1 = require("./server.js"); const logger_1 = require("./utils/logger.js"); // Parse command line arguments const { values } = (0, node_util_1.parseArgs)({ options: { transport: { type: "string", short: "t", default: "stdio", }, host: { type: "string", short: "h", default: "localhost", }, port: { type: "string", short: "p", default: "1122", }, endpoint: { type: "string", short: "e", default: "", // We'll handle defaults per transport type }, help: { type: "boolean", short: "H", }, }, }); // Display help information if requested if (values.help) { console.log(` MCP Server Chart CLI Options: --transport, -t Specify the transport protocol: "stdio", "sse", or "streamable" (default: "stdio") --host, -h Specify the host for SSE or streamable transport (default: localhost) --port, -p Specify the port for SSE or streamable transport (default: 1122) --endpoint, -e Specify the endpoint for the transport: - For SSE: default is "/sse" - For streamable: default is "/mcp" --help, -H Show this help message `); process.exit(0); } // Run in the specified transport mode const transport = values.transport.toLowerCase(); if (transport === "sse") { logger_1.logger.setIsStdio(false); const port = Number.parseInt(values.port, 10); // Use provided endpoint or default to "/sse" for SSE const endpoint = values.endpoint || "/sse"; const host = values.host || "localhost"; (0, server_1.runSSEServer)(host, port, endpoint).catch(console.error); } else if (transport === "streamable") { logger --- build/sdk.d.ts (bundled) --- /** * Exports the API for the `@antv/mcp-server-chart` package. * This includes chart generation capabilities and utility functions. */ export * from "./charts"; export { callTool } from "./utils"; --- build/sdk.js (bundled) --- "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.callTool = void 0; /** * Exports the API for the `@antv/mcp-server-chart` package. * This includes chart generation capabilities and utility functions. */ __exportStar(require("./charts/index.js"), exports); var utils_1 = require("./utils/index.js"); Object.defineProperty(exports, "callTool", { enumerable: true, get: function () { return utils_1.callTool; } }); --- build/server.d.ts (bundled) --- import { Server } from "@modelcontextprotocol/sdk/server/index.js"; /** * Creates and configures an MCP server for chart generation. */ export declare function createServer(): Server; /** * Runs the server with stdio transport. */ export declare function runStdioServer(): Promise<void>; /** * Runs the server with SSE transport. */ export declare function runSSEServer(host?: string, port?: number, endpoint?: string): Promise<void>; /** * Runs the server with HTTP streamable transport. */ export declare function runHTTPStreamableServer(host?: string, port?: number, endpoint?: string): Promise<void>; --- build/server.js (bundled) --- "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator. --- build/utils/callTool.d.ts (bundled) --- /** * Call a tool to generate a chart based on the provided name and arguments. * @param tool The name of the tool to call, e.g., "generate_area_chart". * @param args The arguments for the tool, which should match the expected schema for the chart type. * @returns */ export declare function callTool(tool: string, args?: object): Promise<{ content: import("@modelcontextprotocol/sdk/types.js").CallToolResult["content"]; isError?: import("@modelcontextprotocol/sdk/types.js").CallToolResult["isError"]; } | { content: { type: string; text: string; }[]; _meta: { description: string; spec: { type: "area" | "bar" | "boxplot" | "column" | "district-map" | "dual-axes" | "fishbone-diagram" | "flow-diagram" | "funnel" | "histogram" | "line" | "liquid" | "mind-map" | "network-graph" | "organization-chart" | "path-map" | "pie" | "pin-map" | "radar" | "sankey" | "scatter" | "treemap" | "venn" | "violin" | "waterfall" | "word-cloud" | "spreadsheet"; }; }; }>; --- build/utils/callTool.js (bundled) --- "use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["defaul
