Skip to main content

MCP D3 Server (Python)

A Python-based MCP (Model Context Protocol) server that provides D3.js visualization information, chart generation, and documentation resources. This is a Python port of the original Node.js MCP D3 server with STDIO support for use with uv and other Python package managers.

Features

  • D3.js Documentation Resources: Access to curated D3.js documentation and examples
  • Chart Generation Tools: Generate D3.js chart code for various chart types (bar, line, etc.)
  • AI-Powered Chart Creation: Use AI to generate custom D3 visualizations based on descriptions
  • Data Analysis: Analyze data and get visualization recommendations
  • STDIO Transport: Compatible with MCP clients using stdio transport

Installation

cd mcp-d3-server-python
uv sync

Using pip

cd mcp-d3-server-python
pip install -e .

Usage

Running as STDIO MCP Server

# Using uv
uv run mcp-d3-server

# Using pip-installed package
mcp-d3-server

Configuration for MCP Clients

Add to your MCP client configuration:

{
  "mcpServers": {
    "d3-visualization": {
      "command": "uv",
      "args": ["run", "mcp-d3-server"],
      "cwd": "/path/to/mcp-d3-server-python"
    }
  }
}

Available Resources

  • d3-docs://d3-gallery - D3.js gallery and examples
  • d3-docs://d3-indepth - In-depth D3.js guide and documentation
  • d3-docs://d3-org - Official D3.js documentation
  • d3-search://query - Search across all D3 documentation
  • d3-topic://topic[/section] - Get information about specific D3 topics

Available Tools

generate-d3-chart

Generate D3.js chart code based on chart type and data format.

Parameters:

  • chartType (string): Type of chart (bar, line, pie, etc.)
  • dataFormat (string): Description of your data format
  • features (array, optional): Additional features to include

recommend-chart

Get chart type recommendations based on your data and visualization goals.

Parameters:

  • dataDescription (string): Description of your data
  • purpose (string): What insights you want to gain

ai-generate-d3

Use AI to generate custom D3.js visualizations.

Parameters:

  • description (string): Describe the chart you want
  • dataExample (string): Example of your data structure

analyze-data

Analyze data and get visualization suggestions.

Parameters:

  • data (string): Your data in JSON or CSV format
  • goal (string): What you want to learn from the data

Development

Setup Development Environment

cd mcp-d3-server-python
uv sync --extra dev

Running Tests

uv run pytest

Code Formatting

uv run black src/
uv run ruff check src/

Type Checking

uv run mypy src/

Project Structure

mcp-d3-server-python/
├── src/
│   └── mcp_d3_server/
│       ├── __init__.py
│       ├── server.py          # Main MCP server with STDIO support
│       ├── services.py        # Service implementations
│       └── types.py           # Type definitions
├── assets/
│   └── llm-full/             # D3 documentation files
├── pyproject.toml            # Python package configuration
└── README.md

License

MIT

Metadata

Release files for mcp-d3-server 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-d3-server 1.0.2
File Size Uploaded Provenance
mcp_d3_server-1.0.2.tar.gz 563.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-d3-server 1.0.2
File Interpreter ABI Platform
mcp_d3_server-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 575.5 kB

Release files / mcp_d3_server-1.0.2.tar.gz

Download URL mcp_d3_server-1.0.2.tar.gz
Size 563.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f9681cc95bd2c574bca77307c34d348757ea5d82053464d8bd66453365ae3232
BLAKE2b-256 checksum
How to use checksums
5ae1113c1c0ca33789bb700ea953653ac19d425bb0b3ca10e611e405384d500b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.18

Release files / mcp_d3_server-1.0.2-py3-none-any.whl

Download URL mcp_d3_server-1.0.2-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d199e338be917a6288ad20e5aa860cbbf3a04bf78d0bb4e438241bb62411598c
BLAKE2b-256 checksum
How to use checksums
bf8bd7baeaa3c65cf8fa639563e3834b0449ae003628682183eec9c3d9533726
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.18

Security for mcp-d3-server 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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