kaleidoscope

kaleidoscope

MCP server for responsive web app preview and inspection. It allows previewing URLs on multiple device profiles, capturing screenshots, recording walkthroughs, and inspecting local pages with MCP clients.

Category
访问服务器

README

<p align="center"> <img src="assets/Kal%20new%20logo.png" alt="Kaleidoscope logo" width="148" /> </p>

Kaleidoscope

Kaleidoscope is a responsive preview and inspection tool for web apps. Load a local or public URL once, view it across device profiles, capture screenshots, inspect trusted local pages, and let MCP clients automate the workflow.

<p align="center"> <img src="assets/readme/overview-local-dev.png" alt="Kaleidoscope preview workspace showing local development mode and an iPhone preview frame" width="100%" /> </p>

What You Can Do

  • Preview local and public HTTP/HTTPS pages across mobile, tablet, and desktop devices.
  • Compare multiple breakpoints side by side.
  • Capture screenshots across several device profiles in one run.
  • Record scripted walkthrough videos with visible cursor movement.
  • Preview authenticated pages with temporary cookie and header injection.
  • Inspect trusted local pages and map selected elements back to source context.
  • Use MCP tools from Claude Code, Codex, Cursor, Windsurf, VS Code, and other stdio MCP clients.

Visual Tour

<table> <tr> <td width="50%" valign="top"> <img src="assets/readme/screenshot-panel.png" alt="Screenshot capture panel with multiple device targets selected" /> <br /> <strong>Capture multiple devices in one pass</strong> <br /> Queue mobile, tablet, and desktop screenshots from the sidebar without leaving the preview workflow. </td> <td width="50%" valign="top"> <img src="assets/readme/four-device-comparison.png" alt="Desktop comparison view showing four responsive device previews side by side" /> <br /> <strong>Compare layouts side by side</strong> <br /> Pin devices and inspect how the same page behaves across very different breakpoints. </td> </tr> <tr> <td width="50%" valign="top"> <img src="assets/readme/mobile-comparison-stack.png" alt="Mobile-stacked comparison layout for narrow screens" /> <br /> <strong>Use it comfortably on narrow screens</strong> <br /> Comparison mode falls back to a stacked layout so the workspace stays usable on smaller displays. </td> <td width="50%" valign="top"> <img src="assets/readme/overview-local-dev.png" alt="Main Kaleidoscope workspace with local development URL mode enabled" /> <br /> <strong>Local-first preview workflow</strong> <br /> Enter localhost shortcuts like <code>3000</code>, switch devices quickly, and move straight into inspect, auth, screenshots, or performance tools. </td> </tr> </table>

Install

Install the MCP package globally:

npm install -g kaleidoscope-mcp-server

The executable name is:

kaleidoscope-mcp

Screenshots and walkthrough recording require Playwright Chromium:

npx playwright install chromium

The npm package includes the Kaleidoscope MCP server, backend, and built web client. When an MCP tool needs Kaleidoscope and no server is already running, it can start the packaged runtime automatically.

MCP Client Setup

Use kaleidoscope-mcp as a stdio MCP server command.

Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, and similar clients:

{
  "mcpServers": {
    "kaleidoscope": {
      "command": "kaleidoscope-mcp",
      "env": {
        "KALEIDOSCOPE_SERVER_URL": "http://localhost:5000"
      }
    }
  }
}

Codex config.toml:

[mcp_servers.kaleidoscope]
command = "kaleidoscope-mcp"
enabled = true
startup_timeout_sec = 20
tool_timeout_sec = 60

[mcp_servers.kaleidoscope.env]
KALEIDOSCOPE_SERVER_URL = "http://localhost:5000"

Codex desktop connector UI:

  • Name: kaleidoscope
  • Transport: STDIO
  • Command to launch: kaleidoscope-mcp
  • Arguments: leave empty
  • Environment variable: KALEIDOSCOPE_SERVER_URL=http://localhost:5000
  • Working directory: leave blank

You can also run it ad hoc with npx:

npx -y kaleidoscope-mcp-server

For MCP clients that use JSON config:

{
  "mcpServers": {
    "kaleidoscope": {
      "command": "npx",
      "args": ["-y", "kaleidoscope-mcp-server"],
      "env": {
        "KALEIDOSCOPE_SERVER_URL": "http://localhost:5000"
      }
    }
  }
}

On Windows, using the installed kaleidoscope-mcp command is usually more reliable than wrapping npx through cmd /c.

Common Workflows

Preview A Local App

  1. Start your app, for example on http://localhost:3000.
  2. Ask your MCP client to run kaleidoscope_start.
  3. Ask it to prepare a responsive preview for your URL.
  4. Open http://localhost:5000 if you want to use the visual workspace directly.

Capture Screenshots

Use capture_screenshots with device IDs or common names:

{
  "url": "http://localhost:3000",
  "devices": ["iphone-14", "ipad", "desktop-hd"]
}

Responses include screenshot metadata and Markdown-ready image references when the MCP client supports rich content.

Record A Walkthrough

Use record_walkthrough with structured steps or a simple script:

click #open-settings
type "hello@example.com" into #email
click button[type="submit"]
wait 800ms

Walkthroughs are saved as local .webm files and returned as MCP artifacts.

Preview Authenticated Pages

Use preview_with_auth to create a temporary proxy session with cookies or safe custom headers. This is useful for checking logged-in screens without changing your app.

Inspect A Local Page

Inspect mode works with trusted loopback targets such as localhost and 127.0.0.1. It can discover likely selectors and return source context for selected elements when a workspace root is configured.

MCP Tools

  • kaleidoscope_status, kaleidoscope_start, kaleidoscope_stop
  • kaleidoscope_list_devices
  • preview_responsive
  • capture_screenshots
  • record_walkthrough
  • preview_with_auth
  • inject_mock_data
  • discover_page_elements
  • inspect_element_source

Environment Options

  • KALEIDOSCOPE_SERVER_URL: Kaleidoscope backend URL. Defaults to http://localhost:5000.
  • KALEIDOSCOPE_REQUEST_TIMEOUT_MS: MCP request timeout. Defaults to 60000.
  • KALEIDOSCOPE_WORKSPACE_ROOT: source-inspection root for local projects.
  • KALEIDOSCOPE_ARTIFACT_ROOT: allowed root for user-selected walkthrough output directories.
  • KALEIDOSCOPE_WALKTHROUGH_DIR: default output directory for walkthrough videos.
  • KALEIDOSCOPE_PROXY_TIMEOUT_MS: proxy request timeout. Defaults to 30000.
  • KALEIDOSCOPE_PROXY_MAX_RESPONSE_BYTES: proxy response byte limit. Defaults to 10485760.

Troubleshooting

  • Browser executable not found: run npx playwright install chromium in the same environment that launches the MCP server.
  • spawn C:\Windows\system32\cmd.exe ENOENT: install the package globally and configure your MCP client to run kaleidoscope-mcp directly.
  • sourceDir must be inside...: set KALEIDOSCOPE_WORKSPACE_ROOT to the project root you want Kaleidoscope to inspect.
  • output_dir must stay inside...: set KALEIDOSCOPE_ARTIFACT_ROOT or KALEIDOSCOPE_WALKTHROUGH_DIR, then use an output directory below it.
  • Port conflicts: set KALEIDOSCOPE_SERVER_URL=http://localhost:<free-port> or stop the process using port 5000.

Privacy And Safety

  • Kaleidoscope is designed for local preview and inspection workflows.
  • The local API binds to 127.0.0.1 by default.
  • Inspect mode is limited to loopback targets, and source reads must stay under KALEIDOSCOPE_WORKSPACE_ROOT.
  • Walkthrough output directories must stay under KALEIDOSCOPE_ARTIFACT_ROOT or KALEIDOSCOPE_WALKTHROUGH_DIR.
  • Auth proxy sessions are temporary and cleaned up automatically.
  • Public tunnel URLs created with tools such as cloudflared or ngrok should be treated as public.

License

Kaleidoscope is released under the MIT License. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选