mcpField
D
designpin-mcp-server

designpin-mcp-server

本地服务
github.com/opjhabuilds媒体与设计026 周前更新

关于 designpin-mcp-server

designpin-mcp-server 将兼容 MCP 的 AI 客户端连接到 DesignPin,用于评审 HTML 原型。它可创建分享链接、上传新版本并读取评审意见。

主要功能

  1. 01创建原型评审链接
  2. 02上传模块新版本
  3. 03读取指定版本评论
  4. 04通过参数或环境变量配置

适用场景

  1. 01分享生成的 HTML 供团队评审
  2. 02根据反馈发布修订版原型
  3. 03读取特定版本的评论

MCP 相关

它将 DesignPin REST API 封装为 MCP 服务,向 MCP 客户端提供 `createShareLink`、`uploadVersion` 和 `listComments` 工具。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"opjhabuilds-designpin": {
"command": "npx",
"args": [
"-y",
"@designpin/mcp-server"
],
"env": {
"DESIGNPIN_API_KEY": "<DESIGNPIN_API_KEY>",
"DESIGNPIN_PROJECT_ID": "<DESIGNPIN_PROJECT_ID>",
"DESIGNPIN_BASE_URL": "<DESIGNPIN_BASE_URL>"
}
}
}
}
启动命令npx -y @designpin/mcp-server
需要配置的环境变量
DESIGNPIN_API_KEY密钥DesignPin project-scoped API key. Generate at https://designpin.pro under Project Settings. Required for uploadVersion and listComments tools; not required for createShareLink.
DESIGNPIN_PROJECT_IDFirestore project document ID the API key is scoped to. Required when using uploadVersion or listComments.
DESIGNPIN_BASE_URLAPI base URL. Defaults to https://designpin.pro. Override only for testing against a staging or alternate host.

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@designpin/mcp-server0.1.2

工具

3

收录的工具列表 · 更新于 2 周前

参数类型必填说明
htmlstring是要分享的完整 HTML 文档
titlestring是分享内容的显示名称,最多 80 个字符
authorNamestring否评审页面上显示的作者名称(可选)

详细介绍

DesignPin MCP 服务

一款 MCP 服务,可让任何 AI 助手将 HTML 原型推送到 DesignPin,供团队审核并读取审核者的反馈。

功能简介

DesignPin 是一款用于审核 HTML 原型的工具,支持锚定到 DOM 元素的评论。此软件包将 DesignPin REST API 封装为 Model Context Protocol 服务,向任何兼容 MCP 的 AI 客户端提供三种工具:createShareLink、uploadVersion 和 listComments。

完成配置后,你的 AI 助手(Claude Desktop、Cursor、VS Code(Copilot)、Gemini CLI 或任何其他兼容 MCP 的客户端)就能将生成的 HTML 原型发布为可分享的审核链接,获取审核者的评论并据此修改,还能将迭代版本推送为新版本,所有操作都可以在生成设计的同一段对话中完成。

ChatGPT 用户须知: ChatGPT 目前不支持 MCP 服务。请改用 直接调用 REST API 的方式,通过 Custom GPT Actions 操作,无需 MCP 服务。

安装和运行

MCP 客户端会调用此服务;正常使用时无需直接运行。最简单的方式是通过 npx 调用,它会获取并运行服务,无需全局安装:

npx -y @designpin/mcp-server --api-key dp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --project-id proj_example_abc123

对于大多数工作流,你需要在 MCP 客户端的配置文件中设置此项,而不是手动运行;请参阅下方的客户端配置示例。

验证安装是否成功:

npx -y @designpin/mcp-server --version
# → 0.1.0

npx -y @designpin/mcp-server --help
# → usage info

获取 API 密钥

  1. 打开 designpin.pro 并登录。
  2. 打开任意项目(或创建一个项目)。
  3. 点击项目标题栏中的 API & Integrations。
  4. 点击 Generate new key,为密钥命名(例如“Claude Desktop”)。
  5. 立即复制密钥——密钥只会显示一次,之后无法找回。

每个密钥仅适用于一个项目。请为不同的客户端或使用场景分别生成密钥,以便单独撤销。

配置

支持 CLI 标志和环境变量。两者同时存在时,以标志为准。

CLI 标志环境变量必需默认值说明
--api-keyDESIGNPIN_API_KEY用于 uploadVersion、listComments—你的 dp_live_... API 密钥
--project-idDESIGNPIN_PROJECT_ID用于 uploadVersion—此密钥适用的项目 ID
--base-urlDESIGNPIN_BASE_URL否https://designpin.proAPI 基础 URL(可覆盖以进行测试)
--help—否—显示用法并退出
--version—否—输出版本并退出

安全提示: 在多用户系统上,CLI 标志会显示在 ps 命令的输出中。在共享设备上,建议使用环境变量。

工具

createShareLink

为 HTML 原型创建公开审核链接。无需设置项目——会创建一个全新的临时项目。每个 IP 每小时最多请求 10 次。

输入类型必需说明
htmlstring是要分享的完整 HTML 文档
titlestring是分享内容的显示名称,最多 80 个字符
authorNamestring否审核页面上显示的作者姓名

返回: 包含 url、reviewToken、projectId、moduleId 和 versionId 的 JSON。

给 AI 助手的提示词示例:

“把这段 HTML 制作成 DesignPin 分享链接,标题为‘Landing page hero V3’。”

uploadVersion

将新的 HTML 版本上传到现有的 DesignPin 模块。versionNumber 会自动递增。需要使用配置中的 API 密钥和 projectId,以及用户提供的 moduleId。

输入类型必需说明
htmlstring是新版本的完整 HTML
moduleIdstring是配置项目中的目标模块
descriptionstring否显示在侧边栏中的版本说明

返回: 包含 url、versionId 和 versionNumber 的 JSON。

提示词示例:

“将这段修改后的 HTML 作为新版本推送到模块 mod_example_def456,说明为‘处理 pin #3 的对比度反馈’。”

listComments

获取 DesignPin 模块特定版本中可见的评论。采用与网页 UI 一致的按时间顺序截断语义:如果评论的来源版本是 V 或更早版本,则该评论在版本 V 中可见。

输入类型必填描述
moduleIdstring是模块 ID
versionIdstring是要查看评论的特定版本

返回: JSON,包含 comments 数组和类似 "3 open, 1 resolved" 的 summary 字符串。

提示词示例:

"获取模块 mod_example_def456 在版本 ver_example_ghi789 中的评论,并告诉我哪些问题阻碍了审批。"

客户端配置示例

Claude Desktop

编辑 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或 %APPDATA%\Claude\claude_desktop_config.json(Windows):

{
  "mcpServers": {
    "designpin": {
      "command": "npx",
      "args": ["-y", "@designpin/mcp-server"],
      "env": {
        "DESIGNPIN_API_KEY": "dp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "DESIGNPIN_PROJECT_ID": "proj_example_abc123"
      }
    }
  }
}

保存后重启 Claude Desktop。

Cursor

编辑 ~/.cursor/mcp.json:

{
  "mcpServers": {
    "designpin": {
      "command": "npx",
      "args": ["-y", "@designpin/mcp-server"],
      "env": {
        "DESIGNPIN_API_KEY": "dp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "DESIGNPIN_PROJECT_ID": "proj_example_abc123"
      }
    }
  }
}

保存后重新加载 Cursor。

VS Code(Copilot with MCP)

添加到 VS Code 用户设置 JSON 或工作区的 .vscode/mcp.json:

{
  "servers": {
    "designpin": {
      "command": "npx",
      "args": ["-y", "@designpin/mcp-server"],
      "env": {
        "DESIGNPIN_API_KEY": "dp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "DESIGNPIN_PROJECT_ID": "proj_example_abc123"
      }
    }
  }
}
Gemini CLI 扩展

编辑 Gemini CLI 配置(路径因版本而异)。环境变量式和标志式配置均可使用;此处展示标志式配置:

{
  "mcpServers": {
    "designpin": {
      "command": "npx",
      "args": [
        "-y", "@designpin/mcp-server",
        "--api-key", "dp_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "--project-id", "proj_example_abc123"
      ]
    }
  }
}

对话示例

You:  Generate a pricing page with three tiers (Free, Pro $12, Team $29).
      Push it to DesignPin so my team can review.

AI:   [generates HTML, calls createShareLink]
      Share link created. Send this to your team:
      https://designpin.pro/review/EXAMPLE_TOKEN_xyz

      Project: proj_example_abc123
      Module:  mod_example_def456
      Version: ver_example_ghi789

[team reviews and leaves 4 comments]

You:  Pull the feedback from module mod_example_def456 at version
      ver_example_ghi789 and address the must-fix comments.

AI:   [calls listComments]
      Open comments (4):
      - P0 Pin #1 "CTA contrast fails WCAG AA on the Pro tier"
      - P1 Pin #2 "Pricing hidden until hover — make always visible"
      - P1 Pin #3 "Annual toggle is ambiguous — show savings %"
      - P2 Pin #4 "Logo could link back to homepage"

      I'll regenerate the HTML with the two P0/P1 issues addressed.

You:  Push the revision.

AI:   [generates updated HTML, calls uploadVersion]
      v2 uploaded. Same review URL — your team can compare versions.

直接调用 REST API

如果你想在不使用 MCP 服务的情况下调用 DesignPin API,可在以下地址获取 OpenAPI 3.1 规范:

https://designpin.pro/openapi.json

将其导入 Postman、生成客户端 SDK,或直接用于 ChatGPT Custom GPT Actions。

链接

许可证

MIT © 2026 Omprakash Jha

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。