@wheelfor/mcp 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/LICENSE +21 -0
- package/README.md +126 -0
- package/dist/index.js +221 -0
- package/package.json +27 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 wheelfor.com
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# @wheelfor/mcp
|
|
2
|
+
|
|
3
|
+
MCP server for [wheelfor.com](https://wheelfor.com) — create, spin, and manage shareable decision wheels from any MCP-compatible AI client.
|
|
4
|
+
|
|
5
|
+
Works with Claude Desktop, Cursor, Windsurf, VS Code, and any other MCP host. No account required.
|
|
6
|
+
|
|
7
|
+
## Tools
|
|
8
|
+
|
|
9
|
+
| Tool | Description |
|
|
10
|
+
|------|-------------|
|
|
11
|
+
| `create_wheel` | Create a new spinning wheel from a list of options |
|
|
12
|
+
| `spin_wheel` | Spin an existing wheel and get a random result with a shareable URL |
|
|
13
|
+
| `update_wheel` | Update a wheel's choices, name, or theme using its edit key |
|
|
14
|
+
| `decide` | Pick randomly from a list and create a permanent wheel in one step |
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
### Claude Desktop
|
|
19
|
+
|
|
20
|
+
Add to `claude_desktop_config.json`:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"wheelfor": {
|
|
26
|
+
"command": "npx",
|
|
27
|
+
"args": ["-y", "@wheelfor/mcp"]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Mac:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
34
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
35
|
+
|
|
36
|
+
### Cursor
|
|
37
|
+
|
|
38
|
+
Add to `.cursor/mcp.json` in your project or `~/.cursor/mcp.json` globally:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"wheelfor": {
|
|
44
|
+
"command": "npx",
|
|
45
|
+
"args": ["-y", "@wheelfor/mcp"]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Windsurf
|
|
52
|
+
|
|
53
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"mcpServers": {
|
|
58
|
+
"wheelfor": {
|
|
59
|
+
"command": "npx",
|
|
60
|
+
"args": ["-y", "@wheelfor/mcp"]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Usage
|
|
67
|
+
|
|
68
|
+
Once connected, ask your AI assistant:
|
|
69
|
+
|
|
70
|
+
- *"I can't decide between React, Vue, or Svelte — pick one"*
|
|
71
|
+
- *"Create a wheel for our team retro: Start, Stop, Continue, More Of, Less Of"*
|
|
72
|
+
- *"Spin wheelfor.com/wheel/lunch-spots"*
|
|
73
|
+
- *"Add burgers to my lunch-spots wheel"* (requires edit key from creation)
|
|
74
|
+
|
|
75
|
+
## Tool Reference
|
|
76
|
+
|
|
77
|
+
### `create_wheel`
|
|
78
|
+
|
|
79
|
+
Creates a new wheel on wheelfor.com.
|
|
80
|
+
|
|
81
|
+
| Parameter | Type | Required | Description |
|
|
82
|
+
|-----------|------|----------|-------------|
|
|
83
|
+
| `name` | string | ✓ | Short title |
|
|
84
|
+
| `choices` | string[] | ✓ | Items on the wheel |
|
|
85
|
+
| `description` | string | ✓ | One sentence describing the wheel |
|
|
86
|
+
| `theme` | string | ✓ | Visual theme (see below) |
|
|
87
|
+
| `longDescription` | string | | 2–3 paragraphs on use cases |
|
|
88
|
+
| `usageHint` | string | | Brief instruction for visitors |
|
|
89
|
+
| `choiceNounSingular` | string | | Word for one choice (e.g. `"restaurant"`) |
|
|
90
|
+
| `choiceNounPlural` | string | | Plural form (e.g. `"restaurants"`) |
|
|
91
|
+
|
|
92
|
+
**Themes:** `Fresh Air` · `Popcorn` · `Playground` · `Sprinkles` · `Chalkboard` · `Buddy System` · `Garden Party` · `Marshmallow`
|
|
93
|
+
|
|
94
|
+
Returns the wheel URL and an edit key for future updates.
|
|
95
|
+
|
|
96
|
+
### `spin_wheel`
|
|
97
|
+
|
|
98
|
+
| Parameter | Type | Required | Description |
|
|
99
|
+
|-----------|------|----------|-------------|
|
|
100
|
+
| `slug` | string | ✓ | Wheel slug or full URL |
|
|
101
|
+
|
|
102
|
+
Returns the winning choice and a shareable result URL.
|
|
103
|
+
|
|
104
|
+
### `update_wheel`
|
|
105
|
+
|
|
106
|
+
| Parameter | Type | Required | Description |
|
|
107
|
+
|-----------|------|----------|-------------|
|
|
108
|
+
| `slug` | string | ✓ | Wheel slug |
|
|
109
|
+
| `editKey` | string | ✓ | Edit key from creation |
|
|
110
|
+
| `name` | string | | New title |
|
|
111
|
+
| `choices` | string[] | | New choices list |
|
|
112
|
+
| `theme` | string | | New theme |
|
|
113
|
+
| `description` | string | | New description |
|
|
114
|
+
|
|
115
|
+
### `decide`
|
|
116
|
+
|
|
117
|
+
| Parameter | Type | Required | Description |
|
|
118
|
+
|-----------|------|----------|-------------|
|
|
119
|
+
| `options` | string[] | ✓ | Options to choose from |
|
|
120
|
+
| `topic` | string | | What the decision is about |
|
|
121
|
+
|
|
122
|
+
Picks a random option immediately, then creates a permanent wheel for future spins.
|
|
123
|
+
|
|
124
|
+
## License
|
|
125
|
+
|
|
126
|
+
MIT
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
5
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
|
+
import {
|
|
7
|
+
CallToolRequestSchema,
|
|
8
|
+
ListToolsRequestSchema
|
|
9
|
+
} from "@modelcontextprotocol/sdk/types.js";
|
|
10
|
+
var API = "https://wheelfor.com/api";
|
|
11
|
+
var THEMES = [
|
|
12
|
+
"Fresh Air",
|
|
13
|
+
"Popcorn",
|
|
14
|
+
"Playground",
|
|
15
|
+
"Sprinkles",
|
|
16
|
+
"Chalkboard",
|
|
17
|
+
"Buddy System",
|
|
18
|
+
"Garden Party",
|
|
19
|
+
"Marshmallow"
|
|
20
|
+
];
|
|
21
|
+
var server = new Server(
|
|
22
|
+
{ name: "wheelfor", version: "1.0.0" },
|
|
23
|
+
{ capabilities: { tools: {} } }
|
|
24
|
+
);
|
|
25
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
26
|
+
tools: [
|
|
27
|
+
{
|
|
28
|
+
name: "create_wheel",
|
|
29
|
+
description: "Create a shareable spinning decision wheel on wheelfor.com from a list of options",
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
name: { type: "string", description: "Short title (e.g. 'Team Lunch Spots')" },
|
|
34
|
+
choices: {
|
|
35
|
+
type: "array",
|
|
36
|
+
items: { type: "string" },
|
|
37
|
+
description: "Items on the wheel"
|
|
38
|
+
},
|
|
39
|
+
description: { type: "string", description: "One sentence describing the wheel" },
|
|
40
|
+
theme: {
|
|
41
|
+
type: "string",
|
|
42
|
+
enum: THEMES,
|
|
43
|
+
description: "Visual theme \u2014 Fresh Air (nature), Popcorn (fun), Playground (bold), Sprinkles (celebration), Chalkboard (education), Buddy System (teams), Garden Party (elegant), Marshmallow (cozy)"
|
|
44
|
+
},
|
|
45
|
+
longDescription: {
|
|
46
|
+
type: "string",
|
|
47
|
+
description: "2\u20133 paragraphs on use cases (used for SEO)"
|
|
48
|
+
},
|
|
49
|
+
usageHint: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "Brief instruction for visitors (e.g. 'Spin to pick a random lunch spot')"
|
|
52
|
+
},
|
|
53
|
+
choiceNounSingular: { type: "string", description: "Word for one choice (e.g. 'restaurant')" },
|
|
54
|
+
choiceNounPlural: { type: "string", description: "Plural form (e.g. 'restaurants')" }
|
|
55
|
+
},
|
|
56
|
+
required: ["name", "choices", "description", "theme"]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "spin_wheel",
|
|
61
|
+
description: "Spin an existing wheelfor.com wheel and get a random result with a shareable URL",
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: "object",
|
|
64
|
+
properties: {
|
|
65
|
+
slug: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Wheel slug or full URL (e.g. 'lunch-spots' or 'https://wheelfor.com/wheel/lunch-spots')"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
required: ["slug"]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "update_wheel",
|
|
75
|
+
description: "Update an existing wheelfor.com wheel using its edit key",
|
|
76
|
+
inputSchema: {
|
|
77
|
+
type: "object",
|
|
78
|
+
properties: {
|
|
79
|
+
slug: { type: "string", description: "Wheel slug" },
|
|
80
|
+
editKey: { type: "string", description: "Edit key from wheel creation" },
|
|
81
|
+
name: { type: "string" },
|
|
82
|
+
choices: { type: "array", items: { type: "string" } },
|
|
83
|
+
theme: { type: "string", enum: THEMES },
|
|
84
|
+
description: { type: "string" },
|
|
85
|
+
longDescription: { type: "string" },
|
|
86
|
+
usageHint: { type: "string" },
|
|
87
|
+
choiceNounSingular: { type: "string" },
|
|
88
|
+
choiceNounPlural: { type: "string" }
|
|
89
|
+
},
|
|
90
|
+
required: ["slug", "editKey"]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "decide",
|
|
95
|
+
description: "Pick randomly from a list of options and create a shareable wheel on wheelfor.com in one step",
|
|
96
|
+
inputSchema: {
|
|
97
|
+
type: "object",
|
|
98
|
+
properties: {
|
|
99
|
+
options: {
|
|
100
|
+
type: "array",
|
|
101
|
+
items: { type: "string" },
|
|
102
|
+
description: "Options to choose from"
|
|
103
|
+
},
|
|
104
|
+
topic: {
|
|
105
|
+
type: "string",
|
|
106
|
+
description: "What the decision is about (e.g. 'Lunch', 'Sprint activity')"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
required: ["options"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}));
|
|
114
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
115
|
+
const { name, arguments: args } = request.params;
|
|
116
|
+
if (!args) throw new Error("Missing arguments");
|
|
117
|
+
switch (name) {
|
|
118
|
+
case "create_wheel": {
|
|
119
|
+
const res = await fetch(`${API}/wheels`, {
|
|
120
|
+
method: "POST",
|
|
121
|
+
headers: { "Content-Type": "application/json" },
|
|
122
|
+
body: JSON.stringify({
|
|
123
|
+
name: args.name,
|
|
124
|
+
choices: args.choices.join("\n"),
|
|
125
|
+
description: args.description,
|
|
126
|
+
theme: args.theme,
|
|
127
|
+
longDescription: args.longDescription ?? "",
|
|
128
|
+
usageHint: args.usageHint ?? "",
|
|
129
|
+
choiceNounSingular: args.choiceNounSingular ?? "option",
|
|
130
|
+
choiceNounPlural: args.choiceNounPlural ?? "options"
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
const data = await res.json();
|
|
134
|
+
if (!data.success) throw new Error(data.error ?? "Failed to create wheel");
|
|
135
|
+
return {
|
|
136
|
+
content: [
|
|
137
|
+
{
|
|
138
|
+
type: "text",
|
|
139
|
+
text: `Wheel created: https://wheelfor.com/wheel/${data.slug}
|
|
140
|
+
Edit key: ${data.editKey}`
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
case "spin_wheel": {
|
|
146
|
+
const raw = args.slug;
|
|
147
|
+
const slug = raw.replace(/^https?:\/\/[^/]+\/wheel\//, "").replace(/\/.*$/, "");
|
|
148
|
+
const res = await fetch(`${API}/wheels/${slug}/spin`);
|
|
149
|
+
const data = await res.json();
|
|
150
|
+
return {
|
|
151
|
+
content: [
|
|
152
|
+
{
|
|
153
|
+
type: "text",
|
|
154
|
+
text: `The wheel landed on: **${data.result}**
|
|
155
|
+
Share: ${data.url}`
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
case "update_wheel": {
|
|
161
|
+
const body = {
|
|
162
|
+
wheelId: args.slug,
|
|
163
|
+
editKey: args.editKey
|
|
164
|
+
};
|
|
165
|
+
if (args.name) body.name = args.name;
|
|
166
|
+
if (args.choices) body.choices = args.choices.join("\n");
|
|
167
|
+
if (args.theme) body.theme = args.theme;
|
|
168
|
+
if (args.description) body.description = args.description;
|
|
169
|
+
if (args.longDescription) body.longDescription = args.longDescription;
|
|
170
|
+
if (args.usageHint) body.usageHint = args.usageHint;
|
|
171
|
+
if (args.choiceNounSingular) body.choiceNounSingular = args.choiceNounSingular;
|
|
172
|
+
if (args.choiceNounPlural) body.choiceNounPlural = args.choiceNounPlural;
|
|
173
|
+
const res = await fetch(`${API}/wheels`, {
|
|
174
|
+
method: "POST",
|
|
175
|
+
headers: { "Content-Type": "application/json" },
|
|
176
|
+
body: JSON.stringify(body)
|
|
177
|
+
});
|
|
178
|
+
const data = await res.json();
|
|
179
|
+
if (!data.success) throw new Error(data.error ?? "Failed to update wheel");
|
|
180
|
+
return {
|
|
181
|
+
content: [
|
|
182
|
+
{
|
|
183
|
+
type: "text",
|
|
184
|
+
text: `Wheel updated: https://wheelfor.com/wheel/${data.slug}`
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
case "decide": {
|
|
190
|
+
const options = args.options;
|
|
191
|
+
const picked = options[Math.floor(Math.random() * options.length)];
|
|
192
|
+
const topic = args.topic ?? "Decision";
|
|
193
|
+
const res = await fetch(`${API}/wheels`, {
|
|
194
|
+
method: "POST",
|
|
195
|
+
headers: { "Content-Type": "application/json" },
|
|
196
|
+
body: JSON.stringify({
|
|
197
|
+
name: topic,
|
|
198
|
+
choices: options.join("\n"),
|
|
199
|
+
description: `Random picker for ${topic.toLowerCase()}`,
|
|
200
|
+
theme: "Popcorn",
|
|
201
|
+
longDescription: "",
|
|
202
|
+
usageHint: "Spin to pick randomly",
|
|
203
|
+
choiceNounSingular: "option",
|
|
204
|
+
choiceNounPlural: "options"
|
|
205
|
+
})
|
|
206
|
+
});
|
|
207
|
+
const data = await res.json();
|
|
208
|
+
let text = `Picked: **${picked}**`;
|
|
209
|
+
if (data.success) {
|
|
210
|
+
text += `
|
|
211
|
+
Spin again: https://wheelfor.com/wheel/${data.slug}
|
|
212
|
+
Edit key: ${data.editKey}`;
|
|
213
|
+
}
|
|
214
|
+
return { content: [{ type: "text", text }] };
|
|
215
|
+
}
|
|
216
|
+
default:
|
|
217
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
var transport = new StdioServerTransport();
|
|
221
|
+
await server.connect(transport);
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@wheelfor/mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for wheelfor.com — create, spin, and manage decision wheels",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"wheelfor-mcp": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsup",
|
|
11
|
+
"dev": "tsup --watch"
|
|
12
|
+
},
|
|
13
|
+
"files": ["dist"],
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@modelcontextprotocol/sdk": "^1.29.0"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"tsup": "^8.5.0",
|
|
19
|
+
"typescript": "^5.9.2"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/wheelfor/mcp"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://wheelfor.com"
|
|
27
|
+
}
|