Skip to main content
Glama
MCP Server AntV

MCP Server AntV

Official
by antvis

MCP Server AntV npm Version npm License

A Model Context Protocol (MCP) server designed for AI development and QA that provides AntV documentation context and code examples using the latest APIs.

Supports G2, G6, and F2 libraries for declarative visualization workflows, with S2, X6, L7, and more (including AVA, ADC, and G) coming soon.

โœจ Features

  • โœ… AntV 5.x Compatibility: Leverages the latest APIs for performance and modularity.

  • ๐Ÿงฉ Multi-Library Support: G2 (2D charts), G6 (graph/networks), and F2 (mobile charts).

  • ๐Ÿ” Smart Intent Extraction: Detects library usage and task complexity via extract_antv_topic.

  • ๐Ÿ“š Contextual Documentation: Fetches relevant AntV docs and code snippets with query_antv_document.

Related MCP server: MCP Documentation Server

๐Ÿ› ๏ธ Quick Start

Requirements

  • Node.js >= v18.0.0

  • Cursor, VSCode, Cline, Claude Desktop or another MCP Client.

Connect to Cursor

Install MCP Server

Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server

{
  "mcpServers": {
    "mcp-server-antv": {
      "command": "npx",
      "args": ["-y", "@antv/mcp-server-antv"]
    }
  }
}

On Window system:

{
  "mcpServers": {
    "mcp-server-antv": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@antv/mcp-server-antv"]
    }
  }
}

Connect to VSCode

Install in VSCode

Pasting the following configuration into your VSCode ~/.vscode/mcp.json file is the recommended approach.

{
  "servers": {
    "mcp-server-antv": {
      "command": "npx",
      "args": ["-y", "@antv/mcp-server-antv"]
    }
  }
}

or command-line configuration

code --add-mcp "{\"name\":\"mcp-server-antv\",\"command\": \"npx\",\"args\": [\"-y\",\"@antv/mcp-server-antv\"]}"

๐Ÿงช Example Workflow

An example workflow:

๐Ÿงฐ Tools Overview

Tool

Functionality

extract_antv_topic

Extract user intent, detects library (G2/G6/F2), and infers task complexity.

query_antv_document

fetch latest documentation and code examples with context7

๐Ÿ”จ Contributing

Clone the repo

git clone https://github.com/antvis/mcp-server-chart.git
cd mcp-server-chart

Install dependencies:

npm install

Build the server:

npm run build

Start the MCP server:

npm run start

๐Ÿ“„ License

MIT@AntV.

Available Tools

2 tools
extract_antv_topicA

AntV Intelligent Assistant Preprocessing Tool - Specifically designed to handle any user queries related to AntV visualization libraries. This tool is the first step in processing AntV technology stack issues, responsible for intelligently identifying, parsing, and structuring user visualization requirements.

MANDATORY: Must be called for ANY new AntV-related queries, including simple questions. Always precedes query_antv_document tool.

When to use this tool:

  • AntV-related queries: Questions about g2/g6/l7/x6/f2/s2/g/ava/adc libraries.

  • Visualization tasks: Creating charts, graphs, maps, or other visualizations.

  • Problem solving: Debugging errors, performance issues, or compatibility problems.

  • Learning & implementation: Understanding concepts or requesting code examples.

Key features:

  • Smart Library Detection: Scans installed AntV libraries and recommends the best fit based on query and project dependencies.

  • Topic & Intent Extraction: Intelligently extracts technical topics and determines user intent (learn/implement/solve).

  • Task Complexity Handling: Detects complex tasks and decomposes them into manageable subtasks.

  • Seamless Integration: Prepares structured data for the query_antv_document tool to provide precise solutions.

Inputs: query (required), library, maxTopics.

query_antv_documentA

AntV Context Retrieval Assistant - Fetches relevant documentation, code examples, and best practices from official AntV resources. Supports g2, g6, l7, x6, f2, s2, g, ava, adc libraries, and handles subtasks iterative queries.

MANDATORY: Must be called for ANY AntV-related query (g2, g6, l7, x6, f2, s2, g, ava, adc), regardless of task complexity. No exceptions for simple tasks.

When to use this tool:

  • Implementation & Optimization: To implement new features, modify styles, refactor code, or optimize performance in AntV solutions.

  • Debugging & Problem Solving: For troubleshooting errors, unexpected behaviors, or technical challenges in AntV projects.

  • Learning & Best Practices: To explore official documentation, code examples, design patterns, or advanced features.

  • Complex Task Handling: For multi-step tasks requiring subtask decomposition (e.g., "Build a dashboard with interactive charts").

  • Simple modifications: Even basic changes like "Change the chart's color" or "Update legend position" in AntV context.

Inputs: intent (required), library (required), query (required), topic (required), +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A4.1/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: extract_antv_topic handles preprocessing, requirement parsing, and intent extraction, while query_antv_document focuses on retrieving documentation and solutions. Their mandatory sequencing (extract first, then query) reinforces this separation, eliminating any ambiguity about when to use each tool.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern with snake_case naming: extract_antv_topic and query_antv_document. The naming clearly indicates their functions (extract vs. query) while maintaining domain specificity (antv_topic vs. antv_document), creating a predictable and readable convention throughout the set.

    Tool Count3/5

    With only 2 tools, the server feels thin for covering the broad AntV visualization domain (9 libraries mentioned). While the tools logically separate preprocessing from retrieval, many visualization tasks might require additional operations like code generation, validation, or specific library interactions that aren't represented in this minimal set.

    Completeness2/5

    The tool surface is severely incomplete for the AntV visualization domain. While the tools cover preprocessing and documentation retrieval, there are significant gaps: no tools for actual code generation, chart rendering, data transformation, style modification, or error handling. Agents will hit dead ends when trying to implement solutions beyond documentation lookup.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers