funifier-mcp 0.1.0 → 0.2.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 +182 -351
- package/datasource-funifier-docs/knowledge/guides/aggregates.md +152 -0
- package/datasource-funifier-docs/knowledge/guides/database-access.md +132 -0
- package/datasource-funifier-docs/knowledge/guides/java-entities.md +373 -0
- package/datasource-funifier-docs/knowledge/guides/java-libraries.md +330 -0
- package/datasource-funifier-docs/knowledge/guides/java-managers.md +509 -0
- package/datasource-funifier-docs/knowledge/guides/triggers-guide.md +271 -0
- package/datasource-funifier-docs/knowledge/index.md +121 -0
- package/datasource-funifier-docs/knowledge/modules/achievement.md +46 -0
- package/datasource-funifier-docs/knowledge/modules/action-log.md +88 -0
- package/datasource-funifier-docs/knowledge/modules/action.md +80 -0
- package/datasource-funifier-docs/knowledge/modules/auth.md +104 -0
- package/datasource-funifier-docs/knowledge/modules/avatar.md +28 -0
- package/datasource-funifier-docs/knowledge/modules/backup.md +40 -0
- package/datasource-funifier-docs/knowledge/modules/challenge.md +91 -0
- package/datasource-funifier-docs/knowledge/modules/compact.md +40 -0
- package/datasource-funifier-docs/knowledge/modules/competition.md +149 -0
- package/datasource-funifier-docs/knowledge/modules/crossword.md +41 -0
- package/datasource-funifier-docs/knowledge/modules/csv-data.md +30 -0
- package/datasource-funifier-docs/knowledge/modules/custom-object.md +53 -0
- package/datasource-funifier-docs/knowledge/modules/database.md +241 -0
- package/datasource-funifier-docs/knowledge/modules/folder.md +111 -0
- package/datasource-funifier-docs/knowledge/modules/kpi-formulas.md +23 -0
- package/datasource-funifier-docs/knowledge/modules/lastmile.md +45 -0
- package/datasource-funifier-docs/knowledge/modules/leaderboard.md +98 -0
- package/datasource-funifier-docs/knowledge/modules/level.md +83 -0
- package/datasource-funifier-docs/knowledge/modules/lottery.md +112 -0
- package/datasource-funifier-docs/knowledge/modules/marketplace.md +27 -0
- package/datasource-funifier-docs/knowledge/modules/mystery.md +82 -0
- package/datasource-funifier-docs/knowledge/modules/notification.md +40 -0
- package/datasource-funifier-docs/knowledge/modules/patterns.md +1096 -0
- package/datasource-funifier-docs/knowledge/modules/player.md +101 -0
- package/datasource-funifier-docs/knowledge/modules/point.md +67 -0
- package/datasource-funifier-docs/knowledge/modules/public.md +253 -0
- package/datasource-funifier-docs/knowledge/modules/question.md +136 -0
- package/datasource-funifier-docs/knowledge/modules/quiz.md +163 -0
- package/datasource-funifier-docs/knowledge/modules/scheduler.md +58 -0
- package/datasource-funifier-docs/knowledge/modules/security.md +169 -0
- package/datasource-funifier-docs/knowledge/modules/staging.md +28 -0
- package/datasource-funifier-docs/knowledge/modules/static-repo.md +41 -0
- package/datasource-funifier-docs/knowledge/modules/story.md +42 -0
- package/datasource-funifier-docs/knowledge/modules/studio-page.md +180 -0
- package/datasource-funifier-docs/knowledge/modules/swap.md +132 -0
- package/datasource-funifier-docs/knowledge/modules/team.md +75 -0
- package/datasource-funifier-docs/knowledge/modules/trigger.md +189 -0
- package/datasource-funifier-docs/knowledge/modules/upload.md +155 -0
- package/datasource-funifier-docs/knowledge/modules/virtual-good.md +99 -0
- package/datasource-funifier-docs/knowledge/modules/webhook.md +41 -0
- package/datasource-funifier-docs/knowledge/modules/websocket.md +41 -0
- package/datasource-funifier-docs/knowledge/modules/widget.md +42 -0
- package/datasource-funifier-docs/process-gtm-saas.md +143 -0
- package/datasource-funifier-docs/process-instagram.md +88 -0
- package/datasource-funifier-docs/process.md +1826 -0
- package/datasource-funifier-docs/readme.md +132 -0
- package/dist/cli/config-writers.d.ts +15 -0
- package/dist/cli/config-writers.d.ts.map +1 -0
- package/dist/cli/config-writers.js +55 -0
- package/dist/cli/config-writers.js.map +1 -0
- package/dist/cli/config-writers.test.d.ts +2 -0
- package/dist/cli/config-writers.test.d.ts.map +1 -0
- package/dist/cli/config-writers.test.js +55 -0
- package/dist/cli/config-writers.test.js.map +1 -0
- package/dist/cli/copy.d.ts +6 -0
- package/dist/cli/copy.d.ts.map +1 -0
- package/dist/cli/copy.js +63 -0
- package/dist/cli/copy.js.map +1 -0
- package/dist/cli/copy.test.d.ts +2 -0
- package/dist/cli/copy.test.d.ts.map +1 -0
- package/dist/cli/copy.test.js +94 -0
- package/dist/cli/copy.test.js.map +1 -0
- package/dist/cli/init.d.ts +2 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +167 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/paths.d.ts +7 -0
- package/dist/cli/paths.d.ts.map +1 -0
- package/dist/cli/paths.js +62 -0
- package/dist/cli/paths.js.map +1 -0
- package/dist/cli/paths.test.d.ts +2 -0
- package/dist/cli/paths.test.d.ts.map +1 -0
- package/dist/cli/paths.test.js +50 -0
- package/dist/cli/paths.test.js.map +1 -0
- package/dist/cli/platforms.d.ts +22 -0
- package/dist/cli/platforms.d.ts.map +1 -0
- package/dist/cli/platforms.js +50 -0
- package/dist/cli/platforms.js.map +1 -0
- package/dist/cli/prompts.d.ts +7 -0
- package/dist/cli/prompts.d.ts.map +1 -0
- package/dist/cli/prompts.js +49 -0
- package/dist/cli/prompts.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/bundle.js +94 -49
- package/dist/mcp/index.js +18 -1
- package/dist/mcp/index.js.map +1 -1
- package/package.json +4 -2
- package/skills/funifier-create-action/SKILL.md +86 -86
- package/skills/funifier-create-aggregate/SKILL.md +39 -0
- package/skills/funifier-create-challenge/SKILL.md +87 -87
- package/skills/funifier-create-custom-page/SKILL.md +39 -0
- package/skills/funifier-create-leaderboard/SKILL.md +87 -87
- package/skills/funifier-create-level/SKILL.md +86 -86
- package/skills/funifier-create-point/SKILL.md +86 -86
- package/skills/funifier-create-quiz/SKILL.md +86 -86
- package/skills/funifier-create-scheduler/SKILL.md +39 -0
- package/skills/funifier-create-trigger/SKILL.md +39 -0
- package/skills/funifier-create-virtual-good/SKILL.md +86 -86
- package/skills/funifier-debug/SKILL.md +90 -90
- package/skills/funifier-help/SKILL.md +85 -85
- package/skills/funifier-implement-frontend/SKILL.md +89 -89
- package/skills/funifier-index/SKILL.md +50 -50
package/README.md
CHANGED
|
@@ -1,351 +1,182 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
Funifier AI toolkit — API client, MCP server, and AI assistant skills for the [Funifier](https://funifier.com) gamification platform.
|
|
4
|
-
|
|
5
|
-
## What's included
|
|
6
|
-
|
|
7
|
-
| Component | Description |
|
|
8
|
-
|-----------|-------------|
|
|
9
|
-
| **API Client** | Pure Node.js client for the Funifier REST API (80+ methods, 18 resource types) |
|
|
10
|
-
| **MCP Server** | Model Context Protocol server exposing 8 tools + 3 prompts + documentation resources |
|
|
11
|
-
| **Skills** | 15 guided workflows for Claude Code, Codex,
|
|
12
|
-
| **Instructions** | Platform-specific instruction files (AGENTS.md, copilot-instructions.md, cursor rules) |
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
npm
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
## API Client (library usage)
|
|
184
|
-
|
|
185
|
-
```typescript
|
|
186
|
-
import { createAPIClient } from "@funifier-ai";
|
|
187
|
-
|
|
188
|
-
const api = createAPIClient({
|
|
189
|
-
apiKey: "your-api-key",
|
|
190
|
-
secretKey: "your-secret-key",
|
|
191
|
-
serverUrl: "https://your-instance.funifier.com",
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
// List all triggers
|
|
195
|
-
const triggers = await api.listTriggers();
|
|
196
|
-
|
|
197
|
-
// Execute an aggregate
|
|
198
|
-
const result = await api.executeAggregate("my-aggregate-id", {});
|
|
199
|
-
|
|
200
|
-
// Query any collection
|
|
201
|
-
const players = await api.queryCollection("player", { active: true }, { limit: 10 });
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
## Skills and Instructions
|
|
205
|
-
|
|
206
|
-
This package includes generated instruction files for multiple platforms. Each provides guided workflows, code quality standards, MCP tool routing, and documentation search.
|
|
207
|
-
|
|
208
|
-
### Claude Code
|
|
209
|
-
|
|
210
|
-
Install skills to your project:
|
|
211
|
-
|
|
212
|
-
```bash
|
|
213
|
-
cp -r node_modules/@funifier-ai/skills/* .claude/skills/
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
Invoke any skill with `/funifier-<name>`:
|
|
217
|
-
|
|
218
|
-
```
|
|
219
|
-
/funifier-create-trigger
|
|
220
|
-
/funifier-debug
|
|
221
|
-
/funifier-help
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
### Codex CLI and OpenCode
|
|
225
|
-
|
|
226
|
-
The generated `AGENTS.md` file provides instructions for Codex, OpenCode, and any agent that reads AGENTS.md.
|
|
227
|
-
|
|
228
|
-
**Codex CLI:**
|
|
229
|
-
|
|
230
|
-
```bash
|
|
231
|
-
cp node_modules/@funifier-ai/AGENTS.md .
|
|
232
|
-
codex "Create a trigger for player registration"
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
**OpenCode:**
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
cp node_modules/@funifier-ai/AGENTS.md .
|
|
239
|
-
# Add to .opencode.json:
|
|
240
|
-
# { "instructions": { "file": "./AGENTS.md" } }
|
|
241
|
-
opencode "Debug my scheduler"
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
See [PLATFORM_SETUP.md](docs/PLATFORM_SETUP.md) for full configuration details.
|
|
245
|
-
|
|
246
|
-
### GitHub Copilot
|
|
247
|
-
|
|
248
|
-
```bash
|
|
249
|
-
mkdir -p .github
|
|
250
|
-
cp node_modules/@funifier-ai/.github/copilot-instructions.md .github/
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
Copilot automatically applies `.github/copilot-instructions.md` to code suggestions, chat, and PR reviews.
|
|
254
|
-
|
|
255
|
-
### Continue IDE
|
|
256
|
-
|
|
257
|
-
```bash
|
|
258
|
-
mkdir -p .github
|
|
259
|
-
cp node_modules/@funifier-ai/.github/copilot-instructions.md .github/
|
|
260
|
-
# Configure ~/.continue/config.json with customInstructions and MCP
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
Continue (VS Code / JetBrains) supports full MCP integration. See [PLATFORM_SETUP.md](docs/PLATFORM_SETUP.md) for configuration.
|
|
264
|
-
|
|
265
|
-
### Cursor IDE
|
|
266
|
-
|
|
267
|
-
```bash
|
|
268
|
-
mkdir -p .cursor/rules
|
|
269
|
-
cp node_modules/@funifier-ai/.cursor/rules/funifier.mdc .cursor/rules/
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
Cursor automatically discovers and applies `.mdc` files in `.cursor/rules/` to all code generation and completions.
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
### Available Workflows
|
|
277
|
-
|
|
278
|
-
Each platform above provides access to these guided workflows:
|
|
279
|
-
|
|
280
|
-
| Skill | Description |
|
|
281
|
-
|-------|-------------|
|
|
282
|
-
| `funifier-help` | Documentation router and guidance |
|
|
283
|
-
| `funifier-debug` | Systematic debugging workflow |
|
|
284
|
-
| `funifier-create-trigger` | Create server-side event handlers |
|
|
285
|
-
| `funifier-create-scheduler` | Create scheduled Groovy jobs |
|
|
286
|
-
| `funifier-create-aggregate` | Create MongoDB aggregate pipelines |
|
|
287
|
-
| `funifier-create-custom-page` | Create Studio admin pages |
|
|
288
|
-
| `funifier-create-action` | Create trackable player actions |
|
|
289
|
-
| `funifier-create-challenge` | Create missions with rewards |
|
|
290
|
-
| `funifier-create-point` | Create point categories |
|
|
291
|
-
| `funifier-create-level` | Create level progression |
|
|
292
|
-
| `funifier-create-leaderboard` | Create rankings |
|
|
293
|
-
| `funifier-create-quiz` | Create quizzes |
|
|
294
|
-
| `funifier-create-virtual-good` | Create virtual stores |
|
|
295
|
-
| `funifier-implement-frontend` | Build frontend consuming Funifier API |
|
|
296
|
-
|
|
297
|
-
## Generated Files
|
|
298
|
-
|
|
299
|
-
When you install `@funifier-ai`, the package includes pre-generated instruction and skill files:
|
|
300
|
-
|
|
301
|
-
| File | Platforms | Purpose |
|
|
302
|
-
|------|-----------|---------|
|
|
303
|
-
| `skills/funifier-*/SKILL.md` | Claude Code | Guided workflows with system prompt, doc search, and steps |
|
|
304
|
-
| `AGENTS.md` | Codex, OpenCode | Agent routing, MCP tools, and skill index |
|
|
305
|
-
| `.github/copilot-instructions.md` | Copilot, Continue | Code quality standards and skill routing |
|
|
306
|
-
| `.cursor/rules/funifier.mdc` | Cursor | Development rules with YAML frontmatter |
|
|
307
|
-
|
|
308
|
-
All files embed:
|
|
309
|
-
- **Senior developer persona** (SOLID, DRY, KISS, YAGNI)
|
|
310
|
-
- **Skill routing** (which skill to use for each task)
|
|
311
|
-
- **MCP tool reference** (if server is configured)
|
|
312
|
-
- **Lexical search command** (to find relevant docs efficiently)
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
## Documentation
|
|
317
|
-
|
|
318
|
-
- **[docs/README.md](docs/)** — Complete documentation index
|
|
319
|
-
- **[docs/PLATFORM_SETUP.md](docs/PLATFORM_SETUP.md)** — Detailed setup for all platforms
|
|
320
|
-
- **[docs/QUICK_REFERENCE.md](docs/QUICK_REFERENCE.md)** — Copy-paste setup commands
|
|
321
|
-
- **[docs/INSTALL_EXAMPLES.md](docs/INSTALL_EXAMPLES.md)** — Real-world scenarios
|
|
322
|
-
- **[docs/MCP_SETUP.md](docs/MCP_SETUP.md)** — MCP configuration and troubleshooting
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
## Configuration
|
|
327
|
-
|
|
328
|
-
### Environment variables
|
|
329
|
-
|
|
330
|
-
| Variable | Description |
|
|
331
|
-
|----------|-------------|
|
|
332
|
-
| `FUNIFIER_API_KEY` | API key for authentication |
|
|
333
|
-
| `FUNIFIER_SECRET_KEY` | Secret key for authentication |
|
|
334
|
-
| `FUNIFIER_SERVER_URL` | Base URL of your Funifier instance |
|
|
335
|
-
| `FUNIFIER_DOCS_PATH` | Path to documentation files (optional) |
|
|
336
|
-
|
|
337
|
-
### funifier.json
|
|
338
|
-
|
|
339
|
-
Place in your project root for automatic configuration:
|
|
340
|
-
|
|
341
|
-
```json
|
|
342
|
-
{
|
|
343
|
-
"apiKey": "your-api-key",
|
|
344
|
-
"secretKey": "your-secret-key",
|
|
345
|
-
"serverUrl": "https://your-instance.funifier.com"
|
|
346
|
-
}
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
## License
|
|
350
|
-
|
|
351
|
-
MIT
|
|
1
|
+
# funifier-mcp
|
|
2
|
+
|
|
3
|
+
Funifier AI toolkit — API client, MCP server, and AI assistant skills for the [Funifier](https://funifier.com) gamification platform.
|
|
4
|
+
|
|
5
|
+
## What's included
|
|
6
|
+
|
|
7
|
+
| Component | Description |
|
|
8
|
+
|-----------|-------------|
|
|
9
|
+
| **API Client** | Pure Node.js client for the Funifier REST API (80+ methods, 18 resource types) |
|
|
10
|
+
| **MCP Server** | Model Context Protocol server exposing 8 tools + 3 prompts + documentation resources |
|
|
11
|
+
| **Skills** | 15 guided workflows for Claude Code, Codex, OpenCode, Cursor, Copilot, and Antigravity |
|
|
12
|
+
| **Instructions** | Platform-specific instruction files (AGENTS.md, copilot-instructions.md, cursor rules) |
|
|
13
|
+
| **Init CLI** | `npx funifier-mcp init` — interactive setup for every supported platform |
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# 1. Create (or cd into) your project
|
|
19
|
+
npm init -y
|
|
20
|
+
|
|
21
|
+
# 2. Install
|
|
22
|
+
npm install funifier-mcp
|
|
23
|
+
|
|
24
|
+
# 3. Run interactive setup
|
|
25
|
+
npx funifier-mcp init
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`init` asks which platforms you use, optionally collects Funifier credentials, then:
|
|
29
|
+
|
|
30
|
+
- Copies the skill/instruction files each platform expects (`.claude/skills/`, `AGENTS.md`, `.cursor/rules/`, etc.)
|
|
31
|
+
- Writes the correct MCP server config for each platform (`.mcp.json`, `.codex/config.toml`, `opencode.json`, `.cursor/mcp.json`, `.antigravity/mcp_config.json`)
|
|
32
|
+
- Writes `funifier.json` with your credentials (and adds it to `.gitignore`), or `funifier.json.example` if you skip credentials
|
|
33
|
+
- Prompts before overwriting anything that already exists
|
|
34
|
+
|
|
35
|
+
### Supported platforms
|
|
36
|
+
|
|
37
|
+
- **Claude Code** — Anthropic's official CLI/IDE
|
|
38
|
+
- **Codex CLI** — OpenAI's command-line agent
|
|
39
|
+
- **OpenCode** — open-source agent framework
|
|
40
|
+
- **Cursor IDE** — AI-native code editor
|
|
41
|
+
- **GitHub Copilot** — VS Code, JetBrains, GitHub.com
|
|
42
|
+
- **Google Antigravity** — Gemini-based desktop agent
|
|
43
|
+
|
|
44
|
+
> Antigravity reads its MCP config from `~/.gemini/antigravity/mcp_config.json`. `init` writes a project-level snippet to `.antigravity/mcp_config.json` and prints the global path so you can merge it in.
|
|
45
|
+
|
|
46
|
+
## CLI
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
funifier-mcp # Start the MCP server over stdio (used by MCP clients)
|
|
50
|
+
funifier-mcp init # Interactive setup
|
|
51
|
+
funifier-mcp --version
|
|
52
|
+
funifier-mcp --help
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## MCP Tools
|
|
56
|
+
|
|
57
|
+
| Tool | Description |
|
|
58
|
+
|------|-------------|
|
|
59
|
+
| `funifier_connect` | Connect to a Funifier instance (or switch between instances) |
|
|
60
|
+
| `funifier_list` | List resources by type with optional search filtering |
|
|
61
|
+
| `funifier_get` | Get a specific resource with full details (including code) |
|
|
62
|
+
| `funifier_save` | Create or update a resource |
|
|
63
|
+
| `funifier_delete` | Delete a resource by type and ID |
|
|
64
|
+
| `funifier_execute` | Execute a scheduler, aggregate, or public endpoint |
|
|
65
|
+
| `funifier_logs` | Get execution logs for triggers and schedulers |
|
|
66
|
+
| `funifier_database` | Query, aggregate, insert, update, delete on any collection |
|
|
67
|
+
|
|
68
|
+
### Resource types
|
|
69
|
+
|
|
70
|
+
trigger, scheduler, aggregate, websocket, widget, custom-page, public-endpoint, challenge-aggregate, auth-module, ai-knowledge, action, challenge, point, level, leaderboard, quiz, virtual-good-catalog, virtual-good-item
|
|
71
|
+
|
|
72
|
+
## API Client (library usage)
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import { createAPIClient } from "funifier-mcp";
|
|
76
|
+
|
|
77
|
+
const api = createAPIClient({
|
|
78
|
+
apiKey: "your-api-key",
|
|
79
|
+
secretKey: "your-secret-key",
|
|
80
|
+
serverUrl: "https://your-instance.funifier.com",
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const triggers = await api.listTriggers();
|
|
84
|
+
const result = await api.executeAggregate("my-aggregate-id", {});
|
|
85
|
+
const players = await api.queryCollection("player", { active: true }, { limit: 10 });
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Manual MCP Setup (if you skip `init`)
|
|
89
|
+
|
|
90
|
+
Point your MCP client at the bundled server:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"mcpServers": {
|
|
95
|
+
"funifier": {
|
|
96
|
+
"command": "npx",
|
|
97
|
+
"args": ["funifier-mcp"],
|
|
98
|
+
"env": {
|
|
99
|
+
"FUNIFIER_API_KEY": "your-api-key",
|
|
100
|
+
"FUNIFIER_SECRET_KEY": "your-secret-key",
|
|
101
|
+
"FUNIFIER_SERVER_URL": "https://your-instance.funifier.com"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Or drop a `funifier.json` in your project root and the server will pick it up automatically:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"apiKey": "your-api-key",
|
|
113
|
+
"secretKey": "your-secret-key",
|
|
114
|
+
"serverUrl": "https://your-instance.funifier.com"
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
If no config is provided at startup, call the `funifier_connect` tool at runtime.
|
|
119
|
+
|
|
120
|
+
## Available Workflows
|
|
121
|
+
|
|
122
|
+
| Skill | Description |
|
|
123
|
+
|-------|-------------|
|
|
124
|
+
| `funifier-help` | Documentation router and guidance |
|
|
125
|
+
| `funifier-debug` | Systematic debugging workflow |
|
|
126
|
+
| `funifier-create-trigger` | Create server-side event handlers |
|
|
127
|
+
| `funifier-create-scheduler` | Create scheduled Groovy jobs |
|
|
128
|
+
| `funifier-create-aggregate` | Create MongoDB aggregate pipelines |
|
|
129
|
+
| `funifier-create-custom-page` | Create Studio admin pages |
|
|
130
|
+
| `funifier-create-action` | Create trackable player actions |
|
|
131
|
+
| `funifier-create-challenge` | Create missions with rewards |
|
|
132
|
+
| `funifier-create-point` | Create point categories |
|
|
133
|
+
| `funifier-create-level` | Create level progression |
|
|
134
|
+
| `funifier-create-leaderboard` | Create rankings |
|
|
135
|
+
| `funifier-create-quiz` | Create quizzes |
|
|
136
|
+
| `funifier-create-virtual-good` | Create virtual stores |
|
|
137
|
+
| `funifier-implement-frontend` | Build frontend consuming Funifier API |
|
|
138
|
+
|
|
139
|
+
In Claude Code, invoke any skill with `/funifier-<name>` (e.g. `/funifier-help`).
|
|
140
|
+
|
|
141
|
+
## Configuration
|
|
142
|
+
|
|
143
|
+
### Environment variables
|
|
144
|
+
|
|
145
|
+
| Variable | Description |
|
|
146
|
+
|----------|-------------|
|
|
147
|
+
| `FUNIFIER_API_KEY` | API key for authentication |
|
|
148
|
+
| `FUNIFIER_SECRET_KEY` | Secret key for authentication |
|
|
149
|
+
| `FUNIFIER_SERVER_URL` | Base URL of your Funifier instance |
|
|
150
|
+
| `FUNIFIER_DOCS_PATH` | Path to documentation files (optional) |
|
|
151
|
+
|
|
152
|
+
Resolution order: `funifier.json` in cwd → environment variables → `funifier_connect` tool at runtime.
|
|
153
|
+
|
|
154
|
+
## Local development
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
git clone https://github.com/funifierinc/funifier-mcp.git
|
|
158
|
+
cd funifier-mcp
|
|
159
|
+
npm install
|
|
160
|
+
npm run build # tsc → dist/
|
|
161
|
+
npm run bundle # build + esbuild single-file bundle
|
|
162
|
+
npm test # vitest
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
To test `init` against a scratch project:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
npm link
|
|
169
|
+
cd /tmp/scratch && npm init -y && npm link funifier-mcp
|
|
170
|
+
npx funifier-mcp init
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Documentation
|
|
174
|
+
|
|
175
|
+
- **[docs/PLATFORM_SETUP.md](docs/PLATFORM_SETUP.md)** — Detailed setup for all platforms
|
|
176
|
+
- **[docs/QUICK_REFERENCE.md](docs/QUICK_REFERENCE.md)** — Copy-paste setup commands
|
|
177
|
+
- **[docs/INSTALL_EXAMPLES.md](docs/INSTALL_EXAMPLES.md)** — Real-world scenarios
|
|
178
|
+
- **[docs/MCP_SETUP.md](docs/MCP_SETUP.md)** — MCP configuration and troubleshooting
|
|
179
|
+
|
|
180
|
+
## License
|
|
181
|
+
|
|
182
|
+
MIT
|