Skip to main content

highchart-mcp-sdk (Python)

Async Python client for the Highcharts MCP server.

Install

pip install highchart-mcp-sdk        # (not yet published)
# from source:
pip install -e packages/sdk-python

Usage

import asyncio
from highchart_mcp_sdk import HighchartClient

async def main():
    # Spawn the server over stdio...
    async with HighchartClient.connect_stdio(command="node", args=["dist/index.js"]) as client:
        catalog = await client.list_chart_types()

        cfg = await client.create_chart(
            type="line",
            title="Sales",
            xAxisCategories=["Jan", "Feb", "Mar"],
            series=[{"name": "Revenue", "data": [10, 20, 15]}],
        )

        svg = await client.render_chart(
            {"chart": {"type": "candlestick"}, "series": [{"data": [[1, 2, 3, 1, 2]]}]},
            format="svg",
            constr="stockChart",
        )

    # ...or connect to a running HTTP server:
    # async with HighchartClient.connect_http("http://localhost:3000/mcp", api_key="...") as client:
    #     ...

asyncio.run(main())

API

  • HighchartClient.connect_stdio(command, args=None, env=None) — async context manager
  • HighchartClient.connect_http(url, api_key=None, headers=None) — async context manager
  • create_chart(**input) → dict ({"constr", "options"} or a render result)
  • render_chart(chart_options, format=None, constr=None)
  • export_chart(chart_options, format, constr=None, width=None, height=None, scale=None)
  • list_chart_types(family=None)

Tool errors raise HighchartToolError.

Tests

pip install -e "packages/sdk-python[test]"
pytest packages/sdk-python           # offline unit tests
RUN_PY_E2E=1 pytest packages/sdk-python   # end-to-end (needs a runnable server)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

highchart_mcp_sdk-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

highchart_mcp_sdk-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file highchart_mcp_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: highchart_mcp_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.11

File hashes

Hashes for highchart_mcp_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 efc51f0837cc2ee42ee51fd934f0a9e95e7889fc2f9cd9bb7fe820a6d04b01f9
MD5 f93bdf8557319e1f8d30aad7258e9446
BLAKE2b-256 500a952a227170f24c43a663b5d470e1397ff424fd4c993e6801cd7d4c626414

See more details on using hashes here.

File details

Details for the file highchart_mcp_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for highchart_mcp_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d3fea4865000ba749338ead1fba766a228b525e808e5d28be0c1a9b0e088ffe
MD5 7c9edb87e014b4a98a0e0a2e5aec941f
BLAKE2b-256 38d190773a2355777ca5db73c2004a53265f910353aa6ed1dbcb0a739942b08f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page