Skip to main content
Glama
antvis

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
libraryNoAntV library name (optional) - If not specified, tool will automatically detect project dependencies and intelligently recommend
maxTopicsNoMaximum number of extracted topic keywords, default 5, can be increased appropriately for complex tasks
queryYesUser specific question or requirement description

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well by describing key behavioral features: 'Smart Library Detection' (scans dependencies), 'Topic & Intent Extraction,' 'Task Complexity Handling' (decomposes tasks), and 'Seamless Integration' (prepares data for next tool). However, it doesn't mention potential limitations, error handling, or performance characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (mandatory rule, usage scenarios, key features) and front-loaded with the most important information. However, some sentences could be more concise, and the 'Key features' section contains marketing language ('intelligently,' 'seamless') that doesn't add operational clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a preprocessing tool with 3 parameters, 100% schema coverage, and no output schema, the description provides good context about its role in the workflow and behavioral characteristics. However, without annotations or output schema, it could benefit from more detail about what the tool actually produces (structured data format) and any limitations or error conditions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds some context about 'library' parameter ('automatically detect project dependencies and intelligently recommend') and implies 'maxTopics' relates to 'complex tasks,' but doesn't provide additional semantic meaning beyond what's already well-documented in the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'intelligently identifying, parsing, and structuring user visualization requirements' for AntV libraries, specifying it's a 'preprocessing tool' and 'first step in processing AntV technology stack issues.' It explicitly distinguishes from its sibling 'query_antv_document' by stating it 'always precedes' that tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage rules with 'MANDATORY: Must be called for ANY new AntV-related queries' and a detailed 'When to use this tool' section listing four specific scenarios. It clearly states the tool must precede 'query_antv_document' and provides examples of what constitutes AntV-related queries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
intentYesExtracted user intent, provided by extract_antv_topic tool or directly extracted from simple questions.
libraryYesSpecified AntV library type, intelligently identified based on user query
queryYesUser specific question or requirement description
subTasksNoDecomposed subtask list for complex tasks, supports batch processing
tokensNotokens for returned content
topicYesTechnical topic keywords (comma-separated). Provided by `extract_antv_topic` or directly extracted from simple questions.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and delivers substantial behavioral context. It discloses the tool's scope (supports 9 specific libraries), capability (handles subtasks iterative queries), and mandatory nature. However, it doesn't mention rate limits, authentication needs, or potential side effects, leaving some behavioral aspects unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately front-loaded with the core purpose, but contains some redundancy (repeating the library list and emphasizing mandatory usage multiple times). The bulleted usage guidelines are well-structured but could be more concise. Overall, it's comprehensive but could benefit from tighter editing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, no annotations, no output schema), the description provides substantial context about when and how to use it, its scope, and relationship with sibling tools. However, it doesn't describe what the tool returns (format, structure, or content), which is a significant gap since there's no output schema to compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3. The description adds some context by mentioning 'supports subtasks iterative queries' which relates to the 'subTasks' parameter, and references 'extract_antv_topic' for parameter extraction, but doesn't provide significant additional parameter semantics beyond what's already documented in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('fetches relevant documentation, code examples, and best practices') and resources ('from official AntV resources'). It explicitly distinguishes from its sibling tool 'extract_antv_topic' by mentioning it as a source for parameters, establishing a clear functional relationship.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit, comprehensive usage guidelines with a mandatory directive ('Must be called for ANY AntV-related query') and detailed when-to-use scenarios across five categories (implementation, debugging, learning, complex tasks, simple modifications). It clearly distinguishes from alternatives by making this the required tool for all AntV contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.0
    • First observedextract_antv_topic
    • First observedquery_antv_document

TDQS

A4.1/5.0
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
ResponsivenessResponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/antvis/mcp-server-antv'

If you have feedback or need assistance with the MCP directory API, please join our Discord server