@anticeil/mcp 0.0.0-stage → 1.1.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 +35 -2
- package/dist/index.js +675 -0
- package/package.json +40 -4
package/README.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @anticeil/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Official Model Context Protocol (MCP) server for **Anticeil Chat**. Allows AI Agents (Claude Desktop, Cursor, Antigravity) to read and post messages, manage colonies, configure privacy, and launch collaborative activities.
|
|
4
|
+
|
|
5
|
+
## Quick Start (Zero Install)
|
|
6
|
+
```bash
|
|
7
|
+
npx -y @anticeil/mcp
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Tools Included
|
|
11
|
+
- `anticeil_list_colonies`: List accessible workspaces.
|
|
12
|
+
- `anticeil_list_channels`: List channels inside a colony.
|
|
13
|
+
- `anticeil_send_message`: Send markdown chat messages.
|
|
14
|
+
- `anticeil_get_messages`: Read channel history.
|
|
15
|
+
- `anticeil_set_privacy`: Configure colony privacy and domain whitelist.
|
|
16
|
+
- `anticeil_trigger_activity`: Launch Excalidraw, YouTube, or Chess.
|
|
17
|
+
- `anticeil_post_webhook`: Dispatch rich webhook embed cards.
|
|
18
|
+
|
|
19
|
+
## Claude Desktop Configuration
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"anticeil": {
|
|
24
|
+
"command": "npx",
|
|
25
|
+
"args": ["-y", "@anticeil/mcp"],
|
|
26
|
+
"env": {
|
|
27
|
+
"ANTICEIL_API_KEY": "YOUR_ANTICEIL_API_KEY",
|
|
28
|
+
"ANTICEIL_BASE_URL": "https://app.anticeil.com"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
MIT
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,675 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
#!/usr/bin/env node
|
|
3
|
+
|
|
4
|
+
"use strict";
|
|
5
|
+
|
|
6
|
+
// src/index.ts
|
|
7
|
+
var import_server = require("@modelcontextprotocol/sdk/server/index.js");
|
|
8
|
+
var import_stdio = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
9
|
+
var import_types = require("@modelcontextprotocol/sdk/types.js");
|
|
10
|
+
|
|
11
|
+
// src/api.ts
|
|
12
|
+
var ANTICEIL_BASE_URL = (process.env.ANTICEIL_BASE_URL || "https://app.anticeil.com").replace(/\/+$/, "");
|
|
13
|
+
var ANTICEIL_API_KEY = process.env.ANTICEIL_API_KEY || process.env.ANTICEIL_TOKEN || "";
|
|
14
|
+
async function anticeilRequest(endpoint, options = {}) {
|
|
15
|
+
const path = endpoint.startsWith("/") ? endpoint : `/${endpoint}`;
|
|
16
|
+
const url = `${ANTICEIL_BASE_URL}${path}`;
|
|
17
|
+
const headers = new Headers(options.headers);
|
|
18
|
+
if (ANTICEIL_API_KEY) {
|
|
19
|
+
headers.set("Authorization", `Bearer ${ANTICEIL_API_KEY}`);
|
|
20
|
+
headers.set("X-Anticeil-Api-Key", ANTICEIL_API_KEY);
|
|
21
|
+
}
|
|
22
|
+
if (!headers.has("Content-Type")) {
|
|
23
|
+
headers.set("Content-Type", "application/json");
|
|
24
|
+
}
|
|
25
|
+
const res = await fetch(url, { ...options, headers });
|
|
26
|
+
if (!res.ok) {
|
|
27
|
+
const errorText = await res.text().catch(() => res.statusText);
|
|
28
|
+
throw new Error(`Anticeil API Error [${res.status}] ${path}: ${errorText}`);
|
|
29
|
+
}
|
|
30
|
+
const text = await res.text();
|
|
31
|
+
if (!text) return {};
|
|
32
|
+
try {
|
|
33
|
+
return JSON.parse(text);
|
|
34
|
+
} catch {
|
|
35
|
+
return text;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async function postWebhook(webhookUrl, payload) {
|
|
39
|
+
const res = await fetch(webhookUrl, {
|
|
40
|
+
method: "POST",
|
|
41
|
+
headers: { "Content-Type": "application/json" },
|
|
42
|
+
body: JSON.stringify(payload)
|
|
43
|
+
});
|
|
44
|
+
if (!res.ok) {
|
|
45
|
+
throw new Error(`Webhook Error [${res.status}]: ${await res.text()}`);
|
|
46
|
+
}
|
|
47
|
+
return { success: true };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// src/tools.ts
|
|
51
|
+
var json = (data) => JSON.stringify(data, null, 2);
|
|
52
|
+
var MCP_TOOLS = [
|
|
53
|
+
// ── 1. COLONIES (WORKSPACES) ──────────────────────────────────────────
|
|
54
|
+
{
|
|
55
|
+
name: "anticeil_list_colonies",
|
|
56
|
+
description: "List all colonies (servers/workspaces) accessible by the current Anticeil credentials.",
|
|
57
|
+
inputSchema: { type: "object", properties: {} },
|
|
58
|
+
handler: async () => anticeilRequest("/api/v1/community/hubs")
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "anticeil_create_colony",
|
|
62
|
+
description: "Create a new Anticeil colony (server/workspace).",
|
|
63
|
+
inputSchema: {
|
|
64
|
+
type: "object",
|
|
65
|
+
properties: {
|
|
66
|
+
name: { type: "string", description: "Colony display name." },
|
|
67
|
+
description: { type: "string", description: "Optional colony description." },
|
|
68
|
+
category: { type: "string", description: "Optional category slug (e.g. gaming, dev, education)." }
|
|
69
|
+
},
|
|
70
|
+
required: ["name"]
|
|
71
|
+
},
|
|
72
|
+
handler: async (args) => anticeilRequest("/api/v1/community/hubs", {
|
|
73
|
+
method: "POST",
|
|
74
|
+
body: json(args)
|
|
75
|
+
})
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "anticeil_update_colony",
|
|
79
|
+
description: "Update an existing colony name, description, or icon.",
|
|
80
|
+
inputSchema: {
|
|
81
|
+
type: "object",
|
|
82
|
+
properties: {
|
|
83
|
+
colonyId: { type: "string", description: "Target colony ID." },
|
|
84
|
+
name: { type: "string" },
|
|
85
|
+
description: { type: "string" },
|
|
86
|
+
icon: { type: "string" }
|
|
87
|
+
},
|
|
88
|
+
required: ["colonyId"]
|
|
89
|
+
},
|
|
90
|
+
handler: async ({ colonyId, ...updates }) => anticeilRequest(`/api/v1/community/hubs/${colonyId}`, {
|
|
91
|
+
method: "PUT",
|
|
92
|
+
body: json(updates)
|
|
93
|
+
})
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "anticeil_delete_colony",
|
|
97
|
+
description: "Delete a colony permanently.",
|
|
98
|
+
inputSchema: {
|
|
99
|
+
type: "object",
|
|
100
|
+
properties: { colonyId: { type: "string", description: "Target colony ID." } },
|
|
101
|
+
required: ["colonyId"]
|
|
102
|
+
},
|
|
103
|
+
handler: async ({ colonyId }) => anticeilRequest(`/api/v1/community/hubs/${colonyId}`, { method: "DELETE" })
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "anticeil_set_privacy",
|
|
107
|
+
description: "Update the privacy, join method, and screening rules of a colony.",
|
|
108
|
+
inputSchema: {
|
|
109
|
+
type: "object",
|
|
110
|
+
properties: {
|
|
111
|
+
colonyId: { type: "string", description: "Target colony ID." },
|
|
112
|
+
isPrivate: { type: "boolean", description: "True for invite_only, false for discoverable." },
|
|
113
|
+
rulesEnabled: { type: "boolean", description: "Require screening rules acknowledgement." }
|
|
114
|
+
},
|
|
115
|
+
required: ["colonyId", "isPrivate"]
|
|
116
|
+
},
|
|
117
|
+
handler: async ({ colonyId, isPrivate, rulesEnabled = false }) => anticeilRequest(`/api/v1/colonies/${colonyId}/access`, {
|
|
118
|
+
method: "PUT",
|
|
119
|
+
body: json({
|
|
120
|
+
joinMethod: isPrivate ? "invite_only" : "discoverable",
|
|
121
|
+
visibility: isPrivate ? "private" : "public",
|
|
122
|
+
rulesEnabled
|
|
123
|
+
})
|
|
124
|
+
})
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "anticeil_get_colony_insights",
|
|
128
|
+
description: "Fetch member growth, activity stats, and insights for a colony.",
|
|
129
|
+
inputSchema: {
|
|
130
|
+
type: "object",
|
|
131
|
+
properties: { colonyId: { type: "string", description: "Target colony ID." } },
|
|
132
|
+
required: ["colonyId"]
|
|
133
|
+
},
|
|
134
|
+
handler: async ({ colonyId }) => anticeilRequest(`/api/v1/colonies/${colonyId}/insights`)
|
|
135
|
+
},
|
|
136
|
+
// ── 2. CHANNELS ───────────────────────────────────────────────────────
|
|
137
|
+
{
|
|
138
|
+
name: "anticeil_list_channels",
|
|
139
|
+
description: "List all text, voice, kanban, and forum channels inside an Anticeil colony.",
|
|
140
|
+
inputSchema: {
|
|
141
|
+
type: "object",
|
|
142
|
+
properties: { colonyId: { type: "string", description: "Colony ID." } },
|
|
143
|
+
required: ["colonyId"]
|
|
144
|
+
},
|
|
145
|
+
handler: async ({ colonyId }) => anticeilRequest(`/api/v1/community/channels?colonyId=${encodeURIComponent(colonyId)}`)
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "anticeil_create_channel",
|
|
149
|
+
description: "Create a new channel (text, voice, announcement, kanban, forum) in a colony.",
|
|
150
|
+
inputSchema: {
|
|
151
|
+
type: "object",
|
|
152
|
+
properties: {
|
|
153
|
+
colonyId: { type: "string" },
|
|
154
|
+
name: { type: "string" },
|
|
155
|
+
type: { type: "string", enum: ["text", "voice", "announcement", "kanban", "forum"] },
|
|
156
|
+
topic: { type: "string" },
|
|
157
|
+
categoryId: { type: "string" }
|
|
158
|
+
},
|
|
159
|
+
required: ["colonyId", "name"]
|
|
160
|
+
},
|
|
161
|
+
handler: async (args) => anticeilRequest("/api/v1/community/channels", {
|
|
162
|
+
method: "POST",
|
|
163
|
+
body: json({ type: "text", ...args })
|
|
164
|
+
})
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: "anticeil_update_channel",
|
|
168
|
+
description: "Rename or update topic/settings of an existing channel.",
|
|
169
|
+
inputSchema: {
|
|
170
|
+
type: "object",
|
|
171
|
+
properties: {
|
|
172
|
+
channelId: { type: "string" },
|
|
173
|
+
name: { type: "string" },
|
|
174
|
+
topic: { type: "string" }
|
|
175
|
+
},
|
|
176
|
+
required: ["channelId"]
|
|
177
|
+
},
|
|
178
|
+
handler: async ({ channelId, ...updates }) => anticeilRequest(`/api/v1/community/channels/${channelId}`, {
|
|
179
|
+
method: "PUT",
|
|
180
|
+
body: json(updates)
|
|
181
|
+
})
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "anticeil_delete_channel",
|
|
185
|
+
description: "Delete a channel by ID.",
|
|
186
|
+
inputSchema: {
|
|
187
|
+
type: "object",
|
|
188
|
+
properties: { channelId: { type: "string" } },
|
|
189
|
+
required: ["channelId"]
|
|
190
|
+
},
|
|
191
|
+
handler: async ({ channelId }) => anticeilRequest(`/api/v1/community/channels/${channelId}`, { method: "DELETE" })
|
|
192
|
+
},
|
|
193
|
+
// ── 3. MESSAGES, THREADS, PINS & REACTIONS ────────────────────────────
|
|
194
|
+
{
|
|
195
|
+
name: "anticeil_get_messages",
|
|
196
|
+
description: "Fetch recent messages from an Anticeil channel or DM.",
|
|
197
|
+
inputSchema: {
|
|
198
|
+
type: "object",
|
|
199
|
+
properties: {
|
|
200
|
+
channelId: { type: "string" },
|
|
201
|
+
limit: { type: "number", description: "Max messages (default 30, max 100)." }
|
|
202
|
+
},
|
|
203
|
+
required: ["channelId"]
|
|
204
|
+
},
|
|
205
|
+
handler: async ({ channelId, limit = 30 }) => anticeilRequest(`/api/v1/community/channels/${channelId}/messages?limit=${limit}`)
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: "anticeil_send_message",
|
|
209
|
+
description: "Send a markdown message to an Anticeil channel or DM.",
|
|
210
|
+
inputSchema: {
|
|
211
|
+
type: "object",
|
|
212
|
+
properties: {
|
|
213
|
+
channelId: { type: "string" },
|
|
214
|
+
content: { type: "string" },
|
|
215
|
+
replyToId: { type: "string" }
|
|
216
|
+
},
|
|
217
|
+
required: ["channelId", "content"]
|
|
218
|
+
},
|
|
219
|
+
handler: async ({ channelId, content, replyToId }) => anticeilRequest(`/api/v1/community/channels/${channelId}/messages`, {
|
|
220
|
+
method: "POST",
|
|
221
|
+
body: json({ content, replyToId })
|
|
222
|
+
})
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "anticeil_delete_message",
|
|
226
|
+
description: "Delete a message by ID.",
|
|
227
|
+
inputSchema: {
|
|
228
|
+
type: "object",
|
|
229
|
+
properties: { messageId: { type: "string" } },
|
|
230
|
+
required: ["messageId"]
|
|
231
|
+
},
|
|
232
|
+
handler: async ({ messageId }) => anticeilRequest(`/api/v1/community/messages/${messageId}`, { method: "DELETE" })
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: "anticeil_toggle_reaction",
|
|
236
|
+
description: "Add or toggle an emoji reaction on a message.",
|
|
237
|
+
inputSchema: {
|
|
238
|
+
type: "object",
|
|
239
|
+
properties: {
|
|
240
|
+
messageId: { type: "string" },
|
|
241
|
+
emoji: { type: "string", description: "Emoji character, e.g. \u{1F44D} or \u{1F680}." }
|
|
242
|
+
},
|
|
243
|
+
required: ["messageId", "emoji"]
|
|
244
|
+
},
|
|
245
|
+
handler: async ({ messageId, emoji }) => anticeilRequest(`/api/v1/community/messages/${messageId}/reactions`, {
|
|
246
|
+
method: "POST",
|
|
247
|
+
body: json({ emoji })
|
|
248
|
+
})
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: "anticeil_toggle_pin",
|
|
252
|
+
description: "Pin or unpin a message in a channel.",
|
|
253
|
+
inputSchema: {
|
|
254
|
+
type: "object",
|
|
255
|
+
properties: {
|
|
256
|
+
messageId: { type: "string" },
|
|
257
|
+
channelId: { type: "string" }
|
|
258
|
+
},
|
|
259
|
+
required: ["messageId"]
|
|
260
|
+
},
|
|
261
|
+
handler: async ({ messageId, channelId }) => anticeilRequest(`/api/v1/community/messages/${messageId}/pin`, {
|
|
262
|
+
method: "POST",
|
|
263
|
+
body: json({ channelId })
|
|
264
|
+
})
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "anticeil_list_threads",
|
|
268
|
+
description: "List all discussion threads inside a channel.",
|
|
269
|
+
inputSchema: {
|
|
270
|
+
type: "object",
|
|
271
|
+
properties: { channelId: { type: "string" } },
|
|
272
|
+
required: ["channelId"]
|
|
273
|
+
},
|
|
274
|
+
handler: async ({ channelId }) => anticeilRequest(`/api/v1/community/channels/${channelId}/threads`)
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: "anticeil_create_thread",
|
|
278
|
+
description: "Create a new discussion thread inside a channel.",
|
|
279
|
+
inputSchema: {
|
|
280
|
+
type: "object",
|
|
281
|
+
properties: {
|
|
282
|
+
channelId: { type: "string" },
|
|
283
|
+
name: { type: "string", description: "Thread title." },
|
|
284
|
+
messageId: { type: "string", description: "Optional source message ID." }
|
|
285
|
+
},
|
|
286
|
+
required: ["channelId", "name"]
|
|
287
|
+
},
|
|
288
|
+
handler: async ({ channelId, name, messageId }) => anticeilRequest(`/api/v1/community/channels/${channelId}/threads`, {
|
|
289
|
+
method: "POST",
|
|
290
|
+
body: json({ name, messageId })
|
|
291
|
+
})
|
|
292
|
+
},
|
|
293
|
+
// ── 4. FRIENDS & MESSAGE REQUESTS ─────────────────────────────────────
|
|
294
|
+
{
|
|
295
|
+
name: "anticeil_list_friends",
|
|
296
|
+
description: "List all accepted friends and pending friend requests.",
|
|
297
|
+
inputSchema: { type: "object", properties: {} },
|
|
298
|
+
handler: async () => anticeilRequest("/api/v1/community/friends")
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: "anticeil_send_friend_request",
|
|
302
|
+
description: "Send a friend request to a user by username or email.",
|
|
303
|
+
inputSchema: {
|
|
304
|
+
type: "object",
|
|
305
|
+
properties: { target: { type: "string", description: "Username or user ID." } },
|
|
306
|
+
required: ["target"]
|
|
307
|
+
},
|
|
308
|
+
handler: async ({ target }) => anticeilRequest("/api/v1/community/friends/request", {
|
|
309
|
+
method: "POST",
|
|
310
|
+
body: json({ username: target, target })
|
|
311
|
+
})
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
name: "anticeil_list_message_requests",
|
|
315
|
+
description: "List incoming DM message requests.",
|
|
316
|
+
inputSchema: { type: "object", properties: {} },
|
|
317
|
+
handler: async () => anticeilRequest("/api/v1/community/message-requests")
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
name: "anticeil_respond_message_request",
|
|
321
|
+
description: "Accept, ignore, or mark an incoming DM message request as spam.",
|
|
322
|
+
inputSchema: {
|
|
323
|
+
type: "object",
|
|
324
|
+
properties: {
|
|
325
|
+
requestId: { type: "string" },
|
|
326
|
+
action: { type: "string", enum: ["accept", "ignore", "spam"] }
|
|
327
|
+
},
|
|
328
|
+
required: ["requestId", "action"]
|
|
329
|
+
},
|
|
330
|
+
handler: async ({ requestId, action }) => anticeilRequest(`/api/v1/community/message-requests/${requestId}/${action}`, {
|
|
331
|
+
method: "POST",
|
|
332
|
+
body: json({})
|
|
333
|
+
})
|
|
334
|
+
},
|
|
335
|
+
// ── 5. MEMBERS, ROLES, BANS & AUDIT LOGS ──────────────────────────────
|
|
336
|
+
{
|
|
337
|
+
name: "anticeil_list_members",
|
|
338
|
+
description: "List members in a colony or workspace.",
|
|
339
|
+
inputSchema: {
|
|
340
|
+
type: "object",
|
|
341
|
+
properties: { colonyId: { type: "string" } }
|
|
342
|
+
},
|
|
343
|
+
handler: async ({ colonyId }) => anticeilRequest(
|
|
344
|
+
colonyId ? `/api/v1/community/members?colonyId=${encodeURIComponent(colonyId)}` : "/api/v1/community/members"
|
|
345
|
+
)
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
name: "anticeil_list_roles",
|
|
349
|
+
description: "List all roles and permissions inside a colony.",
|
|
350
|
+
inputSchema: {
|
|
351
|
+
type: "object",
|
|
352
|
+
properties: { colonyId: { type: "string" } },
|
|
353
|
+
required: ["colonyId"]
|
|
354
|
+
},
|
|
355
|
+
handler: async ({ colonyId }) => anticeilRequest(`/api/v1/community/hubs/${colonyId}/roles`)
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: "anticeil_update_member_role",
|
|
359
|
+
description: "Assign or update a member role in a colony.",
|
|
360
|
+
inputSchema: {
|
|
361
|
+
type: "object",
|
|
362
|
+
properties: {
|
|
363
|
+
colonyId: { type: "string" },
|
|
364
|
+
userId: { type: "string" },
|
|
365
|
+
roleId: { type: "string" }
|
|
366
|
+
},
|
|
367
|
+
required: ["colonyId", "userId", "roleId"]
|
|
368
|
+
},
|
|
369
|
+
handler: async ({ colonyId, userId, roleId }) => anticeilRequest(`/api/v1/community/hubs/${colonyId}/members/${userId}/role`, {
|
|
370
|
+
method: "PUT",
|
|
371
|
+
body: json({ roleId })
|
|
372
|
+
})
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
name: "anticeil_manage_ban",
|
|
376
|
+
description: "Ban or unban a user in a colony.",
|
|
377
|
+
inputSchema: {
|
|
378
|
+
type: "object",
|
|
379
|
+
properties: {
|
|
380
|
+
colonyId: { type: "string" },
|
|
381
|
+
userId: { type: "string" },
|
|
382
|
+
action: { type: "string", enum: ["ban", "unban"] },
|
|
383
|
+
reason: { type: "string" }
|
|
384
|
+
},
|
|
385
|
+
required: ["colonyId", "userId", "action"]
|
|
386
|
+
},
|
|
387
|
+
handler: async ({ colonyId, userId, action, reason }) => action === "ban" ? anticeilRequest(`/api/v1/colonies/${colonyId}/bans`, {
|
|
388
|
+
method: "POST",
|
|
389
|
+
body: json({ userId, reason })
|
|
390
|
+
}) : anticeilRequest(`/api/v1/colonies/${colonyId}/bans/${userId}`, { method: "DELETE" })
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
name: "anticeil_get_audit_logs",
|
|
394
|
+
description: "Fetch moderation and administrative audit logs for a colony.",
|
|
395
|
+
inputSchema: {
|
|
396
|
+
type: "object",
|
|
397
|
+
properties: { colonyId: { type: "string" } },
|
|
398
|
+
required: ["colonyId"]
|
|
399
|
+
},
|
|
400
|
+
handler: async ({ colonyId }) => anticeilRequest(`/api/v1/colonies/${colonyId}/audit-logs`)
|
|
401
|
+
},
|
|
402
|
+
// ── 6. TASKS / KANBAN ASSIGNMENTS ─────────────────────────────────────
|
|
403
|
+
{
|
|
404
|
+
name: "anticeil_list_tasks",
|
|
405
|
+
description: "List all tasks/assignments across colonies or a specific Kanban channel.",
|
|
406
|
+
inputSchema: {
|
|
407
|
+
type: "object",
|
|
408
|
+
properties: {
|
|
409
|
+
colonyId: { type: "string" },
|
|
410
|
+
channelId: { type: "string" }
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
handler: async ({ colonyId, channelId }) => {
|
|
414
|
+
const params = new URLSearchParams();
|
|
415
|
+
if (colonyId) params.set("colonyId", colonyId);
|
|
416
|
+
if (channelId) params.set("channelId", channelId);
|
|
417
|
+
const qs = params.toString();
|
|
418
|
+
return anticeilRequest(`/api/v1/community/assignments${qs ? `?${qs}` : ""}`);
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
name: "anticeil_create_task",
|
|
423
|
+
description: "Create a new task / Kanban assignment card.",
|
|
424
|
+
inputSchema: {
|
|
425
|
+
type: "object",
|
|
426
|
+
properties: {
|
|
427
|
+
title: { type: "string" },
|
|
428
|
+
description: { type: "string" },
|
|
429
|
+
columnId: { type: "string", enum: ["todo", "in_progress", "review", "done"] },
|
|
430
|
+
priority: { type: "string", enum: ["low", "medium", "high", "urgent"] },
|
|
431
|
+
colonyId: { type: "string" },
|
|
432
|
+
channelId: { type: "string" },
|
|
433
|
+
assigneeName: { type: "string" },
|
|
434
|
+
dueDate: { type: "string" }
|
|
435
|
+
},
|
|
436
|
+
required: ["title"]
|
|
437
|
+
},
|
|
438
|
+
handler: async (args) => anticeilRequest("/api/v1/community/assignments", {
|
|
439
|
+
method: "POST",
|
|
440
|
+
body: json({ columnId: "todo", priority: "medium", ...args })
|
|
441
|
+
})
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
name: "anticeil_update_task",
|
|
445
|
+
description: "Update a task title, priority, or move it between Kanban columns.",
|
|
446
|
+
inputSchema: {
|
|
447
|
+
type: "object",
|
|
448
|
+
properties: {
|
|
449
|
+
taskId: { type: "string" },
|
|
450
|
+
title: { type: "string" },
|
|
451
|
+
description: { type: "string" },
|
|
452
|
+
columnId: { type: "string", enum: ["todo", "in_progress", "review", "done"] },
|
|
453
|
+
priority: { type: "string", enum: ["low", "medium", "high", "urgent"] }
|
|
454
|
+
},
|
|
455
|
+
required: ["taskId"]
|
|
456
|
+
},
|
|
457
|
+
handler: async ({ taskId, ...updates }) => anticeilRequest(`/api/v1/community/assignments/${taskId}`, {
|
|
458
|
+
method: "PUT",
|
|
459
|
+
body: json(updates)
|
|
460
|
+
})
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
name: "anticeil_delete_task",
|
|
464
|
+
description: "Delete a task / Kanban card by ID.",
|
|
465
|
+
inputSchema: {
|
|
466
|
+
type: "object",
|
|
467
|
+
properties: { taskId: { type: "string" } },
|
|
468
|
+
required: ["taskId"]
|
|
469
|
+
},
|
|
470
|
+
handler: async ({ taskId }) => anticeilRequest(`/api/v1/community/assignments/${taskId}`, { method: "DELETE" })
|
|
471
|
+
},
|
|
472
|
+
// ── 7. CALENDAR & COLONY EVENTS ───────────────────────────────────────
|
|
473
|
+
{
|
|
474
|
+
name: "anticeil_list_events",
|
|
475
|
+
description: "List scheduled calendar events and colony events.",
|
|
476
|
+
inputSchema: {
|
|
477
|
+
type: "object",
|
|
478
|
+
properties: { colonyId: { type: "string" } }
|
|
479
|
+
},
|
|
480
|
+
handler: async ({ colonyId }) => anticeilRequest(
|
|
481
|
+
colonyId ? `/api/v1/community/calendar/events?colonyId=${encodeURIComponent(colonyId)}` : "/api/v1/community/calendar/events"
|
|
482
|
+
)
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
name: "anticeil_create_event",
|
|
486
|
+
description: "Schedule a new calendar event or colony voice event.",
|
|
487
|
+
inputSchema: {
|
|
488
|
+
type: "object",
|
|
489
|
+
properties: {
|
|
490
|
+
title: { type: "string" },
|
|
491
|
+
description: { type: "string" },
|
|
492
|
+
startTime: { type: "string", description: "ISO 8601 datetime string." },
|
|
493
|
+
endTime: { type: "string", description: "ISO 8601 datetime string." },
|
|
494
|
+
colonyId: { type: "string" },
|
|
495
|
+
location: { type: "string" }
|
|
496
|
+
},
|
|
497
|
+
required: ["title", "startTime"]
|
|
498
|
+
},
|
|
499
|
+
handler: async (args) => anticeilRequest("/api/v1/community/calendar/events", {
|
|
500
|
+
method: "POST",
|
|
501
|
+
body: json(args)
|
|
502
|
+
})
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
name: "anticeil_update_event",
|
|
506
|
+
description: "Update an existing calendar event.",
|
|
507
|
+
inputSchema: {
|
|
508
|
+
type: "object",
|
|
509
|
+
properties: {
|
|
510
|
+
eventId: { type: "string" },
|
|
511
|
+
title: { type: "string" },
|
|
512
|
+
description: { type: "string" },
|
|
513
|
+
startTime: { type: "string" },
|
|
514
|
+
endTime: { type: "string" }
|
|
515
|
+
},
|
|
516
|
+
required: ["eventId"]
|
|
517
|
+
},
|
|
518
|
+
handler: async ({ eventId, ...updates }) => anticeilRequest(`/api/v1/community/calendar/events/${eventId}`, {
|
|
519
|
+
method: "PUT",
|
|
520
|
+
body: json(updates)
|
|
521
|
+
})
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
name: "anticeil_delete_event",
|
|
525
|
+
description: "Cancel and delete a scheduled calendar event.",
|
|
526
|
+
inputSchema: {
|
|
527
|
+
type: "object",
|
|
528
|
+
properties: { eventId: { type: "string" } },
|
|
529
|
+
required: ["eventId"]
|
|
530
|
+
},
|
|
531
|
+
handler: async ({ eventId }) => anticeilRequest(`/api/v1/community/calendar/events/${eventId}`, { method: "DELETE" })
|
|
532
|
+
},
|
|
533
|
+
// ── 8. APPS, ACTIVITIES, WEBHOOKS & QUESTS ────────────────────────────
|
|
534
|
+
{
|
|
535
|
+
name: "anticeil_list_apps",
|
|
536
|
+
description: "List all available built-in and custom apps/activities in the Anticeil App Directory.",
|
|
537
|
+
inputSchema: { type: "object", properties: {} },
|
|
538
|
+
handler: async () => anticeilRequest("/api/v1/community/activities/catalog")
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
name: "anticeil_trigger_activity",
|
|
542
|
+
description: "Launch an embedded multiplayer app/activity (youtube, whiteboard, chess, tradingview, anticeil-flow, screenshare, or custom app ID) in a channel.",
|
|
543
|
+
inputSchema: {
|
|
544
|
+
type: "object",
|
|
545
|
+
properties: {
|
|
546
|
+
channelId: { type: "string", description: "Target voice or text channel ID." },
|
|
547
|
+
type: {
|
|
548
|
+
type: "string",
|
|
549
|
+
description: "Activity ID (e.g. youtube, excalidraw, chess, tradingview, anticeil-flow, screenshare, or custom app ID)."
|
|
550
|
+
},
|
|
551
|
+
title: { type: "string" }
|
|
552
|
+
},
|
|
553
|
+
required: ["channelId", "type"]
|
|
554
|
+
},
|
|
555
|
+
handler: async ({ channelId, type, title }) => anticeilRequest(`/api/channels/${channelId}/activity`, {
|
|
556
|
+
method: "POST",
|
|
557
|
+
body: json({ channelId, type, title })
|
|
558
|
+
})
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
name: "anticeil_install_colony_app",
|
|
562
|
+
description: "Install an application from the directory into a colony.",
|
|
563
|
+
inputSchema: {
|
|
564
|
+
type: "object",
|
|
565
|
+
properties: {
|
|
566
|
+
colonyId: { type: "string" },
|
|
567
|
+
appId: { type: "string" }
|
|
568
|
+
},
|
|
569
|
+
required: ["colonyId", "appId"]
|
|
570
|
+
},
|
|
571
|
+
handler: async ({ colonyId, appId }) => anticeilRequest(`/api/v1/colonies/${colonyId}/apps/${appId}/install`, {
|
|
572
|
+
method: "POST",
|
|
573
|
+
body: json({})
|
|
574
|
+
})
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
name: "anticeil_post_webhook",
|
|
578
|
+
description: "Post an automated notification or rich embed card via incoming webhook.",
|
|
579
|
+
inputSchema: {
|
|
580
|
+
type: "object",
|
|
581
|
+
properties: {
|
|
582
|
+
webhookUrl: { type: "string" },
|
|
583
|
+
content: { type: "string" },
|
|
584
|
+
username: { type: "string" },
|
|
585
|
+
avatarUrl: { type: "string" },
|
|
586
|
+
embeds: { type: "array", items: { type: "object" } }
|
|
587
|
+
},
|
|
588
|
+
required: ["webhookUrl"]
|
|
589
|
+
},
|
|
590
|
+
handler: async ({ webhookUrl, ...payload }) => postWebhook(webhookUrl, payload)
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
name: "anticeil_list_quests",
|
|
594
|
+
description: "List all active community quests and rewards.",
|
|
595
|
+
inputSchema: { type: "object", properties: {} },
|
|
596
|
+
handler: async () => anticeilRequest("/api/v1/community/quests")
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: "anticeil_manage_quest",
|
|
600
|
+
description: "Create, update, or delete a community quest.",
|
|
601
|
+
inputSchema: {
|
|
602
|
+
type: "object",
|
|
603
|
+
properties: {
|
|
604
|
+
action: { type: "string", enum: ["create", "update", "delete"] },
|
|
605
|
+
questId: { type: "string", description: "Required for update/delete." },
|
|
606
|
+
title: { type: "string" },
|
|
607
|
+
description: { type: "string" },
|
|
608
|
+
reward: { type: "string" }
|
|
609
|
+
},
|
|
610
|
+
required: ["action"]
|
|
611
|
+
},
|
|
612
|
+
handler: async ({ action, questId, ...body }) => {
|
|
613
|
+
if (action === "create") {
|
|
614
|
+
return anticeilRequest("/api/v1/community/quests", { method: "POST", body: json(body) });
|
|
615
|
+
}
|
|
616
|
+
if (action === "update") {
|
|
617
|
+
return anticeilRequest(`/api/v1/community/quests/${questId}`, { method: "PUT", body: json(body) });
|
|
618
|
+
}
|
|
619
|
+
return anticeilRequest(`/api/v1/community/quests/${questId}`, { method: "DELETE" });
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
];
|
|
623
|
+
var TOOL_HANDLERS = new Map(MCP_TOOLS.map((t) => [t.name, t.handler]));
|
|
624
|
+
|
|
625
|
+
// src/index.ts
|
|
626
|
+
var server = new import_server.Server(
|
|
627
|
+
{
|
|
628
|
+
name: "anticeil-mcp",
|
|
629
|
+
version: "1.1.0"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
capabilities: {
|
|
633
|
+
tools: {}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
);
|
|
637
|
+
server.setRequestHandler(import_types.ListToolsRequestSchema, async () => ({
|
|
638
|
+
tools: MCP_TOOLS.map(({ name, description, inputSchema }) => ({
|
|
639
|
+
name,
|
|
640
|
+
description,
|
|
641
|
+
inputSchema
|
|
642
|
+
}))
|
|
643
|
+
}));
|
|
644
|
+
server.setRequestHandler(import_types.CallToolRequestSchema, async (req) => {
|
|
645
|
+
const { name, arguments: args = {} } = req.params;
|
|
646
|
+
const handler = TOOL_HANDLERS.get(name);
|
|
647
|
+
if (!handler) {
|
|
648
|
+
throw new import_types.McpError(import_types.ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
649
|
+
}
|
|
650
|
+
try {
|
|
651
|
+
const result = await handler(args);
|
|
652
|
+
return {
|
|
653
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|
|
654
|
+
};
|
|
655
|
+
} catch (err) {
|
|
656
|
+
return {
|
|
657
|
+
isError: true,
|
|
658
|
+
content: [
|
|
659
|
+
{
|
|
660
|
+
type: "text",
|
|
661
|
+
text: `Error executing ${name}: ${err?.message || String(err)}`
|
|
662
|
+
}
|
|
663
|
+
]
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
});
|
|
667
|
+
async function main() {
|
|
668
|
+
const transport = new import_stdio.StdioServerTransport();
|
|
669
|
+
await server.connect(transport);
|
|
670
|
+
console.error(`Anticeil MCP Server running on stdio (${MCP_TOOLS.length} tools)`);
|
|
671
|
+
}
|
|
672
|
+
main().catch((err) => {
|
|
673
|
+
console.error("Fatal error running Anticeil MCP Server:", err);
|
|
674
|
+
process.exit(1);
|
|
675
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anticeil/mcp",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Model Context Protocol (MCP) server for Anticeil Chat, Voice, Activities, and Bot Platform",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"anticeil-mcp": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"test": "node --test test/mcp.test.mjs",
|
|
14
|
+
"build": "tsup",
|
|
15
|
+
"start": "node dist/index.js",
|
|
16
|
+
"prepublishOnly": "npm run build"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"anticeil",
|
|
20
|
+
"mcp",
|
|
21
|
+
"model-context-protocol",
|
|
22
|
+
"ai-agent",
|
|
23
|
+
"claude",
|
|
24
|
+
"cursor",
|
|
25
|
+
"chat"
|
|
26
|
+
],
|
|
27
|
+
"author": "Anticeil Team <dev@anticeil.com>",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@anticeil/sdk": "^1.1.0",
|
|
34
|
+
"@modelcontextprotocol/sdk": "^1.6.0",
|
|
35
|
+
"socket.io-client": "^4.8.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^22.13.0",
|
|
39
|
+
"tsup": "^8.3.6",
|
|
40
|
+
"typescript": "^5.7.3"
|
|
41
|
+
}
|
|
42
|
+
}
|