Token导航 LogoToken导航TokenDH.com
gsap MCP logo
开发工具stdio官方级别未说明来源级核验

gsap MCP

MCP Server

vitest

一个用于生成GSAP动画代码的MCP服务器,无运行时依赖,纯静态代码生成。

工具数

18

提示词数

0

GitHub Stars

0

资源数

0
TypeScriptClaude开发工具Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

bl00dclot

提供方

bl00dclot

最后核验

2026/5/17 20:20

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx vitest run

详细介绍

gsap mcp

MCP服务器用于生成GSAP动画代码——无运行时依赖性,纯静态代码生成。

安装

npm install
npm run build

配置

添加到您的Claude桌面配置(~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "gsap": {
      "command": "node",
      "args": ["/absolute/path/to/gsap-mcp/dist/index.js"]
    }
  }
}

工具(18)

核心(4)

工具描述示例输入
gsap_tween生成gsap.to/from/fromTo tween{ "target": ".box", "method": "to", "properties": { "opacity": 1, "x": 100 } }
gsap_timeline构建多步骤GSAP时间表{ "steps": [{ "target": ".a", "method": "to", "properties": { "x": 100 } }] }
gsap_easing查找并预览GSAP缓解功能{ "action": "lookup", "ease": "power2.out" }
gsap_preset生成常见的动画预设(fadeIn、slideUp等){ "preset": "fadeIn", "target": ".hero" }

插件(7)

工具描述示例输入
gsap_scrolltriggerScrollTrigger驱动的滚动动画{ "target": ".section", "mode": "standalone", "trigger": ".section" }
gsap_splittext分割文本字符/单词/行动画{ "target": ".heading", "splitType": "chars", "animation": "from" }
gsap_morphsvg使用MorphSVGPlugin进行SVG形状变形{ "target": "#shape1", "shape": "#shape2" }
gsap_drawsvgSVG笔划绘制动画{ "target": ".path", "from": "0%", "to": "100%" }
gsap_motionpath沿运动路径设置元素动画{ "target": ".dot", "path": "#circuit" }
gsap_flipFLIP动画状态转换{ "targets": ".cards", "action": "full" }
gsap_textplugin文本替换和混乱效果{ "target": ".text", "text": "Hello!", "type": "replace" }

开发人员(7)

工具描述示例输入
gsap_analyze性能、最佳实践、可访问性的静态分析{ "code": "gsap.to('.box', { width: 100 })" }
gsap_controls播放/暂停/反转/寻道控制代码{ "action": "play", "target": "timeline" }
gsap_utilitiesGSAP实用方法(夹具、贴图范围、捕捉等){ "method": "clamp", "params": { "min": 0, "max": 100, "value": 150 } }
gsap_matchmedia使用gsap.matchMedia()的响应式动画{ "breakpoints": [{ "name": "Mobile", "query": "(max-width: 768px)", "animations": [] }] }
gsap_debug调试工具:标记、GSDevTools、日志记录、慢动作{ "action": "slowmo", "options": { "timeScale": 0.25 } }
gsap_performanceFPS监控、代码优化、帧分析{ "action": "monitor", "options": { "metrics": ["fps"] } }
gsap_framework_integrationReact/Vue/Angular/Svelte的框架特定代码{ "framework": "react", "type": "hook" }

建筑

gsap-mcp/
├── src/
│   ├── index.ts                  # Entry point — registers all 18 tools
│   ├── generators/
│   │   ├── code-builder.ts       # Fluent builder for imports + body assembly
│   │   └── templates.ts          # formatGsapVars, formatPosition, wrapInFunction
│   ├── knowledge/
│   │   ├── easings.ts            # Easing function database
│   │   ├── properties.ts         # CSS/GSAP property mappings + performance data
│   │   └── best-practices.ts     # Optimization rules, performance tips, pitfalls
│   └── tools/
│       ├── core/                 # Tween, timeline, easing, presets
│       ├── plugins/              # ScrollTrigger, SplitText, MorphSVG, etc.
│       └── dev/                  # Analyze, controls, utilities, debug, etc.
├── tests/                        # Mirrors src/ structure, 23 test files
├── dist/                         # Built output (tsc)
├── package.json
└── tsconfig.json

关键设计决策:

  • 无GSAP运行时依赖关系 --服务器使用静态知识库和模板构建器生成代码字符串。它从不自行导入或执行GSAP。
  • 可测试的核心功能 --每个工具都导出一个 generateXxxCode(params) 无需MCP基础设施即可直接测试的功能。
  • MCP SDK模式 --每个工具导出一个 registerXxxTool(server) 调用的函数 server.registerTool() 使用Zod v4输入模式。
  • 代码生成器 --流畅的构建器,管理导入、插件注册和正文行,然后用 build() (完整)或 buildSnippet() (仅限身体)。

发展

# Run all tests
npx vitest run

# Watch mode
npx vitest

# Type-check
npx tsc --noEmit

# Build
npx tsc

# Dev mode (tsx)
npx tsx src/index.ts

添加新工具

  1. 创建 src/tools//.ts
  2. 出口 generateXxxCode(params): XxxResult (可测试的核心逻辑)
  3. 出口 registerXxxTool(server: McpServer) (MCP注册)
  4. 添加导入+注册调用 src/index.ts
  5. 创建 tests/tools/.test.ts
  6. npx tsc --noEmit && npx vitest run

许可证

麻省理工学院

目录标签

目录标签

TypeScriptClaude开发工具动画生成本地部署前端开发代码工具GSAP静态代码

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

vitest

工具数量(toolCount,工具数)

18

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP