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.
Install VisualTorch
Built from the published package, never by AI.
claude mcp add visualtorch -- uvx visualtorchRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"visualtorch": {
"args": [
"visualtorch"
],
"command": "uvx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"visualtorch": {
"args": [
"visualtorch"
],
"command": "uvx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"visualtorch": {
"args": [
"visualtorch"
],
"command": "uvx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add visualtorch -- uvx visualtorch{
"mcpServers": {
"visualtorch": {
"args": [
"visualtorch"
],
"command": "uvx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add visualtorch uvx visualtorchGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
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
ANo 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 →Appllama gives AI assistants research on top-grossing mobile apps, plus a build bar for native-feeling Expo and React Native screens. It suits developers building mobile apps with AI assistants.
Creates, edits and exports editable designs for AI assistants through the CoDesign MCP server, built on IMG.LY's CE.SDK design engine. It suits social teams, agencies and designers who need posters, social posts, videos and print layouts.
Pascal 3D Editor lets AI agents inspect, edit, validate, and save editable 3D building scenes through an MCP server. It is aimed at architecture, engineering, construction, and operations teams. Local use needs no Pascal account.
Agent-Native Design is the Design agent in Agent-Native, an open-source TypeScript framework. It generates and refines interactive designs with agent help. The same actions serve both the agent and the UI.
Draws and edits draw.io diagrams on a live browser canvas for AI agents such as Claude Code, Cursor and VS Code. It suits people who want to draw diagrams with AI and keep editing them by hand.
Framelink MCP for Figma gives coding assistants access to your Figma files. It supplies design data so the assistant can implement designs in any framework, mainly for use with Cursor.
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.
