shade-mcp
shade-mcp is an MCP server for developing, testing, analyzing, searching, and bundling shader effects across WebGL2/WebGPU and Noisemaker DSL.
Compile effects, singly or as comma-separated batches, with per-pass diagnostics.
Render frames with uniform overrides, resolution/warmup control, optional PNG capture, and mean RGB/variance/blank/monochrome detection.
Describe rendered frames with AI vision using a supplied prompt.
Benchmark FPS, jitter, and frame timing against a target frame rate.
Test uniform responsiveness, no-passthrough behavior, and WebGL2/WebGPU pixel parity.
Run Noisemaker DSL programs and return multi-frame, per-surface PNG contact sheets with metrics; optionally load authored Portable packages.
Read, set, and randomize Noisemaker DSL program seeds.
Analyze effect structure for unused files, broken references, naming violations, uniform issues, missing descriptions, parity issues, and GLSL name collisions.
Compare GLSL/WGSL semantics with AI, compare shader structure, and analyze branching for optimization suggestions.
Search effects by concept/tag/style, inspect full effect details, regex-search GLSL source, search curated shader knowledge, and search local GLSL/WGSL library symbols.
Check shader source with advisory findings and bundle used library symbols with dependencies and credits.
List effects by namespace and rebuild the effect manifest.
Browser tools need Playwright Chromium plus a configured viewer; DSL seed tools need a Noisemaker 2 renderer; analysis, knowledge, and utility tools work from disk. AI-assisted tools require ANTHROPIC_API_KEY or OPENAI_API_KEY.
Serves as a fallback AI provider for the vision and analysis tools when Anthropic is not configured; configured via OPENAI_API_KEY.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@shade-mcp render the gradient shader and benchmark its frame time"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Open source from Noise Factor · more projects
shade-mcp
MCP server for shader effect development.
Distilled from three projects:
noisemaker — browser-based shader testing
portable — portable effect authoring
shade — agent-assisted shader editing
Requirements
Node.js 22 or newer
A viewer page for the seven viewer-driven browser tools;
runDslProgramand the seed tools need a Noisemaker checkout. See Viewer.
Related MCP server: graphite-editor-mcp
Quick Start
npm install # installs dependencies and builds dist/
npm run setup # install Playwright Chromium (browser tools only)Using shade-mcp with noisemaker or portable? See docs/SETUP.md for step-by-step configuration.
Viewer
The browser tools use Chromium. Seven control a viewer page that hosts the renderer;
runDslProgram creates a fresh renderer on a blank page for each call.
shade-mcp does not include a viewer.
Set SHADE_VIEWER_ROOT to the smallest directory containing the viewer and its imported modules.
For the seven viewer tools, the page must expose the renderer through window globals.
Set SHADE_GLOBALS_PREFIX to match those globals. With prefix <p>, the
viewer publishes <p>CanvasRenderer, <p>RenderingPipeline,
<p>CurrentBackend() (glsl or wgsl), <p>CurrentEffect (the effect id, or
an entry with id or namespace and name, and instance.globals),
<p>SetPaused, <p>SetPausedTime, <p>FrameCount and optionally
<p>PipelineGeneration, a number it bumps after every successful compile. To
select an effect, shade-mcp calls <p>SelectEffect(id, { url }) when the
viewer publishes it, where url is where shade-mcp's server serves the
effect's directory (/effects/<id>/); the call resolves when the compile
finishes and may resolve to { error }. Without it, shade-mcp drives a
<select id="effect-select">. To switch backends, it calls
<p>SetBackend('glsl' | 'wgsl') when published, which recompiles, and
otherwise the renderer's switchBackend. Portable's viewer publishes the
selection and backend calls. runDslProgram uses a fresh
renderer independently of the viewer globals and SHADE_VIEWER_PATH. By default
it imports Noisemaker source modules from /shaders/src/index.js and assets from
/shaders under SHADE_VIEWER_ROOT. For Portable's built-in Noisemaker DSL,
set SHADE_DSL_RENDERER_MODULE=https://shaders.noisedeck.app/1/noisemaker-shaders-core.esm.js,
SHADE_DSL_ASSETS_BASE=https://shaders.noisedeck.app/1, and
SHADE_DSL_USE_BUNDLES=true; keep its viewer settings for the other browser tools.
To use authored user.* effects, pass effects as comma-separated Portable
package IDs under SHADE_EFFECTS_DIR (up to 16), such as user/gradient,user/tint.
For a flat single-effect directory, use its directory name as the ID. The fresh
renderer loads each package's raw definition.json and the requested backend's
shader files. Omitting effects loads built-ins only. Authored registration
requires a Noisemaker runtime with CanvasRenderer.registerPortableEffect;
older CDN bundles return an explicit unsupported-runtime error. Viewer state
is never inherited, and duplicate authored function names fail the batch.
Project |
|
|
|
noisemaker |
|
|
|
portable |
|
|
|
noisemaker's viewer page is in demo/shaders/ and imports the engine from shaders/src/ at the repository root.
For noisemaker, set SHADE_VIEWER_ROOT to the repository root.
If you use the page's directory as the root, every module request returns 404.
The server refuses dotfiles regardless of the root.
The analysis, knowledge, and utility tools read from disk and need no viewer.
Configuration
Environment variables:
Variable | Default | Description |
|
| Path to the effects library |
| cwd | Project root, used for relative paths and AI key lookup |
|
| Directory served as the viewer |
|
| Path within the viewer to open |
|
| Port for the local viewer server |
|
| Prefix of the viewer's window globals |
|
| Root-relative or HTTPS Noisemaker module exporting |
|
| Root-relative or HTTPS Noisemaker asset base for |
|
| Set |
|
| Default rendering backend ( |
|
| Concurrent browser sessions |
|
| Set to |
|
| Ceiling for every browser and page operation |
|
| Ceiling for a single AI provider request |
| provider default | Model used by the AI-powered tools |
| — | Required for AI-powered tools (vision, analysis) |
| — | Fallback AI provider |
MCP Client Configuration
Claude Code
Put this in .mcp.json at the project root, or register it with claude mcp add shade -- node /path/to/shade-mcp/dist/index.js.
{
"mcpServers": {
"shade": {
"command": "node",
"args": ["/path/to/shade-mcp/dist/index.js"],
"env": {
"SHADE_EFFECTS_DIR": "/path/to/effects"
}
}
}
}VS Code Copilot
In .vscode/mcp.json:
{
"servers": {
"shade": {
"command": "node",
"args": ["/path/to/shade-mcp/dist/index.js"],
"env": {
"SHADE_EFFECTS_DIR": "/path/to/effects"
}
}
}
}Cursor
In .cursor/mcp.json:
{
"mcpServers": {
"shade": {
"command": "node",
"args": ["/path/to/shade-mcp/dist/index.js"],
"env": {
"SHADE_EFFECTS_DIR": "/path/to/effects"
}
}
}
}Windsurf
In ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"shade": {
"command": "node",
"args": ["/path/to/shade-mcp/dist/index.js"],
"env": {
"SHADE_EFFECTS_DIR": "/path/to/effects"
}
}
}
}Tool Reference
Result envelope
Every tool result's text is JSON in one envelope, errors included.
A single result carries a top-level
outcome, computed from the tool's ownstatus:ok(the check passed or the query answered),fail(the check ran and its verdict is negative: a paritymismatch, apassthroughfilter,divergentalgorithms, a uniform that did not affect output,meets_target: false),warning(findings to review),skipped(nothing was testable) orerror(no verdict). A payload with nostatusiserrorwhen it carries anerrorstring. Anoutcomekey inside the payload never overrides the computed one. Verb-specific fields such asstatusandmismatchPercentare kept beside it.A batch (several effects in one call) is
{ outcome, summary, results }. Each entry carries its ownoutcomeandsummarycounts entries per outcome. The batchoutcomeiserrorwhen every entry is an error,failwhen any entry isfailorerror,warningwhen any entry iswarning,skippedwhen every entry is skipped, andokotherwise.MCP
isErroris set when the call failed as a whole: a singleerrorresult, or a batch in which every entry is anerror. Afailverdict is a successful call and does not setisError.Errors raised inside a tool before it reaches its own handling, such as an unresolvable effect selector, and calls the MCP SDK rejects before the tool runs (an argument that fails the tool's input schema, an unknown tool) arrive in the same envelope with
isError:{ "outcome": "error", "status": "error", "error": "..." }. For a rejected argument,erroris the SDK's message, for exampleMCP error -32602: Input validation error: ....
Browser Tools (11)
These tools require Playwright Chromium; all except runDslProgram and the seed tools require a viewer (see Viewer).
Each result of the six viewer verbs (compileEffect, renderEffectFrame,
benchmarkEffectFPS, testUniformResponsiveness, testNoPassthrough,
testPixelParity), and each batch entry, carries effect_id, the effect id
that was requested, so entries match their requests. page_effect_id is the
effect the viewer page reports as loaded (null when the viewer does not expose
it) and backend is the backend the page reports. When the page shows another
effect or renders on another backend, the entry's status is error.
Tool | Description |
| Compile a shader effect. Return diagnostics for each pass. Use comma-separated effect IDs for a batch. |
| Render one frame. Return mean RGB, variance, and blank/monochrome detection. Optionally capture a PNG. |
| Render a frame. Analyze the image with AI vision. The tool requires |
| Measure FPS, jitter, and frame timing statistics against a target frame rate. |
| Check whether each uniform control changes the output: range, dropdown, boolean and vector controls, gates opened first, against a reference captured twice to measure the output's own change between renders. Each control is |
| Check that a filter effect modifies the input it consumes: compares output and input at two paused times by mean difference, changed grid pixels and strongly changed pixels; a filter that is the identity at its defaults is measured again with its controls moved. |
| Compare WebGL2 and WebGPU output pixel by pixel within the epsilon tolerance. |
| Render every written output surface at frames 1, 120, and 600 after warmup by default, at 960×540. Return one PNG contact sheet as MCP image content plus metrics for each surface and frame. |
| Return a program's seed: the value of its |
| Set a program's seed, 0 to 4294967295. Return the seed and the program with its |
| As |
The seed tools use the engine's seed API (CanvasRenderer.getSeed and setSeed), which Noisemaker 2 has. setProgramSeed and reseedProgram compile the program with built-in effects only; they have no effects argument. Point SHADE_DSL_RENDERER_MODULE at a Noisemaker 2 renderer to use them. With a renderer that has no seed API, each returns an error that names the missing methods.
Analysis Tools (4)
These tools analyze files on disk and do not need a browser.
Tool | Description |
| Detect unused files, broken references, naming violations, leaked uniforms, and structural parity issues. |
| Compare the semantics of GLSL/WGSL pairs with AI. The tool requires an AI key. |
| Compare shader structure: function names, uniforms, and line counts. |
| Analyze unnecessary shader branching with AI. Return optimization suggestions. The tool requires an AI key. |
Knowledge Tools (7)
In-memory search indexes.
Tool | Description |
| Search effect library by concept, tag, algorithm, or visual style. |
| Return the full definition, shader source, uniforms, and passes for an effect ID. |
| Search GLSL source code across all effects with a regular expression. |
| Search curated shader documentation by meaning: DSL grammar, GLSL techniques, patterns, errors, and the shader-craft references (category |
| Search local GLSL/WGSL library symbols by name, signature, summary and module. |
| Return advisory source findings for GLSL/WGSL text or a shader file inside the effects directory or project root. |
| Inline used library symbols and their dependencies with credits. Return source; write a file only with explicit |
Utility Tools (2)
Tool | Description |
| List all effects, optionally filtered by namespace. |
| Rebuild effect manifest by scanning effects directory. |
Development
npm test # run tests
npm run typecheck # tsc --noEmit, including tests
npm run build # build with tsup
npm run dev # watch modeTests and typecheck are separate checks. Vitest does not typecheck. Run both commands.
Credits
The shader-craft knowledge in src/knowledge/shader-craft/ adapts the shader-art-coding skill from
shader-skills by gokayfem (MIT, Copyright (c) 2026 gokayfem) for
Noisemaker effects. It is pinned to upstream commit e09bc993bf04201f26c03c87c89210e9b472f526 (2026-10-19).
provenance.json records each upstream file and its blob hash. The upstream licence ships in the knowledge bundle as
SHADER_CRAFT_LICENSE.
The techniques come from their original authors, each credited in SHADER_CRAFT_CREDITS:
Inigo Quilez: distance functions, smooth minimum, soft shadows, filtering, noise derivatives, domain warping
Mercury demogroup: hg_sdf combinators and repetition
Jarzynski and Olano: PCG hashes
Stefan Gustavson, and Gustavson and McEwan: simplex noise
Ken Perlin: gradient noise and turbulence; Perlin and Neyret: flow noise
Bridson, Hourihan and Nordenstam: curl noise
Jorge Jimenez: interleaved gradient noise; Martin Roberts: R2 sequence
Troy Sobotka and Benjamin Wrensch: AgX; the Khronos Group: PBR Neutral; Stephen Hill: ACES fit and wrap lighting
Bjorn Ottosson: Oklab; Brian Karis: environment BRDF; the Filament documentation: GGX shading
Barre-Brisebois and Bouchard: fast translucency
Sebastien Hillaire: volumes and sky; Andrew Schneider: clouds
Mark Finch: water waves; Ryan Geiss: terrain; Müller et al.: procedural buildings
The shader-craft building-block library (SHADER_CRAFT_LIBRARY_MODULES) is the upstream GLSL library adapted to the
Noisemaker effect contract, with a WGSL twin of every function. SHADER_CRAFT_LIBRARY indexes both, and each entry
cites its technique credits by key.
License
MIT
Available Tools
24 toolsanalyzeBranchingB
Analyze unnecessary shader branching with AI. Return optimization suggestions.
Inputs: effect_id (required), backend.
analyzeEffectA
Return the full definition, shader source, uniforms, and passes for an effect.
Inputs: effect_id (required).
benchmarkEffectFPSC
Measure achieved FPS, jitter, and frame timing statistics against a target frame rate.
Inputs: backend, effects, effect_id, resolution, +2 more.
bundleShaderA
Inline only the shader library symbols used by a program and their dependencies, with upstream and technique credits. Return source; write back only with explicit write: true.
Inputs: file, write, source, language.
checkAlgEquivB
Compare the semantics of GLSL/WGSL pairs with AI. Flag divergent algorithms. Ignore syntax differences.
Inputs: effect_id (required).
checkEffectStructureC
Detect these effect issues:
unused files
broken references
naming violations
leaked or undefined uniforms
missing descriptions
structural parity issues
GLSL name collisions: uniforms versus functions, reserved words, or built-in shadowing.
Inputs: effect_id (required).
checkShaderA
Advisory GLSL/WGSL source findings for Noisemaker effects. Findings never block compilation or change a file.
Inputs: file, source, language.
compareShadersC
Compare shader structure: function names, uniform declarations, and line counts. This tool does not require AI.
Inputs: effect_id (required).
compileEffectC
Compile a shader effect. Return diagnostics for each pass. Use comma-separated effect IDs for a batch.
Inputs: backend, effects, effect_id.
describeEffectFrameC
Render a frame. Analyze the image with AI vision, using the prompt that the user supplies.
Inputs: prompt (required), backend, effects, effect_id, +1 more.
generateManifestB
Scan the effects directory to rebuild the effect manifest.
Inputs: no named parameters.
getProgramSeedA
Read a Noisemaker DSL program's seed: the value of its seed directive, or null when it has none (it then draws from 0). It reads the directive without compiling or checking the program. Needs a Noisemaker 2 renderer.
Inputs: dsl (required).
listEffectsB
List all effects, optionally filtered by namespace. Pass id to the other tools; func is the name a DSL program calls.
Inputs: namespace.
renderEffectFrameB
Render one frame. Compute mean RGB, variance, and monochrome/blank detection. Optionally capture a PNG.
Inputs: time, backend, effects, uniforms, +4 more.
reseedProgramB
Give a Noisemaker DSL program a fresh random seed and return it as setProgramSeed does. Built-in effects only. Needs a Noisemaker 2 renderer.
Inputs: dsl (required).
runDslProgramB
Compile Noisemaker DSL with optional authored Portable packages in a fresh renderer and return a multi-frame, per-surface PNG grid with metrics.
Inputs: dsl (required), frames, backend, effects, +5 more.
searchEffectsA
Search the effect library by concept, tag, algorithm, or visual style. The tool expands the query with synonyms.
Inputs: query (required), limit.
searchShaderKnowledgeB
Search curated shader documentation by meaning: DSL grammar, GLSL techniques, effect patterns, common errors, and the shader-craft references (workflow, subject routing, SDF modeling, noise, terrain, water, rendering pipeline, library functions, recreating a reference video).
Inputs: query (required), limit, category.
searchShaderLibraryB
Search the local shader-craft library for GLSL or WGSL building blocks, signatures and summaries.
Inputs: query (required), limit, language.
searchShaderSourceA
Search GLSL source code across all effects with a regular expression. Return matching snippets with context.
Inputs: query (required), limit, context_lines.
setProgramSeedA
Set a Noisemaker DSL program's seed and return the seed and the program with its seed directive written or replaced. The whole program comes back as the engine's unparser writes it: comments before the search directive are dropped, and literal values are written as compiled, while random calls stay as written. Built-in effects only. Needs a Noisemaker 2 renderer.
Inputs: dsl (required), seed (required).
testNoPassthroughA
Check that a filter effect modifies the input it consumes. Compares the rendered output with the bound input texture (skipping a feedback read of the effect's own output) at paused t=0 and t=0.37: similarity (mean RGB difference on a 64x64 grid), changed_fraction (grid pixels changed by more than 2/255) and strong_fraction (all pixels changed by more than 16/255). Output is unchanged when similarity and changed_fraction are at most 0.01 and strong_fraction at most 0.0005 at both times. A filter unchanged at its defaults is measured again with its ungated controls moved (identity_at_defaults, varied); only a filter unchanged both ways is a passthrough.
Inputs: backend, effects, effect_id.
testPixelParityA
Render with both WebGL2 and WebGPU. Compare the output pixel by pixel within the epsilon tolerance.
Inputs: seed, effects, epsilon, effect_id.
testUniformResponsivenessB
For each uniform control the tool finds two values that differ from the value the loaded program set: a range control's farther 25%/75% point and its 38.2% point, a dropdown's other choices, a boolean's opposite, or a vector moved a quarter of its range. It first opens the control's ui.enabledBy gate by setting the gate params (enabled_with). It captures the output twice (the second against the first measures how much the output changes between renders on its own), then sets each value and compares at paused t=0 and t=0.37. A control responds when the luma, a per-channel mean or the per-pixel mean (64x64 grid) changes by more than 0.002, or more than 0.05% of all pixels change by more than 16/255 (strong_fraction); when the output changes on its own, only well beyond that change. A control that does not respond is retried with one other control moved (context). Results per uniform: pass, fail, error, gated (a compile-time define or a gate that cannot be opened), unstable (no verdict: the output changes between renders by more than the thresholds), or untested (no other value can be set at run time). Status is ok when at least one control was measured and every measured control responded; error when one could not be measured or got no verdict (unstable); otherwise fail when one did not respond; skipped when no control could be set at run time (every control gated or untested). Async overlays are awaited, up to the session timeout (settle_timed_out).
Inputs: backend, effects, effect_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
The set has clear clusters (search, check/analyze, seed, compile/render, test), but within clusters there is real overlap: searchShaderSource vs searchShaderLibrary vs searchEffects vs searchShaderKnowledge are four similarly named searches, and checkShader vs checkEffectStructure vs checkAlgEquiv vs compareShaders vs analyzeBranching/analyzeEffect are easy to confuse. The detailed descriptions mitigate this, but an agent could still misselect between searchShaderLibrary and searchEffects or between checkShader and checkEffectStructure.
All tools are camelCase and overwhelmingly verb-leading (search*, check*, get/set*, compile*, run*, analyze*, test*, render*, describe*, bundle*, list*, generate*). A few names are verb-only or noun-heavy (reseedProgram, compareShaders), and the verb choice varies across similar actions (check/compare/analyze), but the pattern is predictable overall.
24 tools is on the heavy side for a shader-authoring server and sits in the '16-25 feels heavy' band. Most tools do map to distinct operations (search, seed, compile, run, render, test, manifest, bundle), so it is defensible, but the surface is broad enough to be borderline.
Coverage is strong: search/read, seed manipulation, compile, run, render, analysis, regression testing, manifest rebuild, and bundling are all present. The main gap is authoring: there is no explicit create/edit/delete effect or write-shader-source tool (bundleShader and setProgramSeed only write as side effects), which leaves a workflow dead end for creating new effects.
Maintenance
Related MCP Connectors
iOS simulators, Android emulators, web browsers and macOS computers for agents to verify their work
Windows MCP server for AI agents (WebGL browser QA, MS Office COM, NVENC) via x402 USDC.
Browser-based QA for AI-built software. Test pages with real browsers via agents.
On-demand GPU nodes for agents: create nodes, run commands, and submit jobs, billed by the minute.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables automated graphics capture and replay with RenderDoc, allowing agents to launch executables, inspect captures, and export thumbnails or timeline JSON for regression triage.1MIT
- AlicenseAqualityCmaintenanceEnables AI agents to author node-graph-based procedural graphics as data and render them deterministically via a pinned headless engine, returning validated, hashed image artifacts with full provenance.4MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to inspect and edit live 3D scenes, materials, shaders, and lights in the browser without touching project code, then turn any previewed change into ready-to-paste source. Also provides performance and mobile audits, video frame capture, and Playwright helpers.8,555 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to drive a browser-based game editor directly, covering projects, entities, scripts, assets, templates, animation, scenes, settings, builds, and viewport and runtime control. Agents can also launch the project and verify it actually runs by capturing screenshots, logs, and live state, then send keyboard, mouse, and touch input.-