@easingwizard/mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Readme.md +215 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +18249 -0
- package/package.json +61 -0
package/Readme.md
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Easing Wizard MCP Server
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server for the [Easing Wizard](https://easingwizard.com). This server enables AI assistants to generate various CSS easing curves: Bézier, Spring, Bounce, Wiggle, and Overshoot.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Preset curves**: Access predefined easing curves filtered by type
|
|
8
|
+
- **Bézier curves**: Create custom cubic Bézier curves with control points
|
|
9
|
+
- **Spring curves**: Physics-based spring animations with mass, stiffness, and damping
|
|
10
|
+
- **Bounce curves**: Bouncing animations with configurable bounces and damping
|
|
11
|
+
- **Wiggle curves**: Oscillating animations with configurable wiggles and damping
|
|
12
|
+
- **Overshoot curves**: Curves that overshoot the target before settling
|
|
13
|
+
|
|
14
|
+
## Setup
|
|
15
|
+
|
|
16
|
+
### Claude Desktop
|
|
17
|
+
|
|
18
|
+
Add to your `claude_desktop_config.json`:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"easingwizard": {
|
|
24
|
+
"command": "npx",
|
|
25
|
+
"args": ["@easingwizard/mcp-server"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### VS Code
|
|
32
|
+
|
|
33
|
+
Add to your MCP configuration `.vscode/mcp.json`:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"servers": {
|
|
38
|
+
"easingwizard": {
|
|
39
|
+
"command": "npx",
|
|
40
|
+
"args": ["@easingwizard/mcp-server"]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Other MCP Clients
|
|
47
|
+
|
|
48
|
+
For other MCP-compatible applications, use the standard configuration format:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"easingwizard": {
|
|
54
|
+
"command": "npx",
|
|
55
|
+
"args": ["@easingwizard/mcp-server"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Available Tools
|
|
62
|
+
|
|
63
|
+
The MCP server provides the following tools for AI assistants:
|
|
64
|
+
|
|
65
|
+
### `getPresets`
|
|
66
|
+
Retrieves available preset easing curves, optionally filtered by type.
|
|
67
|
+
|
|
68
|
+
**Parameters:**
|
|
69
|
+
- `type` (optional): Filter by easing type (`BEZIER`, `SPRING`, `BOUNCE`, `WIGGLE`, `OVERSHOOT`)
|
|
70
|
+
|
|
71
|
+
**Example:**
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"name": "getPresets",
|
|
75
|
+
"arguments": {
|
|
76
|
+
"type": "BEZIER"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### `getCurveById`
|
|
82
|
+
Retrieves a specific easing curve by its unique ID.
|
|
83
|
+
|
|
84
|
+
**Parameters:**
|
|
85
|
+
- `id` (required): The unique ID of the easing curve
|
|
86
|
+
|
|
87
|
+
**Example:**
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"name": "getCurveById",
|
|
91
|
+
"arguments": {
|
|
92
|
+
"id": "0a0d.25e.1f.75g.914"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### `createBezierCurve`
|
|
98
|
+
Creates a custom cubic Bézier easing curve.
|
|
99
|
+
|
|
100
|
+
**Parameters:**
|
|
101
|
+
- `x1` (0-1): First control point X coordinate
|
|
102
|
+
- `y1` (-1 to 2): First control point Y coordinate
|
|
103
|
+
- `x2` (0-1): Second control point X coordinate
|
|
104
|
+
- `y2` (-1 to 2): Second control point Y coordinate
|
|
105
|
+
|
|
106
|
+
**Example:**
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"name": "createBezierCurve",
|
|
110
|
+
"arguments": {
|
|
111
|
+
"x1": 0.25,
|
|
112
|
+
"y1": 0.1,
|
|
113
|
+
"x2": 0.75,
|
|
114
|
+
"y2": 0.9
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### `createSpringCurve`
|
|
120
|
+
Creates a spring-based easing curve with physics parameters.
|
|
121
|
+
|
|
122
|
+
**Parameters:**
|
|
123
|
+
- `mass` (1-5): Mass of the spring system
|
|
124
|
+
- `stiffness` (0-100): Spring stiffness
|
|
125
|
+
- `damping` (0-100): Damping force
|
|
126
|
+
- `accuracy` (`LOW`, `MEDIUM`, `HIGH`, `ULTRA`): Calculation precision
|
|
127
|
+
|
|
128
|
+
**Example:**
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"name": "createSpringCurve",
|
|
132
|
+
"arguments": {
|
|
133
|
+
"mass": 2.5,
|
|
134
|
+
"stiffness": 50,
|
|
135
|
+
"damping": 50,
|
|
136
|
+
"accuracy": "HIGH"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### `createBounceCurve`
|
|
142
|
+
Creates a bouncing easing curve.
|
|
143
|
+
|
|
144
|
+
**Parameters:**
|
|
145
|
+
- `bounces` (1-10): Number of bounces
|
|
146
|
+
- `damping` (0-100): Bounce damping
|
|
147
|
+
- `accuracy` (`LOW`, `MEDIUM`, `HIGH`, `ULTRA`): Calculation precision
|
|
148
|
+
|
|
149
|
+
### `createWiggleCurve`
|
|
150
|
+
Creates an oscillating wiggle curve.
|
|
151
|
+
|
|
152
|
+
**Parameters:**
|
|
153
|
+
- `wiggles` (1-10): Number of oscillations
|
|
154
|
+
- `damping` (0-100): Oscillation damping
|
|
155
|
+
- `accuracy` (`LOW`, `MEDIUM`, `HIGH`, `ULTRA`): Calculation precision
|
|
156
|
+
|
|
157
|
+
### `createOvershootCurve`
|
|
158
|
+
Creates an overshoot easing curve.
|
|
159
|
+
|
|
160
|
+
**Parameters:**
|
|
161
|
+
- `style` (`IN`, `OUT`, `IN_OUT`): Animation style
|
|
162
|
+
- `mass` (1-5): Mass parameter
|
|
163
|
+
- `damping` (0-100): Damping force
|
|
164
|
+
- `accuracy` (`LOW`, `MEDIUM`, `HIGH`, `ULTRA`): Calculation precision
|
|
165
|
+
|
|
166
|
+
## Output Formats
|
|
167
|
+
|
|
168
|
+
All easing curve tools return comprehensive data including:
|
|
169
|
+
|
|
170
|
+
- **CSS Functions**: Ready-to-use `cubic-bezier()` or `linear()` functions
|
|
171
|
+
- **Tailwind CSS**: Compatible easing class names
|
|
172
|
+
- **SVG Paths**: Vector graphics for curve visualization
|
|
173
|
+
- **Metadata**: Unique IDs, timestamps, and reference links
|
|
174
|
+
|
|
175
|
+
## Development
|
|
176
|
+
|
|
177
|
+
If you want to contribute or modify the server:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Clone the repository
|
|
181
|
+
git clone https://github.com/roydigerhund/easingwizard.git
|
|
182
|
+
cd easingwizard/apps/mcp
|
|
183
|
+
|
|
184
|
+
# Install dependencies
|
|
185
|
+
pnpm install
|
|
186
|
+
|
|
187
|
+
# Build the server
|
|
188
|
+
pnpm build
|
|
189
|
+
|
|
190
|
+
# Test the server
|
|
191
|
+
pnpm watch
|
|
192
|
+
|
|
193
|
+
# Inspect the MCP tool
|
|
194
|
+
pnpm inspect
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Error Handling
|
|
198
|
+
|
|
199
|
+
The server provides detailed error messages for:
|
|
200
|
+
|
|
201
|
+
- Invalid parameter ranges or types
|
|
202
|
+
- Malformed curve configurations
|
|
203
|
+
- MCP protocol errors
|
|
204
|
+
- Internal processing failures
|
|
205
|
+
|
|
206
|
+
## License
|
|
207
|
+
|
|
208
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
209
|
+
|
|
210
|
+
## Links
|
|
211
|
+
|
|
212
|
+
- **Website**: [Easing Wizard](https://easingwizard.com)
|
|
213
|
+
- **Repository**: [GitHub](https://github.com/roydigerhund/easingwizard)
|
|
214
|
+
- **Issues**: [Report bugs](https://github.com/roydigerhund/easingwizard/issues)
|
|
215
|
+
- **MCP Protocol**: [Model Context Protocol](https://modelcontextprotocol.io)
|
package/dist/index.d.ts
ADDED