ChartQuery

com.chartquery由 chartquery.com 發布官方發布者v0.1.0更新於 Nov 7, 2026

Generate chart images, diagrams, barcodes, QR codes and thermal labels on demand. PNG, SVG or PDF o…

已驗證Streamable HTTP可網頁執行開發者工具媒體與設計

概覽

AI 產生的概覽

ChartQuery MCP 伺服器,讓助理透過 ChartQuery API 產生圖表、示意圖、條碼、QR 碼與熱感標籤圖片。

可以做什麼
  • 算繪 Chart.js 圖表、Mermaid/D2 示意圖、條碼、樣式化 QR 碼與熱感標籤預覽,輸出 PNG、SVG 或 PDF
  • 用 AI 工具依自然語言描述產生圖表與示意圖
  • 依 ID 重新算繪或檢視已儲存的圖表、示意圖與標籤,輸出圖片或可嵌入的 HTML 頁面
  • 將標籤編譯為印表機指令,並轉換、解析或驗證 ZPL、EPL、TSC 等指令語言
  • 查詢帳戶點數餘額與用量,以及引擎健康統計
適用情境
適合助理需要產出視覺內容(圖表、示意圖、QR 碼、條碼或物流/商品標籤)而本機沒有算繪函式庫時,或需要處理熱感印表機指令語言時使用。
執行需求
需要 ChartQuery API 金鑰:託管端點透過 x-api-key 標頭傳送,本機套件則以環境變數 CHARTQUERY_API_KEY 設定。本機 npm 套件需要 Node.js 20 或更新版本;託管端點 mcp.chartquery.com 無需安裝。宣告要求 OAuth 驗證。
安裝前請注意
每次呼叫 API 都會消耗付費點數(依工具不同每次 3 至 10 點),會產生費用。API 金鑰屬於機密,應透過標頭或環境變數傳入,切勿外流。部分算繪與檢視工具為公開介面,無需金鑰。stats 工具不限定於你的帳戶範圍。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 ChartQuery,將其新增到工作區。
  2. 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.chartquery%2Fmcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。

{
  "mcpServers": {
    "chartquery": {
      "type": "http",
      "url": "https://mcp.chartquery.com/"
    }
  }
}

README

ChartQuery MCP Server

Official Model Context Protocol server for the ChartQuery chart and QR code API.

Generate chart images, diagrams, barcodes, QR codes and thermal labels on demand. PNG, SVG or PDF output.

It lets Claude, Cursor, VS Code, Windsurf and any MCP client call the API as tools. Runs over stdio (local) or Streamable HTTP (self-hosted).

Requirements

  • Node.js 20 or newer
  • a ChartQuery API key — sign up, then copy it from the dashboard

Hosted server (recommended)

ChartQuery runs this server for you at https://mcp.chartquery.com/ (Streamable HTTP). Send your API key in the x-api-key header; nothing to install.

sh
claude mcp add --transport http chartquery https://mcp.chartquery.com/ --header "x-api-key: YOUR_API_KEY"
json
{  "mcpServers": {    "chartquery": {      "url": "https://mcp.chartquery.com/",      "headers": {        "x-api-key": "YOUR_API_KEY"      }    }  }}

The hosted server and this package expose the same API; run the package locally when you want stdio, your own network egress, or to self-host it.

Run it locally

Claude Code

sh
claude mcp add chartquery --env CHARTQUERY_API_KEY=YOUR_API_KEY -- npx -y @chartquery/mcp

Claude Desktop, Cursor, Windsurf and other clients

Add the server to the client's MCP configuration (claude_desktop_config.json, .cursor/mcp.json…):

json
{  "mcpServers": {    "chartquery": {      "command": "npx",      "args": ["-y", "@chartquery/mcp"],      "env": {        "CHARTQUERY_API_KEY": "YOUR_API_KEY"      }    }  }}

VS Code

json
{  "servers": {    "chartquery": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@chartquery/mcp"],      "env": {        "CHARTQUERY_API_KEY": "${input:chartquery-api-key}"      }    }  },  "inputs": [    {      "type": "promptString",      "id": "chartquery-api-key",      "description": "ChartQuery API key",      "password": true    }  ]}

Claude Desktop extension

Download the .mcpb bundle from the releases page and open it; Claude Desktop asks for your API key.

Docker

sh
docker build -t chartquery-mcp .docker run -i --rm -e CHARTQUERY_API_KEY=YOUR_API_KEY chartquery-mcp

Tools

ToolDescription
barcodeGenerate a barcode image via GET. Output: SVG (default) or PNG. Supports 25+ formats: EAN-13, Code 128, ITF-14, GS1-128, postal codes and more.
chartRender a Chart.js image via GET. Pass the full chart object as URL-encoded JSON in query. Prefer format png for ChatGPT. POST sends the same object as a JSON body, not query.
chart_aiDescribe a chart in plain English via GET and get a rendered image back. Powered by AI.
chart_renderRender a previously saved chart by ID. Public, no API key required. Supports URL overrides for templates (?data1=, ?labels=, ?title=…).
chart_viewView a previously saved chart as an interactive HTML page. Public, no API key required. Iframe-embeddable.
diagramRender a diagram via GET. Use type (mermaid, d2, …), query (source code), and format=png for ChatGPT. POST uses diagram_type and diagram_source instead.
diagram_aiDescribe a diagram in plain English via GET and get a rendered image back. Powered by AI.
diagram_renderRender a previously saved diagram by ID. Public, no API key required. Supports ?format= and ?query= overrides.
diagram_viewView a previously saved diagram as an HTML page. Public, no API key required. Iframe-embeddable with inline SVG rendering.
labelPreview a thermal label via GET. Pass the same label object as a URL-encoded JSON string in query. Inside that JSON, text items use content and size (1-10), not text or fontSize. Prefer format=png fo…
label_compileCompile a label to printer commands (tsc, zpl, epl, …). POST width, language, and elements. Text uses content and size (1-10), not text or fontSize. No barcode element. Example: {"width":40,"height":…
label_convertConvert printer commands from one language to another. POST source, from, and to. from is the source language (tsc, zpl, epl, …). to is the target (tsc, zpl, escpos, …).
label_parseParse printer commands into structured elements. POST source and language (tsc, zpl, epl, …).
label_renderRender a previously saved label by ID. Public, no API key required. Supports ?format= override.
label_validateValidate printer commands. POST source (the raw commands) and language (tsc, zpl, epl, …).
label_viewView a previously saved label as an HTML page. Public, no API key required. Iframe-embeddable with inline SVG rendering.
qrcodeGenerate a styled QR code via GET. Output: SVG (default) or PNG. Supports dot styles, gradients, custom corners and all QR versions.
statsInfrastructure health for an engine or endpoint over the last hour. Not scoped to your account or tenant. Enabled per account: HTTP 403 means contact support to activate it.
usageReturn this account's Chartquery usage and credit balance. No body. Requires an API key.

Every tool that calls the API consumes credits. JSON results are returned as text; images are returned inline and other files (PDF…) as embedded resources, up to 4 MB.

Streamable HTTP

sh
npx @chartquery/mcp --http --port 3000

The endpoint is POST /mcp (stateless, JSON responses). Each client sends its own key in the x-api-key header (or Authorization: Bearer <key>); the server never uses a key of its own. It binds to 127.0.0.1 by default and rejects browser origins unless you allow them — put it behind TLS before exposing it.

createHttpHandler() is exported for Fetch-compatible runtimes (Cloudflare Workers, Deno, Bun):

ts
import { createHttpHandler } from "@chartquery/mcp";
export default { fetch: createHttpHandler({ allowedOrigins: [] }) };

Security

  • The API key is read from CHARTQUERY_API_KEY (stdio) or the request headers (HTTP) and removed from error messages.
  • Content fetched from websites is untrusted: the server instructions tell the model to treat it as data, not instructions.
  • See SECURITY.md to report a vulnerability.

Development

sh
npm installnpm testnpm run buildnpx @modelcontextprotocol/inspector node dist/stdio.js

Built on the SDK

The server uses the official Node.js SDK (@chartquery/sdk).

All ChartQuery SDKs

SDKPackageInstall
Node.js@chartquery/sdknpm install @chartquery/sdk
Pythonchartquerypip install chartquery
Gochartquery-gogo get github.com/chartquery/chartquery-go
.NETChartQuerydotnet add package ChartQuery
Rubychartquerygem install chartquery
PHPchartquery/sdkcomposer require chartquery/sdk
Javachartquery-javabuild from source, see its README
CLI@chartquery/clinpm install -g @chartquery/cli
MCP server@chartquery/mcpnpx -y @chartquery/mcp

License

MIT — see LICENSE.

來源:README.md,提交 ff22f49

工具

19

barcode

Barcode

Barcode. Generate a barcode image via GET. Output: SVG (default) or PNG. Supports 25+ formats: EAN-13, Code 128, ITF-14, GS1-128, postal codes and more. Credit cost: 3 credits per call.

輸入參數data必填desctypeunitcolorsharetitlefieldsformatheightmarginbar_gap另有 14 個

chart

Chart

Chart. Render a Chart.js image via GET. Pass the full chart object as URL-encoded JSON in query. Prefer format png for ChatGPT. POST sends the same object as a JSON body, not query. Credit cost: 5 credits per call.

輸入參數query必填sharefieldsversion

chart_ai

Chart AI

Chart AI. Describe a chart in plain English via GET and get a rendered image back. Powered by AI. Credit cost: 10 credits per call.

輸入參數sharetitlewidthfieldsformatheightlegendprompt必填raw_datasubtitlebackgrounddevice_pixel_ratio

chart_render

Chart Render

Chart Render. Render a previously saved chart by ID. Public, no API key required. Supports URL overrides for templates (?data1=, ?labels=, ?title=…).

輸入參數id必填data1titlewidthfieldsformatheightlabels

chart_view

Chart View

Chart View. View a previously saved chart as an interactive HTML page. Public, no API key required. Iframe-embeddable.

輸入參數id必填sharefields

diagram

Diagram

Diagram. Render a diagram via GET. Use type (mermaid, d2, …), query (source code), and format=png for ChatGPT. POST uses diagram_type and diagram_source instead. Credit cost: 5 credits per call.

輸入參數type必填query必填sharefieldsformat

diagram_ai

Diagram AI

Diagram AI. Describe a diagram in plain English via GET and get a rendered image back. Powered by AI. Credit cost: 10 credits per call.

輸入參數sharefieldsprompt必填diagram_typeoutput_format

diagram_render

Diagram Render

Diagram Render. Render a previously saved diagram by ID. Public, no API key required. Supports ?format= and ?query= overrides.

輸入參數id必填querysharefieldsformat

diagram_view

Diagram View

Diagram View. View a previously saved diagram as an HTML page. Public, no API key required. Iframe-embeddable with inline SVG rendering.

輸入參數id必填sharefields

label

Label Preview

Label Preview. Preview a thermal label via GET. Pass the same label object as a URL-encoded JSON string in query. Inside that JSON, text items use content and size (1-10), not text or fontSize. Prefer format=png for ChatGPT. Credit cost: 3 credits per call.

輸入參數query必填sharefieldsformat

label_compile

Label Compile

Label Compile. Compile a label to printer commands (tsc, zpl, epl, …). POST width, language, and elements. Text uses content and size (1-10), not text or fontSize. No barcode element. Example: {"width":40,"height":30,"unit":"mm","language":"zpl","element… Credit cost: 3 credits per call.

輸入參數dpigapunitspeedwidth必填copiesfieldsheightdensityprinterelements必填language必填另有 1 個

label_convert

Label Convert

Label Convert. Convert printer commands from one language to another. POST source, from, and to. from is the source language (tsc, zpl, epl, …). to is the target (tsc, zpl, escpos, …). Credit cost: 5 credits per call.

輸入參數to必填dpifrom必填speedcopiesfieldssource必填density

label_parse

Label Parse

Label Parse. Parse printer commands into structured elements. POST source and language (tsc, zpl, epl, …). Credit cost: 1 credit per call.

輸入參數fieldssource必填language必填

label_render

Label Render

Label Render. Render a previously saved label by ID. Public, no API key required. Supports ?format= override.

輸入參數id必填fieldsformat

label_validate

Label Validate

Label Validate. Validate printer commands. POST source (the raw commands) and language (tsc, zpl, epl, …). Credit cost: 1 credit per call.

輸入參數fieldssource必填language必填

label_view

Label View

Label View. View a previously saved label as an HTML page. Public, no API key required. Iframe-embeddable with inline SVG rendering.

輸入參數id必填fields

qrcode

QR Code

QR Code. Generate a styled QR code via GET. Output: SVG (default) or PNG. Supports dot styles, gradients, custom corners and all QR versions. Credit cost: 3 credits per call.

輸入參數data必填descmaskmodesizeunitcolorshapesharetitlefieldsformat另有 8 個

stats

Stats

Stats. Infrastructure health for an engine or endpoint over the last hour. Not scoped to your account or tenant. Enabled per account: HTTP 403 means contact support to activate it.

輸入參數pathengine

usage

Usage

Usage. Return this account's Chartquery usage and credit balance. No body. Requires an API key.

無需輸入參數。

版本歷史

1
  1. v0.1.0最新Nov 7, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分