ShaderMcp 0.1.1
{ "servers": { "ShaderMcp": { "type": "stdio", "command": "dnx", "args": ["ShaderMcp@0.1.1", "--yes"] } } }
.vscode/mcp.json settings file.
dotnet tool install --global ShaderMcp --version 0.1.1
dotnet new tool-manifest
dotnet tool install --local ShaderMcp --version 0.1.1
#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 resolutionuniform float timeuniform float frameuniform float2 pointeruniform 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_shaderupdate_shadervalidate_shaderrender_shaderrender_shader_sequencerun_shader_testsinstructions(page="tools")
License
Licensed under CC BY-NC 4.0. Attribution is required and commercial use is not permitted without separate permission.
| Product | Versions 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. |
This package has no dependencies.
# 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`)