Skip to main content
Glama

viznoir

VTK is all you need. Cinema-quality science visualization for AI agents.

CI PyPI Python License: MIT Mentioned in Awesome VTK

Science Storytelling

One prompt → physics analysis → cinematic renders → LaTeX equations → publication-ready story.

What it does

An MCP server that gives AI agents full access to VTK's rendering pipeline — no ParaView GUI, no Jupyter notebooks, no display server. Your agent reads simulation data, applies filters, renders cinema-quality images, and exports animations, all headless.

Works with: Claude Code · Cursor · Windsurf · Gemini CLI · any MCP client

Related MCP server: HoloViz MCP Server

Quick Start

1. Install

pip install viznoir

# With optional extras
pip install "viznoir[mesh]"       # meshio + trimesh (50+ formats)
pip install "viznoir[composite]"  # Pillow + matplotlib (split_animate)
pip install "viznoir[all]"        # everything

Requires Python ≥3.10. VTK wheel auto-installed (EGL headless rendering supported).

2. Verify

mcp-server-viznoir --help    # server entry point
python -c "import viznoir; print(viznoir.__version__)"

3. Use with an MCP client

Add to your MCP client config (claude_desktop_config.json, ~/.cursor/mcp.json, etc.):

{
  "mcpServers": {
    "viznoir": {
      "command": "mcp-server-viznoir",
      "env": {
        "VIZNOIR_DATA_DIR": "/path/to/your/simulation/data",
        "VIZNOIR_OUTPUT_DIR": "/path/to/output"
      }
    }
  }
}

Then ask your AI agent:

"Open cavity.foam, render the pressure field with cinematic lighting, then create a physics decomposition story."

4. Or use as a Python library (advanced)

All tool implementations are importable as async functions. You provide a VTKRunner and await the result:

import asyncio
from viznoir.core.runner import VTKRunner
from viznoir.tools.inspect import inspect_data_impl
from viznoir.tools.render import render_impl

async def main():
    runner = VTKRunner()

    meta = await inspect_data_impl(file_path="cavity.foam", runner=runner)
    print(meta["fields"], meta["timesteps"])

    result = await render_impl(
        file_path="cavity.foam",
        field_name="p",
        runner=runner,
        colormap="Cool to Warm",
        camera="isometric",
        width=1920, height=1080,
        output_filename="pressure.png",
    )
    print(result.file_path)

asyncio.run(main())

See docs for the full tool reference.

Capabilities

Category

Tools

Rendering

render · cinematic_render · batch_render · volume_render

Filters

slice · contour · clip · streamlines · pv_isosurface

Analysis

inspect_data · inspect_physics · extract_stats · analyze_data

Probing

plot_over_line · integrate_surface · probe_timeseries

Animation

animate · split_animate

Comparison

compare · compose_assets

Export

preview_3d · execute_pipeline

22 tools · 12 resources · 4 prompts · 50+ file formats (OpenFOAM, VTK, CGNS, Exodus, STL, glTF, …)

Showcase — 10 Domains, One Pipeline

Every frame below is a single MCP tool call. No GUI, no post-processing, no ParaView. Annotations are rendered inside the 3D scene via VTK-native text actors and leader lines — no Photoshop, no matplotlib overlay.

Medical

CFD

Thermal

Geoscience

Automotive

Medical CT skull volume

CFD Combustion streamlines

Thermal Heatsink gradient

Geoscience Seismic wavefield

Automotive DrivAerML · 8.8M cells

Molecular

Vascular

Planetary

Structural

Volume

Molecular H₂O electron density

Vascular Cerebral aneurysm MRA

Planetary Bennu · 196K triangles

Structural Cantilever FEA stress

Volume Thermal threshold

Physics-Aware Animations

Seven presets convert raw simulation data into publication-ready motion — each binds a rendering primitive to a physical phenomenon.

Preset

Physics

Rendering

streamline_growth

Lagrangian advection

Particle path-line extension over time

clip_sweep

Pressure gradient cross-section

Moving clip plane

layer_reveal

CT density classification

Progressive isosurface stacking

iso_sweep

Orbital topology

Isovalue sweep with camera orbit

warp_oscillation

Structural mode shape

Warp-by-vector harmonic displacement

light_orbit

Oblique illumination

Rotating key light for material reveal

threshold_reveal

Feature hierarchy

Threshold peeling from outside → in

Story Composition (compose_assets)

Cavity Story

Inspect → render → annotate → compose → narrate. One prompt produces a 4-panel physics decomposition with LaTeX-rendered governing equations.

Layouts: story (vertical narrative) · grid (N×M comparison) · slides (16:9 keynote) · video (MP4 with transitions)

Full interactive gallery: https://kimimgo.github.io/viznoir/#showcase

Architecture

  prompt                    "Render pressure from cavity.foam"
    │
  MCP Server                22 tools · 12 resources · 4 prompts
    │
  VTK Engine                readers → filters → renderer → camera
    │                       EGL/OSMesa headless · cinematic lighting
  Physics Layer             topology analysis · context parsing
    │                       vortex detection · stagnation points
  Animation                 7 physics presets · easing · timeline
    │                       transitions · compositor · video export
  Output                    PNG · WebP · MP4 · GLTF · LaTeX

Numbers

22 MCP tools

24 VTK filters

10 domains

19 native file formats

6/6 VTK data types

50+ formats via meshio

Documentation

Homepage: kimimgo.github.io/viznoir

Developer docs: kimimgo.github.io/viznoir/docs — full tool reference, domain gallery, architecture guide

License

MIT

Available Tools

23 tools
analyze_dataA

[DEPRECATED — use inspect_physics instead] Analyze VTK/simulation data.

This tool is deprecated. Use inspect_physics for structured physics data extraction with vortex detection, critical points, and solver metadata.

Inputs: file_path (required), focus, domain. Returns: object

animateA

Create an animation from time series data or camera orbit.

Time mapping (timesteps mode): speed_factor=1.0: real-time (physics 1s = video 1s) speed_factor=5.0: 5x fast-forward speed_factor=0.2: 5x slow-motion (physics 1s = video 5s)

For VTK file series (e.g., PartFluid_0000.vtk through PartFluid_0100.vtk), use 'files' with an explicit list or 'file_pattern' with a glob pattern.

Inputs: file_path (required), field_name (required), mode, colormap, +12 more. Returns: object

auto_postprocessA

Autonomous post-processing: inspect → visualize → evaluate → refine.

Analyzes the file, detects the simulation domain (CFD/FEA/SPH), and produces 3-5 visualizations automatically. With sampling-capable clients, evaluates results and refines parameters iteratively.

Inputs: file_path (required), goal, max_iterations.

batch_renderA

Render multiple fields from the same dataset in one call.

Returns a dict with images list, each containing field name and base64 PNG. Useful for comparing pressure, velocity, temperature, etc. side-by-side.

Inputs: file_path (required), fields (required), colormap, camera, +5 more. Returns: object

cinematic_renderA

Cinematic-quality rendering with auto-framing, 3-point lighting, SSAO, and PBR.

Produces publication/presentation-quality images with:

  • PCA-based auto-camera: analyzes object shape and picks optimal viewing angle

  • 3-point cinematic lighting (key + fill + rim)

  • SSAO (Screen-Space Ambient Occlusion) for contact shadows

  • FXAA anti-aliasing

  • Gradient backgrounds

  • PBR material support (metallic/roughness)

Quality presets:

  • draft: 960x540, no post-processing (fast preview)

  • standard: 1920x1080, SSAO + FXAA

  • cinematic: 1920x1080, all effects + ground plane

  • ultra: 3840x2160, all effects + ground plane

  • publication: 2400x1800, clean lighting, white background

Inputs: file_path (required), field_name, colormap, quality, +15 more.

clipC

Create a clipped visualization.

Inputs: file_path (required), field_name (required), origin, normal, +7 more.

compareA

Compare two simulation results side-by-side or as a difference map.

Renders both datasets with identical camera, colormap, and scalar range for direct visual comparison. Essential for design comparison, mesh convergence studies, and solver validation.

Modes:

  • side_by_side: Two panels with shared colorbar and consistent framing

  • diff: Absolute field difference map (|A - B|) rendered on dataset A's mesh

Inputs: file_a (required), file_b (required), field_name, mode, +10 more.

compose_assetsC

Compose multiple assets into a deliverable format.

Inputs: assets (required), layout, title, width, +3 more.

contourC

Create an iso-surface (contour) visualization.

Inputs: file_path (required), field_name (required), isovalues (required), colormap, +5 more.

execute_pipelineA

Execute a custom pipeline definition (advanced).

Accepts a full PipelineDefinition JSON for maximum flexibility. This is the primary interface for CFD/FEA/CAE specialist agents.

The pipeline JSON structure: { "source": {"file": "/data/file.foam", "timestep": "latest"}, "pipeline": [ {"filter": "Slice", "params": {"origin": [0,0,0], "normal": [1,0,0]}}, {"filter": "Calculator", "params": {"expression": "mag(U)", "result_name": "Umag"}} ], "output": { "type": "image", "render": {"field": "Umag", "colormap": "Viridis"} } }

Available filters: Slice, Clip, Contour, Threshold, StreamTracer, Calculator, Gradient, IntegrateVariables, GenerateSurfaceNormals, ExtractBlock, ExtractSurface, WarpByVector, WarpByScalar, CellDatatoPointData, PlotOverLine, Glyph, ProgrammableFilter, Decimate, Triangulate.

Output types: image, data, csv, animation, export, multi.

Inputs: pipeline (required).

extract_statsB

Extract statistical summary (min/max/mean/std) for fields.

Inputs: file_path (required), fields (required), timestep, blocks. Returns: object

inspect_dataA

Inspect a simulation file and return metadata.

Returns bounds, point/cell arrays with ranges, timestep info, and multiblock structure. Use this first to understand what data is available before rendering or extracting.

Inputs: file_path (required). Returns: object

inspect_physicsA

Extract structured physics data for AI storytelling.

Analyzes simulation data to extract:

  • L2 FieldTopology: vortex detection (Q-criterion), critical points, centerline profiles, gradient statistics per field

  • L3 CaseContext: boundary conditions, transport properties, solver info, mesh quality, derived quantities (Re, Ma, etc.)

Returns structured JSON for LLM to build physics narratives. Replaces analyze_data with quantitative topology data instead of hardcoded heuristics.

Inputs: file_path (required), case_dir, fields, probe_lines, +1 more. Returns: object

integrate_surfaceA

Integrate a field over a surface to compute forces, areas, or fluxes.

Inputs: file_path (required), field_name (required), boundary, timestep. Returns: object

plot_over_lineB

Sample field values along a line between two points.

Returns coordinate arrays and field values for plotting.

Inputs: file_path (required), field_name (required), point1 (required), point2 (required), +2 more. Returns: object

preview_3dA

Export dataset to glTF/glB for interactive 3D viewing in a browser.

Returns the exported file path and a viewer URL hint. Requires VTK >= 9.4 with vtkGLTFExporter support.

Inputs: file_path (required), field_name, timestep, output_filename. Returns: object

probe_timeseriesA

Sample a field value at a fixed point across timesteps.

Useful for monitoring pressure/velocity at a sensor location over time. Returns dict with times and values arrays.

Inputs: file_path (required), field_name (required), point (required), files, +2 more. Returns: object

pv_isosurfaceA

Run DualSPHysics IsoSurface to generate VTK surface mesh files.

Converts bi4 particle data into VTK surface meshes (iso-surfaces). The output files can then be used with animate() or render() via SourceDef(files=[...]) for visualization.

Inputs: bi4_dir (required), output_dir (required), vars, only_type, +1 more. Returns: object

renderB

Render a field visualization and return a PNG screenshot.

Inputs: file_path (required), field_name (required), association, colormap, +8 more.

sliceC

Create a slice (cut plane) visualization.

Inputs: file_path (required), field_name (required), origin, normal, +6 more.

split_animateA

Create a split-pane synchronized animation with multiple views.

Render 2-4 panes in a grid layout, combining 3D visualizations with time-series graphs. All panes are timestep-synchronized and output as a single GIF or PNG sequence.

Inputs: file_path (required), panes (required), layout, fps, +4 more.

streamlinesB

Create a streamline visualization for vector fields.

Inputs: file_path (required), vector_field (required), seed_point1, seed_point2, +8 more.

volume_renderC

Volume render 3D data (CT, MRI, CFD fields) with transfer function presets.

Presets: generic, ct_bone, ct_tissue, mri_brain, thermal, isosurface_like

Inputs: file_path (required), field_name, transfer_preset, colormap, +8 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 23 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose. Overlaps like multiple render tools are differentiated by quality presets and batch capabilities, and inspect_data vs inspect_physics serve different metadata levels. Deprecated tools are clearly marked.

    Naming Consistency2/5

    Naming is inconsistent: some tools are single verbs (animate, render, slice), others are verb_noun (inspect_data, batch_render), and some are nouns (contour, streamlines). The mix of styles and a few odd names like pv_isosurface reduce coherence.

    Tool Count3/5

    With 23 tools, the set is on the high side but still reasonable for a comprehensive simulation visualization server. The tools cover a wide range of operations without feeling excessive, but could be trimmed slightly.

    Completeness4/5

    The tool set offers strong coverage for simulation data analysis and visualization: inspection, multiple render styles, animations, statistics, and pipeline execution. Minor gaps like direct data export to common formats or advanced filtering are present but not critical.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Integrates multimodal large language models with ParaView to enable the creation and manipulation of scientific visualizations using natural language and visual inputs. It features visual feedback capabilities for iterative refinement, making advanced visualization workflows accessible through intelligent automation.
      72
      BSD 3-Clause
    • A
      license
      Not graded
      quality
      A
      maintenance
      Automates OpenFOAM CFD simulations via MCP, enabling AI agents to mesh, run, and post-process cases from natural language prompts without any API keys.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Drive VMD from any LLM — render GROMACS/LAMMPS trajectories and analyze clathrate-hydrate cages through the Model Context Protocol.
      17
      1
      MIT