Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 2.35 KB

File metadata and controls

50 lines (36 loc) · 2.35 KB

@tempad-dev/mcp

前往中文版

Usage

{
  "mcpServers": {
    "TemPad Dev": {
      "command": "npx",
      "args": ["-y", "@tempad-dev/mcp@latest"]
    }
  }
}

Quick setup helpers:

  • VS Code / Cursor / TRAE: use the deep links in TemPad Dev (Preferences → MCP server).
  • Windsurf: copy the JSON snippet from the same panel.
  • CLI: claude mcp add --transport stdio "TemPad Dev" -- npx -y @tempad-dev/mcp@latest or codex mcp add "TemPad Dev" -- npx -y @tempad-dev/mcp@latest.

Supported tools/resources:

  • get_code: Tailwind-first JSX/Vue markup plus assets and token references.
  • get_structure: Hierarchy/geometry outline for the selection.

Notes:

  • Tool responses use a shared 64 KiB inline budget measured on the CallToolResult body. When a selection is too large for the get_code budget, TemPad Dev may return a shell response instead of failing. The shell keeps the current node wrapper and lists omitted direct child ids in an inline code comment so agents can request them one by one. The accompanying warning stays lightweight and only points agents to that comment.
  • Assets are ephemeral and tool-linked; image/SVG bytes are downloaded via HTTP asset.url from tool results.
  • Asset resources are not exposed via MCP resources/list/resources/read.
  • The HTTP fallback URL uses /assets/{hash} and may include an image extension (for example /assets/{hash}.png). Both forms are accepted.

Configuration

Optional environment variables:

  • TEMPAD_MCP_TOOL_TIMEOUT: Tool call timeout in milliseconds (default 15000).
  • TEMPAD_MCP_AUTO_ACTIVATE_GRACE: Delay before auto-activating the sole connected extension (default 1500).
  • TEMPAD_MCP_MAX_ASSET_BYTES: Maximum upload size for captured assets/screenshots in bytes (default 8388608).
  • TEMPAD_MCP_ASSET_TTL_MS: Asset cleanup TTL in milliseconds based on last access; set 0 to disable (default 2592000000).
  • TEMPAD_MCP_RUNTIME_DIR: Override runtime directory (defaults to system temp under tempad-dev/run).
  • TEMPAD_MCP_LOG_DIR: Override log directory (defaults to system temp under tempad-dev/log).
  • TEMPAD_MCP_ASSET_DIR: Override asset storage directory (defaults to system temp under tempad-dev/assets).

Requirements

  • Node.js 18.20.0+