Skip to main content
Glama

ShaderToy-MCP

ShaderToy 的 MCP 服务器,一个用于创建、运行和共享 GLSL 着色器的网站 ( https://www.shadertoy.com/ )。它通过模型上下文协议 (MCP) 将 Claude 等 LLM 与 ShaderToy 连接起来,允许 LLM 查询和读取整个网页,从而能够创建通常无法实现的越来越复杂的着色器。

它生成的复杂着色器的示例:

IMG_9029


海洋https://www.shadertoy.com/view/tXs3Wf


山脉https://www.shadertoy.com/view/W3l3Df


矩阵数字雨https://www.shadertoy.com/view/33l3Df

特征

  • 检索 ShaderToy 上任何着色器的信息

  • 通过搜索提示搜索 ShaderToy 上可用的着色器

  • 通过学习 ShaderToy 上现有的着色器来生成复杂的着色器

Related MCP server: mcp-graphql-schema

MCP 工具

  • 获取着色器信息()

  • 搜索着色器()

安装

在 Mac 上,请将 uv 安装为

brew install uv

在 Windows 上

powershell -c "irm https://astral.sh/uv/install.ps1 | iex" 

进而

set Path=C:\Users\nntra\.local\bin;%Path%

否则,安装说明在其网站上:安装 uv

Claude 桌面集成

使用git clone https://github.com/wilsonchenghy/ShaderToy-MCP.git克隆项目

转到 Claude > 设置 > 开发人员 > 编辑配置 > claude_desktop_config.json 以包含以下内容:

{
    "mcpServers": {
        "ShaderToy_MCP": {
          "command": "uv",
          "args": [
            "run",
            "--with",
            "mcp[cli]",
            "mcp",
            "run",
            "<path_to_project>/ShaderToy-MCP/src/ShaderToy-MCP/server.py"
          ],
          "env": {
            "SHADERTOY_APP_KEY": "your_actual_api_key"  // Replace with your API key
          }
        }
    }
}

在 Claude 上设置配置文件后,您将看到 MCP 的锤子图标。使用示例命令进行测试,看看它是否正确使用了 MCP 工具。

示例命令

Generate shader code of a {object}, if it is based on someone's work on ShaderToy, credit it, make the code follow the ShaderToy format: void mainImage( out vec4 fragColor, in vec2 fragCoord ) {}

-
security - not tested
A
license - permissive license
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wilsonchenghy/ShaderToy-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server