MCP server
Serve the catalogue to your coding agent with npx shadertown mcp.
The CLI is also an MCP server. Connected, a coding agent can search the
catalogue, read every control a shader exposes — range, default, and what
moving it does — and vendor tuned source straight into the project it is
working on. It is npx shadertown add with the judgement moved into the
conversation.
Connect an agent
npx add-mcp "npx -y shadertown@latest mcp" -n shadertownadd-mcp detects the coding agents
on the machine — Claude Code, Cursor, VS Code, Windsurf, Codex, Zed, and some
twenty others — and writes each one's configuration in its own dialect. Pass
-a cursor (repeatable) to target one explicitly, or -g for the user-level
config instead of the project's. Any MCP client takes the same server by
hand:
{
"mcpServers": {
"shadertown": {
"command": "npx",
"args": ["-y", "shadertown@latest", "mcp"]
}
}
}The server speaks MCP over stdio and adds no dependencies — it is the same
zero-dependency CLI, answering discovery from the registry the package
already ships and installing through the same registry route as add.
Or connect to the hosted one
There is a second server, at https://www.shadertown.com/mcp, speaking the
same protocol over Streamable HTTP. Nothing is installed and nothing runs on
the machine:
{
"mcpServers": {
"shadertown": {
"url": "https://www.shadertown.com/mcp"
}
}
}Which one to reach for is a question of what the agent is allowed to do. The hosted server can only hand back bytes — it has no access to the project, so it answers with the files' contents and the agent writes them. The stdio server runs where the project is, so it writes them itself. Same catalogue, same paywall, same licence:
npx shadertown mcp | https://www.shadertown.com/mcp | |
|---|---|---|
| Transport | stdio | Streamable HTTP |
| Install | none, via npx | none |
| Reads the catalogue | yes | yes |
| Writes files into the project | install_shader | returns their contents |
| Signs in | the machine's stored token | an Authorization header |
The hosted server takes a device token in an Authorization: Bearer header
for Professional source. Without one it serves the Free shaders and explains
what the others need.
The tools
| Tool | What it does |
|---|---|
search_shaders | Free-text search over names, taglines, descriptions, families, and tags |
get_shader | One shader in full: every control with range, default and meaning, the colours, usage per framework, and the URL where a human can tune it live |
install_shader | Vendors the WGSL, a typed preset pinned to the tuned params, a working example, the README, and the LICENSE into the project |
account_status | Who this machine is signed in as, on which plan, and what that unlocks |
The hosted server has the first two, and get_shader_source in place of the
last two: it returns the same five files for the agent to write, and has no
machine to report the sign-in state of.
install_shader writes the same five files as npx shadertown add, relative
to the workspace the agent runs in — src/shaders by default, or the
outDir from shadertown.config.ts.
Licensing
The 16 Free shaders install for anyone. The other
61 need a plan on the signed-in account — until then
they answer 402:
npx shadertown loginThe agent cannot run that for you — it opens a browser — but when an install
hits the paywall, the tool result says exactly this, so the agent will ask.
For CI or containers, set SHADERTOWN_TOKEN instead.
Things to say to it
- "Put a calm, dark animated background behind the hero — pick one from shadertown and install it."
- "Make the aurora slower and shift it toward the brand purple, then pin those values into the preset."
- "Which shadertown shaders react to the pointer? Wire one up behind the signup form."
- "Swap the vendored shader for one with a lighter per-frame cost."