modelscope·@monteslu/vibe-eyes
一种MCP服务器,它通过矢量画布可视化和调试信息,使大型语言模型(LLMs)能够“看到”基于浏览器的游戏和应用程序中发生的情况。
一个MCP服务器,通过矢量化画布可视化和调试信息,使LLMs能够“看到”基于浏览器的游戏和应用程序中正在发生的事情。
<img src="./happy.jpg" width="50%" alt="Vibe-Eyes Logo">Vibe-Eyes采用客户端-服务器架构,轻量级的浏览器客户端捕获画布内容和调试信息,通过WebSockets将其发送到Node.js服务器,然后将图像矢量化为紧凑的SVG表示,并通过模型上下文协议(MCP)提供给LLMs。
flowchart LR
A["Browser Game/App<br/>(Canvas + JavaScript)"] -->|"Captures"| B["Vibe-Eyes Client<br/>(vibe-eyes-client)"]
B -->|"WebSocket<br/>(CORS-free)"| C["Socket.IO Server"]
subgraph server["Vibe-Eyes Server (mcp.js)"]
C -->|"Process"| D["Vectorization<br/>(vectorizer.js)"]
C -->|"Store"| E["Debug Data<br/>(logs, errors, exceptions)"]
D -->|"Rough SVG"| F["MCP Tool: getGameDebug()"]
E --> F
end
F -->|"SVG + Debug Info"| G["Claude/LLM<br/>(MCP Client)"]
G -->|"Debugging<br/>Assistance"| A
classDef default color:#000,font-weight:bold
classDef edgeLabel color:#333,font-size:12px
style A fill:#c0e0ff,stroke:#000,stroke-width:2px
style B fill:#ffe0a0,stroke:#000,stroke-width:2px
style C fill:#a0d0ff,stroke:#000,stroke-width:2px
style D fill:#b0e0a0,stroke:#000,stroke-width:2px
style E fill:#ffb0b0,stroke:#000,stroke-width:2px
style F fill:#d0b0ff,stroke:#000,stroke-width:2px
style G fill:#ffb0d0,stroke:#000,stroke-width:2px
style server fill:#f0f0f0,stroke:#666,stroke-width:1px,stroke-dasharray: 5 5,color:#000
注意:此项目是实验性的,旨在通过提供视觉上下文和丰富的调试信息来增强与LLMs的“vibe编码”会话。
mcp.js)核心服务器:
浏览器客户端可在vibe-eyes-client仓库获取。
一种轻量级的浏览器集成,它:
vectorizer.js)高质量的SVG矢量化库,它:
# Clone the repository
git clone https://github.com/monteslu/vibe-eyes.git
cd vibe-eyes
# Install dependencies
npm install
将MCP服务器注册到您的AI代理:
# For Claude Code
claude mcp add
这使得Claude可以通过MCP使用Vibe-Eyes的功能。
将下面的英文 markdown 内容翻译成中文,保持 markdown 格式输出,原样保留全部代码块和链接内容:
通过包含所需的脚本来将客户端添加到您的浏览器应用程序中:
<!-- Include Socket.IO client -->
<script src="https://cdn.socket.io/4.7.4/socket.io.min.js"></script>
<!-- Include Vibe-Eyes client -->
<script src="https://cdn.jsdelivr.net/npm/vibe-eyes-client/dist/index.min.js"></script>
<!-- Initialize the client -->
<script>
// Import the initialization function if using as module
// import { initializeVibeEyes } from 'vibe-eyes-client';
// Initialize with configuration
const vibeEyes = initializeVibeEyes({
// WebSocket URL to the Vibe-Eyes server
serverUrl: 'ws://localhost:8869',
// Capture interval in milliseconds
captureDelay: 1000,
// Start capturing automatically after connection
autoCapture: true
});
</script>
MCP 服务器通过 Model Context Protocol (MCP) 提供了一个工具,让 LLM 能够访问最新的视觉和调试信息:
getGameDebug({ includeSvg: true/false })
LLM 将会收到:
includeSvg 为 true)这使得 LLM 能够“看到”应用程序中正在发生的事情,并提供更好的帮助。
要从 Claude 访问 Vibe-Eyes:
{
"name": "vibe-eyes",
"url": "http://localhost:8869",
"tools": [
{
"name": "getGameDebug",
"description": "Retrieves the most recent canvas visualization and debug information from a browser game or application"
}
]
}
传统的“氛围编码”会话要求开发人员手动截取屏幕截图并描述其应用程序中正在发生的情况。Vibe-Eyes 通过以下方式自动化了这一过程:
对于希望重用矢量化 SVG 输出的应用程序:
WebSocket 响应:服务器直接在 WebSocket 响应中包含 SVG:
socket.on('debugCapture', (data, callback) => {
// 捕获和处理...
callback({
success: true,
id: "capture_123",
svg: "<svg>...</svg>", // 矢量化 SVG
stats: { /* 统计数据 */ }
});
});
HTTP 端点:通过 /latest 端点访问最新的捕获:
fetch('http://localhost:8869/latest')
.then(res => res.json())
.then(data => {
const svg = data.vectorized?.svg;
// 使用 SVG...
});
// Initialize the client
const vibeEyes = initializeVibeEyes({
serverUrl: 'ws://localhost:8869',
captureDelay: 1000, // ms between captures
maxLogs: 10, // Max console.log entries to store
maxErrors: 10, // Max console.error entries to store
autoCapture: true // Start capturing automatically
});
// Manual control
vibeEyes.startCaptureLoop(); // Start auto-capturing
vibeEyes.stopCaptureLoop(); // Stop auto-capturing
vibeEyes.captureAndSend(); // Trigger one capture immediately
// The server responds with:
// {
// success: true,
// id: "capture_1234567890",
// processedAt: 1616161616161,
// svg: "<svg>...</svg>", // The vectorized SVG for direct use
// stats: {
// vectorizeTime: 120,
// optimizeTime: 30,
// originalSize: 50000,
// finalSize: 15000,
// sizeReduction: 70
// }
// }
// MCP tool available t…
快递100 MCP Server提供快递信息查询、快递运费预估比价、快递时效查询(含发货前时效查询与在途动态时效查询)等功能。
暂无描述。
一个提供网页开发工具的MCP服务器,例如屏幕捕捉功能,可以让AI代理获取并处理用户屏幕的截图。
一个从网站提取有意义内容并将HTML转换为高质量Markdown的MCP服务器,使用Mozilla的Readability引擎。
一种模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页交互,而无需使用视觉模型或截图。
桌面通知、个性化声音、ntfy 手机应用通知、邮件通知和 API 推送,减少 AI 任务等待焦虑,舒适地享用一杯咖啡。