Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

VisualTorch

MCP server by willyfh Community

Renders PyTorch model architectures as flow, graph, or LeNet-style diagrams and animated GIF reveals. Its optional stdio MCP server is for trusted PyTorch model source and suits researchers and developers.

  • Score 83
  • 355 stars
  • MIT
  • Updated

Install VisualTorch

Built from the published package, never by AI.

claude mcp add visualtorch -- uvx visualtorch

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install VisualTorch in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the visualtorch block.

About

VisualTorch helps visualize Torch-based neural network architectures. It supports flow-style, graph-style, and LeNet-style diagrams for PyTorch Sequential and Custom models. Its optional MCP server generates static PNG diagrams and animated GIF reveals from PyTorch model source, covering all three styles.

The diagram is built by tracing a real forward pass, so models with data-dependent control flow only show the branch the dummy input took. The MCP server adds capability discovery, structured output metadata, documentation resources, and subprocess timeouts. Install it with pip install "visualtorch[mcp]". It is aimed at researchers and developers who want architecture diagrams, is MIT licensed, and has been used in published research.

Written from the project's README and checked against it.

Tools it gives your assistant

  • Static PNG diagramsGenerates static PNG architecture diagrams from PyTorch model source.
  • Animated GIF revealsCreates animated GIFs that reveal the model one layer or column at a time.
  • Three canonical stylesSupports graph, flow, and lenet styles for the rendered diagrams.
  • Capability discoveryLets the assistant discover what the server can do before generating output.
  • Structured output metadataReturns structured metadata along with generated diagram output.
  • Documentation resourcesExposes documentation resources through the MCP server.
  • Subprocess timeoutsApplies timeouts to subprocess runs when rendering diagrams.

What you need

  • Python with pip
  • PyTorch model source
  • pip install "visualtorch[mcp]"

Try asking

  • Make a flow-style PNG diagram of this PyTorch model source.
  • Create an animated GIF reveal of my model in lenet style.
  • List the capabilities of the VisualTorch server before generating a diagram.

Good to know

  • Traces a real forward pass, so data-dependent branches show only the path taken by the dummy input.
  • Multi-output layers have node sizes based only on their first output tensor.
  • Intended for trusted model code only, per the trusted-code security boundary.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to VisualTorch

All alternatives →

Compare with Appllama, codesign or Pascal 3D Editor

VisualTorch: common questions

What diagram styles does VisualTorch support?

It supports graph, flow, and lenet styles for PyTorch Sequential and Custom models, according to the README.

Is it safe to run on any model code?

The MCP integration describes a trusted-code security boundary, so the source should be trusted model code.

Does it require a specific AI client?

No. The README says it is a client-neutral stdio MCP server and no client-specific plugin or extension is required.

How do I install VisualTorch?

In Claude Code run claude mcp add visualtorch -- uvx visualtorch. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is VisualTorch the official server?

VisualTorch is a community project by willyfh, not verified by a company domain.

Is VisualTorch free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is VisualTorch safe to use?

It scores 83 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to VisualTorch?

Similar MCP servers: Appllama, codesign, Pascal 3D Editor, Agent-Native Design.

Does VisualTorch work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

VisualTorch Install

Add to stack

Loading.