Token导航 LogoToken导航TokenDH.com
Cables Rl MCP logo
开发工具stdio官方级别未说明来源级核验

Cables Rl MCP

MCP Server

一个集成Cables.gl视觉编程与强化学习的MCP服务器,用于自主视觉参数优化和生成艺术探索。

工具数

14

提示词数

0

GitHub Stars

3

资源数

0
TypeScriptClaude开发工具Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Adkr1989

提供方

Adkr1989

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install numpy

详细介绍

🎨 RL MCP服务器电缆

训练人工智能自主创作艺术

](https://www.npmjs.com/package/cables-rl-mcp) ![License: MIT](https://opensource.org/licenses/MIT) ![MCP](https://modelcontextprotocol.io) ![TypeScript](https://www.typescriptlang.org/)

*集成了以下功能的MCP服务器 Cables.gl 使用强化学习进行可视化编程,用于自主视觉参数优化和生成艺术探索。*

特性安装快速开始文档例子

______________________________________________________________________

🌟 什么是RL电缆?

电缆RL连接 克劳德代码Cables.gl (强大的视觉着色器系统)和 强化学习,允许AI代理:

  • 🎯 发现 自动生成美观的着色器参数
  • 🔄 优化 基于奖励学习的视觉输出
  • 🖼️ 生成 探索参数空间的独特生成艺术
  • 📊 学习 通过审美奖励功能看起来“好”的东西

将其视为 自主视觉艺术家 探索您的Cables.gl补丁的创造性可能性。

✨ 特性

特性描述
🎮 实时控制通过浏览器自动化修改Cables.gl参数
🧠 RL集成支持PPO、SAC和TD3算法
🎨 审美奖励多分量奖励函数(熵、色彩和谐、运动连贯性)
🔍 新奇探索发现新视觉领域的额外奖励
💾 会话保持保存/恢复探索会话
📸 自动捕获自动保存高奖励帧
高性能\<0.01ms奖励计算,\<0.02ms动作生成

🏗️ 建筑

┌─────────────────────────────────────────────────────────────┐
│                    Claude Code (Client)                      │
│                                                              │
│  Your prompts  ←→  cables-rl MCP  ←→  Playwright MCP        │
└─────────────────────────────────────────────────────────────┘
                            │
              ┌─────────────┼─────────────┐
              ▼             ▼             ▼
      ┌───────────┐  ┌───────────┐  ┌───────────┐
      │   RL      │  │ Cables.gl │  │  Reward   │
      │  Agent    │  │  Browser  │  │  System   │
      │(PPO/SAC)  │  │  Control  │  │(Aesthetic)│
      └───────────┘  └───────────┘  └───────────┘

📦 安装

先决条件

快速安装

# Clone the repository
git clone https://github.com/adkr1989/cables-rl-mcp.git
cd cables-rl-mcp

# Install Node.js dependencies
npm install

# Install Python dependencies
pip install numpy

# Build the project
npm run build

配置Claude代码

添加到您的Claude Code MCP设置中(~/.claude.json 或项目设置):

{
  "mcpServers": {
    "cables-rl": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/cables-rl-mcp/dist/index.js"],
      "env": {
        "PYTHON_PATH": "python",
        "OUTPUT_DIR": "/path/to/cables-rl-mcp/output"
      }
    },
    "playwright": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"]
    }
  }
}

🚀 快速开始

1.加载Cables.gl补丁

在克劳德代码中,问:

Load the Anomaly patch from Cables.gl and show me what parameters are available

2.探索参数

Change the blur amount to 15 and the chromatic aberration to 8, then take a screenshot

3.初始化RL代理

Initialize an SAC agent to optimize the Timer speed (0-5) and Blur amount (0-20) for aesthetic visuals

4.自主探索

Run autonomous exploration for 5 minutes, saving any interesting frames

🛠️ MCP工具

Cables.gl控制

工具说明
cables_load_patch在浏览器中加载Cables.gl补丁
cables_set_parameter实时设置参数值
cables_get_parameters获取所有可用参数
cables_batch_set_parameters高效地设置多个参数
cables_get_frame_metrics捕获帧并计算视觉指标

RL代理

工具说明
rl_init_agent初始化RL代理(PPO/SAC/TD3)
rl_get_action从代理获取下一步操作
rl_update_reward向代理发送奖励信号
rl_training_step执行培训步骤
rl_save_checkpoint保存代理状态
rl_load_checkpoint加载代理状态

自主探索

工具说明
rl_autonomous_explore运行自主视觉探索
rl_stop_exploration停止运行探索
rl_get_exploration_status获取探索状态

🎨 奖励系统

审美奖励功能结合了多个组成部分:

reward = (
    0.3 * entropy_score +      # Visual complexity
    0.2 * color_harmony +      # Color distribution
    0.2 * motion_coherence +   # Smooth motion
    0.2 * novelty_bonus -      # Exploration bonus
    0.1 * fps_penalty          # Performance penalty
)
组件描述
熵分数奖励平衡的视觉复杂性(不太简单,不嘈杂)
色彩和谐奖励均衡的颜色分布
运动一致性奖励平稳、有意的运动而不是抖动
新奇奖励探索新参数区域的奖励
FPS处罚惩罚损害性能的参数组合

📊 演出

度量结果
奖励计算0.007毫秒
动作生成0.14毫秒
理论训练速度150+步/秒
Cables.gl FPS145 FPS

📁 项目结构

cables-rl-mcp/
├── src/
│   ├── index.ts              # MCP server entry point
│   ├── types.ts              # TypeScript definitions
│   ├── tools/
│   │   ├── cables-control.ts # Cables.gl browser automation
│   │   ├── rl-agent.ts       # RL agent bridge
│   │   ├── reward-system.ts  # Visual metrics & rewards
│   │   └── training-loop.ts  # Autonomous training
│   └── bridge/
│       └── python-bridge.ts  # Python process communication
├── python/
│   ├── agent_wrapper.py      # RL agent wrapper
│   ├── reward_functions.py   # Aesthetic reward calculations
│   └── env_cables.py         # Gym environment
├── package.json
├── tsconfig.json
└── README.md

🤝 贡献

欢迎投稿!请随时提交拉取请求。

  1. 克隆该仓库
  2. 创建功能分支(git checkout -b feature/AmazingFeature)
  3. 提交您的更改(git commit -m 'Add some AmazingFeature')
  4. 推到分支(git push origin feature/AmazingFeature)
  5. 打开拉取请求

📜 许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

🙏 致谢

______________________________________________________________________

由以下材料制成❤️ 通过 A_开发

*通过视觉探索赋予人工智能创造力*

目录标签

目录标签

TypeScriptClaude开发工具生成艺术本地部署强化学习视觉编程参数优化自动化艺术创作

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

14

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP