Skip to main content
Glama

design-parts-mcp

把一个「设计零件库」暴露成本地 stdio MCP server:AI 编码工具(Claude Desktop / Cursor / Codex / Trae 等)可以直接检索并取用可打开、可复刻的交互与动效零件。库里每篇笔记是一个自包含的 index.html 活笔记——零件能学能搬,先打开看它正在转的样子。

默认内置一份可分享快照(library/);如果你本地有自己的 design-notes 库,用 DESIGN_NOTES_PATH 指过去即可,server 会直接读真源。

本地源码分发预览

另有经过筛选的源码分发目录,目前包含跟手阅读面板和轻按反馈按钮。网站、Registry 和 Agent Skill 使用同一份构建结果,不需要先配置 MCP 才能获取这两件零件。

npm run build:distribution
npm run preview:distribution

预览默认运行在本机 http://127.0.0.1:4179,尚未公开部署。构建可以使用仓库内的分发快照,不依赖原设计资料目录。新增零件、来源审核、安装保护与验收步骤见 AGENT_USAGE.md;正式选择清单在 .devin/distribution.json,不通过 sync 批量导出研究资料。

Related MCP server: obsidian-mcp

三个工具

工具

入参

返回

search_parts

query(必填,关键词或一句话;空字符串 = 全量发明表)

命中任一词的条目,命中越多排越前:发明表(这页是什么、什么时候用)、零件表(要做哪一块打开哪一页哪一处)、页尾「可拆」锚点、README 命中行;每条含 type / note / anchor / path / description / matched;unmatched 列出整库都没命中的词

get_part

id(必填,如 "bento#chart"、"spine#dot" 或笔记名 "bento")

所在笔记、锚点的「可拆」说明、提取出的关键参数(时长/缓动/尺寸/频率)、该笔记 index.html 的绝对路径(直接打开细读源码);笔记名形式返回全部可拆锚点列表

get_source

name(必填,如 "bento")

该笔记 README 全文(来源 URL、原版机制逐条记录、可学/不学/启示)+ 提取出的来源 URL 列表

接入

Claude Desktop

claude_desktop_config.json(菜单 → Settings → Developer → Edit Config):

{
  "mcpServers": {
    "design-parts": {
      "command": "npx",
      "args": ["-y", "github:yishu-ziyu/design-parts-mcp"],
      "env": {
        "DESIGN_NOTES_PATH": "/path/to/your/design-notes"
      }
    }
  }
}

Cursor / Codex / 其它 MCP 客户端

mcp.json:

{
  "mcpServers": {
    "design-parts": {
      "command": "npx",
      "args": ["-y", "github:yishu-ziyu/design-parts-mcp"],
      "env": {
        "DESIGN_NOTES_PATH": "/path/to/your/design-notes"
      }
    }
  }
}

本地 clone 运行时把 args 换成:["node", "/path/to/design-parts-mcp/server/index.js"]。

DESIGN_NOTES_PATH

  • 未设置:用仓库内置 library/ 快照(开箱即用)。

  • 设置后:指向你的 design-notes 库根目录(其下有 living/INDEX.md 与 living/<name>/index.html),直接读真源,改动即时生效。

用自己的库

库结构约定:

design-notes/
  living/
    INDEX.md          # 检索入口:## 发明 表 + ## 零件 表
    <name>/
      index.html      # 自包含活笔记;页尾可有 <h3>可拆</h3> + <dl>(#anchor → 参数说明)
      README.md       # 可选:来源 URL、机制记录、可学/不学

INDEX.md 表格行里的链接指向 living/<name>/index.html#anchor;死链行会被自动剔除并打 stderr 警告,不会挡住其余检索。

贡献零件

欢迎把自己复刻的活笔记按上面的结构加进你的库;要合入本仓库内置快照,提 PR 前:

  1. npm run sync(从 DESIGN_NOTES_PATH 刷新 library/,默认 ~/Documents/design-notes);

  2. 新笔记要有 index.html(页尾写「可拆」锚点段)和 README(来源 URL + 机制记录);

  3. npm test 全绿(真实 stdio 协议测试,快照与真源两条路径各跑一遍);

  4. README/快照里不得含本地绝对路径、真名、私有仓库名(sync 会自动清洗,洗不净的会跳过并警告)。

使用纪律

零件可以学、可以搬进你自己的实现,但:

  • 不要原样照抄他人 UI。零件是「机制 + 参数」,不是成品皮:文案、品牌、配色、内容换成你自己的。

  • 不要冒用来源作品。每个零件的 README 记录了来源 URL 与机制考据,引用时注明出处;来源作者的风格签名(logo、签名图、专有插画)一律不抄。

  • 产品落地时先打开活笔记看它正在转的样子,再决定要不要这一块——截图只看得到三分之一。

Available Tools

3 tools
get_partA

取一个设计零件的完整说明。id 传零件锚点(如 "bento#chart"、"spine#dot"、"triage#toolbar")或笔记名(如 "bento")。锚点形式返回:所在笔记、锚点的「可拆」说明文本、提取出的关键参数(时长/缓动/尺寸/频率)、该笔记 index.html 的绝对路径(直接打开细读源码)。笔记名形式返回:笔记摘要、全部可拆锚点列表、零件表条目。

Inputs: id (required).

get_sourceA

取某篇设计笔记的来源信息:README.md 全文(来源 URL、原版机制逐条记录、可学/不学/启示)、提取出的来源 URL 列表。用于查看零件学自哪个原版作品及其机制考据。

Inputs: name (required).

search_partsA

检索设计零件库:发明表(每篇活笔记是什么、什么时候用)+ 零件表(要做哪一块 UI,打开哪一页哪一处)+ 各笔记页尾「可拆」锚点 + 各笔记 README。query 为空字符串时返回全量发明表;否则返回匹配条目(type: invention/part/detachable/readme,含 note、anchor、path、description)。示例 query:"镜头"、"工具栏"、"tooltip"、"批量选择"、"手风琴"。中文关键词效果最好。

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 3 tools

    Disambiguation5/5

    The three tools have clearly distinct purposes: search_parts discovers/retrieves matching entries, get_part retrieves a specific part's details, and get_source retrieves provenance/README information. There is no meaningful overlap in their intended use.

    Naming Consistency5/5

    All tool names follow a consistent snake_case verb_noun pattern: search_parts, get_part, get_source. The plural/singular distinction is natural and predictable.

    Tool Count5/5

    Three tools are well-scoped for a read-only design parts reference library: discovery, part detail, and source provenance. Each tool earns its place without excess.

    Completeness4/5

    The surface covers search, part retrieval, and source lookup well. A minor gap is that empty search returns only the full invention table, not a direct bulk list of all parts/anchors, though these can be reached by iterating notes.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for AI agents to read, write, and organize notes in a local-first, human-in-the-loop note-taking app.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that gives AI agents read and write access to a folder of Markdown notes, supporting full-text search, reading, listing, and writing notes. It is deliberately small, with no dependencies beyond the MCP SDK, and includes proper path traversal protection.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to search and read local Markdown notes through MCP tools for file listing, keyword matching, summaries, and section extraction, without uploading files to third-party services. It supports stdio and Streamable HTTP access with API key authentication and SQLite call monitoring.
      MIT