graphviz-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Graphviz MCP
An MCP server that gives AI assistants access to the full Graphviz tool suite, including layout engines (dot, neato, fdp, etc.) and graph-processing utilities (ccomps, tred, gvpack, etc.).
Graphviz-MCP ships as a single Docker image, containing a complete, stand-alone instance of Graphviz, so that nothing needs to be installed on the host. A given graphviz-mcp image always has the same tools, engines, output formats and fonts, which keeps capabilities predictable and rendered output reproducible from one machine to the next.
Published versions of the Docker image are available on the GitHub Container Registry at ghcr.io/rodw/graphviz-mcp.
Graphviz-MCP can also be readily built and run directly from a clone of this git repository.
Overview
Each Graphviz binary is exposed as an MCP tool with the same name, with parameters named after the corresponding command-line flags. If you already know Graphviz, you know the API.
Calls are stateless. The graph goes in as a string and the result comes back as MCP content: text for formats like SVG and DOT, image content for PNG, JPEG, GIF and WebP, and an embedded blob for everything else (PDF, for example). The server never reads or writes files on a caller's behalf.
The server supports both Streamable HTTP and stdio transport methods. The HTTP mode also serves a small, browseable web UI that includes an interactive form-based interface to all MCP tools and resources, status and health monitoring, and additional documentation.
Since the caller is often a model processing data it didn't write, graphviz-mcp treats all input as untrusted and enforces a strict access policy by default. However, the server is NOT hardened for deployment on the public internet. It designed to run on single machine or private network, used by a trusted operator. For more detail, see the Configuration and Security sections below.
Related MCP server: genpark-graph-dijkstra-astar-pathfinder-skill
Getting started
Launching the server
From a published docker image
To launch the server as an HTTP service (supporting the Streamable HTTP transport method), you can simply fetch the rodw/graphviz-mcp image from ghcr.io:
docker run \
--rm -p 127.0.0.1:8000:8000 \
--read-only --cap-drop=ALL \
--tmpfs /tmp:rw,noexec,nosuid,size=256m \
--security-opt no-new-privileges \
--pids-limit 512 --memory 5g --memory-swap 5g \
ghcr.io/rodw/graphviz-mcp:latestThis yields:
From source
To build and run the Docker image from scratch instead, first clone the repo, then run make run-http:
git clone git@github.com:rodw/graphviz-mcp.git
cd graphviz-mcp
make run-http # to launch in the foreground
# or `make start` to launch in the backgroundThese targets apply the same hardening and container limits as the docker run commands above. Tune the limits with SERVICE_MEMORY, SERVICE_MEMORY_SWAP and SERVICE_PIDS_LIMIT (for example make start SERVICE_MEMORY=8g).
See make help for a list of additional build targets.
See contributing for more information about working with the raw source.
Connect a client
HTTP transport
Claude Code, over HTTP:
claude mcp add --transport http graphviz http://127.0.0.1:8000/mcpAny other client that supports Streamable HTTP only needs the URL:
{ "mcpServers": { "graphviz": { "url": "http://127.0.0.1:8000/mcp" } } }To browse the service using modelcontextprotocol.io's Node.js-based TUI inspector, you can use:
npx @modelcontextprotocol/inspector --tui http://127.0.0.1:8000/mcpstdio transport
Claude Code, over stdio, which needs no open port at all:
claude mcp add graphviz -- docker run \
-i --rm --network=none \
--read-only --cap-drop=ALL \
--tmpfs /tmp:rw,noexec,nosuid,size=256m \
--security-opt no-new-privileges \
--pids-limit 512 --memory 5g --memory-swap 5g \
ghcr.io/rodw/graphviz-mcp:latest --stdioClaude Desktop (stdio) in claude_desktop_config.json:
{
"mcpServers": {
"graphviz": {
"command": "docker",
"args": ["run", "-i", "--rm", "--network=none",
"--read-only", "--cap-drop=ALL",
"--tmpfs", "/tmp:rw,noexec,nosuid,size=256m",
"--security-opt", "no-new-privileges",
"--pids-limit=512", "--memory=5g", "--memory-swap=5g",
"ghcr.io/rodw/graphviz-mcp:latest", "--stdio"]
}
}
}Usage
To render a graph as PNG image using dot, e.g., the equivalent of:
echo 'digraph { a -> b -> c }' | dot -Tpng -Grankdir=LRAn MCP client would submit:
{
"name": "dot",
"arguments": {
"input": "digraph { a -> b -> c }",
"T": "png",
"G": { "rankdir": "LR" }
}
}A few details worth knowing:
Ttakesformat,format:rendererorformat:renderer:formatter. Valid values are discovered from the running Graphviz at startup, andget_capabilitieslists them.Graphviz warnings come back in an extra
[stderr]block.Tools that emit several graphs, such as
ccomps -xandbcomps -x, return one string per graph.validate_dotchecks syntax and reports line numbers, which is handy before a long render.
Tools
Group | Tools |
Layout and rendering |
|
Processing and analysis |
|
Generators and converters |
|
MCP extras |
|
See docs/mcp-service.md for the full list of tools, resources and prompts the server offers.
Web UI
The HTTP server also serves a small Web UI at /ui. It has a plain HTML form for every tool, the resources as pages, and the capabilities and configuration the server is running with. See docs/web-ui.md for a tour of the pages.

Configuration
Graphviz-mcp can be configured through environment variables passed to the server at launch. See docs/configuration.md for details.
Security
Graphviz-MCP treats all input as untrusted and enforces a strict access policy by default: The service runs as a non-root user on a read-only filesystem. Callers cannot read, write or execute arbitrary resources. Inputs are validated and bounds-checked, and multiple layers of security limit the time, memory, output size, and concurrency of requests to protect service availability and prevent run-away resource consumption, whether accidental or malicious.
However Graphviz-MCP is NOT hardened for deployment on the public internet. It has no TLS or authentication support, and only the most rudimentary rate-limiting capabilities. It is designed to be run on a single machine or private network, used by a trusted operator.
See SECURITY.md and docs/attribute-security-policy.md for more information.
Contributing
Issues and pull requests are welcome. CONTRIBUTING.md covers the development setup, running the tests, building the image yourself, and the release process.
Documentation
docs/mcp-service.md: the tools, resources and prompts the server offers
docs/graphviz-tools.md: every tool with all of its parameters
docs/web-ui.md: the Web UI
docs/configuration.md: the
GVMCP_*environment variablesdocs/attribute-security-policy.md: how to choose an attribute policy
License
Graphviz-MCP is released under an MIT license, see LICENSE.
Graphviz (EPL-1.0) and the system libraries and fonts in the image keep their own licenses, listed in THIRD_PARTY_NOTICES.md.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Render, verify, describe, and safely edit Mermaid diagrams through MCP.
Create and manage Mermaid.js flowcharts and diagrams with AI agents via MCP.
MCP tools for AI agents: render URLs to image/PDF, check link health, convert HTML/CSV/JSON.
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Related MCP Servers
AlicenseAqualityDmaintenanceGPU-accelerated graph visualization and analytics server for Large Language Models that integrates with Model Control Protocol (MCP), enabling AI assistants to visualize and analyze complex network data.1714 npm12MIT- AlicenseNot gradedqualityBmaintenanceEnables agents to compute shortest paths with Dijkstra and A*, resolve DAG dependencies, solve maximum flow, build minimum spanning trees, and rank graph centrality using JSON-RPC MCP tools.7MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables graph pathfinding and network analysis through MCP, including Dijkstra/A* shortest paths, topological dependency resolution, maximum flow, minimum spanning trees, and PageRank centrality for agent planning.MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to compute shortest paths, topological dependency order, maximum flow and minimum-cut bottlenecks, minimum spanning trees, and PageRank centrality over weighted graphs for routing and execution planning. It exposes these graph-analysis capabilities as MCP tools through a zero-dependency Python server.7MIT