Get the FREE Ultimate OpenClaw Setup Guide →

mcp-d3

MCP server from iamfiscus/mcp-d3-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio iamfiscus-mcp-d3-server node dist/index.js \
  --env PORT="3000 (default; can be overridden in a .env file or environment)" \
  --env NODE_ENV="production" \
  --env MCP_ENDPOINT="http://localhost:3000/sse (MCP SSE endpoint)"

How to use

This MCP server exposes D3-related knowledge and tooling via the Model Context Protocol. It provides access to D3 documentation topics, D3 chart type information, and code-generation capabilities for typical D3 visualizations. Through the MCP client, you can request recommendations for suitable chart types given your data description and purpose, and generate concrete D3 code snippets for charts such as bar, line, area, and more. The server also supports generating documentation and examples directly from the D3 knowledge base to accelerate development and learning. To use it, connect to the MCP endpoint via an MCP client and invoke tools like recommend-chart or generate-d3-chart. A separate SSE endpoint (typically /sse) streams responses and results from the server, enabling interactive experiences in client apps.

How to install

Prerequisites:

  • Node.js 16.x or higher
  • npm (or yarn)

Installation steps:

  1. Clone the repository git clone https://github.com/iamfiscus/mcp-d3-server.git cd mcp-d3-server

  2. Install dependencies npm install

  3. Build the project npm run build

  4. Run the server npm start

Optional for development with hot reloading: npm run dev

Environment considerations:

  • You can override the listening port by setting PORT in an environment file (.env) or as an environment variable.
  • Ensure the build output exists at dist/index.js (adjust if your build outputs a different entry file).
  • Make sure any required network access or firewall rules allow connections to the MCP SSE endpoint at /sse.

Additional notes

Tips:

  • The server exposes endpoints for D3 docs (d3-docs://topic) and D3 charts info (d3-charts://chartType). Use these prefixes when constructing tool queries.
  • Tools supported include:
    • generate-d3-chart: produces D3 code for a specified chartType with optional dataFormat and features.
    • recommend-chart: suggests suitable D3 chart types based on a dataDescription and purpose.
  • If you encounter port conflicts, change PORT in the environment or .env file. Ensure the client connects to the correct SSE endpoint at /sse (as indicated in the README).
  • When building from source, ensure you have TypeScript and other build tooling in place; the build step outputs a runnable dist/index.js that the server uses.
  • For production deployments, consider setting NODE_ENV=production and enabling appropriate logging and monitoring around the MCP SSE stream.

Related MCP Servers

Sponsor this space

Reach thousands of developers