跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    GithubAnant

    Capy

    v1.0.0MCP 集成
    opencode-capy

    OpenCode plugin for Capy - AI preview and design system tooling

    GitHub 星标

    1

    月装机量

    15

    近 7 天 1

    综合评分SCORE

    22.5

    生态多维模型

    最近提交

    4 个月前

    2026-04-03

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-capy@1.0.0"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    Capy

    Capy

    MCP server that gives AI coding agents the context they need to build and update UI - preview pages & design-system artifacts.

    npm downloads license

    Website · npm · Docs


    What it does

    Capy inspects your React / Next.js repo and returns structured briefs so AI agents can implement UI changes with precision — no hallucinated components, no guessed tokens.

    Three tools:

    Tool Purpose
    get_preview_brief Returns repo map, inspection plan, constraints, and a /preview spec for the agent to follow
    get_design_system Writes a machine-readable design-system JSON artifact (.capy/design-system.json)
    update_preview Diffs against last snapshot, refreshes the design system, returns an incremental update brief

    Quick start

    npx capy-mcp@latest
    

    Setup

    Pick your client. One command or one config change — you're set.

    Agents

    Claude Code
    claude mcp add --scope user capy -- npx -y capy-mcp@latest
    

    Or add to ~/.claude/mcp.json:

    {
      "mcpServers": {
        "capy": {
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"]
        }
      }
    }
    
    Claude Desktop

    Add to your config file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    {
      "mcpServers": {
        "capy": {
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"]
        }
      }
    }
    
    Codex
    codex mcp add capy -- npx -y capy-mcp@latest
    

    Or add to ~/.codex/config.toml:

    [mcp_servers.capy]
    command = "npx"
    args = ["-y", "capy-mcp@latest"]
    
    Gemini CLI

    Add to ~/.gemini/settings.json:

    {
      "mcpServers": {
        "capy": {
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"]
        }
      }
    }
    
    Copilot CLI

    Add to ~/.vscode-server/data/User/mcp.json:

    {
      "servers": {
        "capy": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"]
        }
      }
    }
    

    Make sure Copilot Chat is in Agent mode — MCP tools only work there.

    Mistral Vibe

    Add to ~/.vibe/config.toml:

    [[mcp_servers]]
    name = "capy"
    transport = "stdio"
    command = "npx"
    args = ["-y", "capy-mcp@latest"]
    
    Kimi Code
    kimi mcp add --transport stdio capy -- npx -y capy-mcp@latest
    

    Or add to ~/.kimi/mcp.json:

    {
      "mcpServers": {
        "capy": {
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"]
        }
      }
    }
    
    OpenCode

    Add to ~/.config/opencode/opencode.json:

    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "capy": {
          "type": "local",
          "command": ["npx", "-y", "capy-mcp@latest"],
          "enabled": true
        }
      }
    }
    
    QwenCode

    Add to settings.json:

    {
      "mcpServers": {
        "capy": {
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"]
        }
      }
    }
    

    IDEs

    Cursor

    Add to ~/.cursor/mcp.json:

    {
      "mcpServers": {
        "capy": {
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"]
        }
      }
    }
    
    VS Code

    Add to ~/.vscode-server/data/User/mcp.json:

    {
      "servers": {
        "capy": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"]
        }
      }
    }
    

    Or via Command Palette: MCP: Open User Configuration

    Windsurf

    Add to ~/.codeium/windsurf/mcp.json:

    {
      "mcpServers": {
        "capy": {
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"]
        }
      }
    }
    
    Zed

    Add to your settings file:

    • macOS: ~/.zed/settings.json
    • Linux: ~/.config/zed/settings.json
    • Windows: %USERPROFILE%\AppData\Roaming\Zed\settings.json
    {
      "context_servers": {
        "capy": {
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"],
          "env": {}
        }
      }
    }
    
    Antigravity

    Add to your config file:

    • macOS: ~/.gemini/antigravity/mcp_config.json
    • Windows: %USERPROFILE%\.gemini\antigravity\mcp_config.json
    {
      "mcpServers": {
        "capy": {
          "command": "npx",
          "args": ["-y", "capy-mcp@latest"]
        }
      }
    }
    

    Or via UI: Agent session → … dropdown → MCP Servers → Manage MCP Servers → View raw config.


    Library usage

    import {
      buildPreviewBrief,
      buildDesignSystemArtifact,
      runPreviewUpdate,
      detectFramework,
    } from "capy-mcp";
    
    const brief = await buildPreviewBrief(process.cwd(), { task: "build_preview" });
    const designSystem = await buildDesignSystemArtifact(process.cwd());
    const update = await runPreviewUpdate(process.cwd());
    

    Local development

    cd capy-mcp
    npm install
    npm test
    npx capy-mcp
    

    Built by Anant Singhal

    Twitter · GitHub · LinkedIn