ShaderMcp 0.1.1

{
  "servers": {
    "ShaderMcp": {
      "type": "stdio",
      "command": "dnx",
      "args": ["ShaderMcp@0.1.1", "--yes"]
    }
  }
}
                    
This package contains an MCP Server. The server can be used in VS Code by copying the generated JSON to your VS Code workspace's .vscode/mcp.json settings file.
dotnet tool install --global ShaderMcp --version 0.1.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local ShaderMcp --version 0.1.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ShaderMcp&version=0.1.1
                    
nuke :add-package ShaderMcp --version 0.1.1
                    

ShaderMcp

Native MCP server and CLI for creating and testing deterministic Skia RuntimeEffect fragment shaders.

The runner does not use a browser, WebGL, Playwright, Puppeteer, HTML canvas, or a DOM rendering path. It compiles SkSL with SkiaSharp, renders offscreen to PNG, passes deterministic uniforms, supplies a known input texture, and returns structured diagnostics.

Shader Contract

Shader source defines fragmentMain:

half4 fragmentMain(float2 fragCoord, float2 uv) {
    return half4(uv.x, uv.y, 0.5, 1.0);
}

Built-ins injected by the runner:

  • uniform float2 resolution
  • uniform float time
  • uniform float frame
  • uniform float2 pointer
  • uniform shader inputTexture
  • manifest parameters as uniform float4 <name>

CLI

Install from NuGet:

dotnet tool install --global ShaderMcp
shader-mcp --help

Run once without installing globally:

dotnet dnx ShaderMcp --yes -- --help

Local development:

dotnet run --project src/ShaderMcp.Tool -- validate --source samples/gradient.sksl
dotnet run --project src/ShaderMcp.Tool -- render --source samples/gradient.sksl --out artifacts/gradient.png --width 512 --height 512 --time 0.25
dotnet run --project src/ShaderMcp.Tool -- sequence --source samples/gradient.sksl --out-dir artifacts/gradient-sequence --frames 12 --time-step 0.083333

MCP

Run the tool with no CLI args for stdio MCP mode:

[mcp_servers.shader-mcp]
command = "dotnet"
args = ["dnx", "ShaderMcp", "--yes"]

For local development:

[mcp_servers.shader-mcp]
command = "dotnet"
args = ["run", "--project", "/home/jmn/Repos/ShaderMcp/src/ShaderMcp.Tool"]

By default, MCP mode stores shaders and render artifacts under the user data folder, for example ~/.local/share/ShaderMcp on Linux. Set SHADER_MCP_WORKSPACE=/path/to/workspace to use a project-local or disposable workspace explicitly.

Main tools:

  • create_shader
  • update_shader
  • validate_shader
  • render_shader
  • render_shader_sequence
  • run_shader_tests
  • instructions(page="tools")

License

Licensed under CC BY-NC 4.0. Attribution is required and commercial use is not permitted without separate permission.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.1 159 6/30/2026
0.1.0 129 5/15/2026

# Changelog 0.1.1

## Changes (initial history)

- chore: bump ShaderMcp to 0.1.1 (`edec9f3`)
- fix: use stable shader workspace root (`ba697d2`)
- fix: package license as file (`5c9caa8`)
- feat: prepare ShaderMcp NuGet MCP package (`bc5efc2`)
- docs: add full noncommercial license (`2f462ca`)
- feat: add native shader mcp (`c743e43`)