@node2flow/google-calendar-mcp 1.0.0 → 1.0.2
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/dist/index.d.ts +34 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +161 -138
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/src/server.ts +193 -170
package/dist/index.d.ts
CHANGED
|
@@ -16,5 +16,38 @@ export default function createSmitheryServer(opts?: {
|
|
|
16
16
|
GOOGLE_CLIENT_SECRET?: string;
|
|
17
17
|
GOOGLE_REFRESH_TOKEN?: string;
|
|
18
18
|
};
|
|
19
|
-
}): import("@modelcontextprotocol/sdk/server
|
|
19
|
+
}): import("@modelcontextprotocol/sdk/server").Server<{
|
|
20
|
+
method: string;
|
|
21
|
+
params?: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
_meta?: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
progressToken?: string | number | undefined;
|
|
26
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
27
|
+
taskId: string;
|
|
28
|
+
} | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
} | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
method: string;
|
|
33
|
+
params?: {
|
|
34
|
+
[x: string]: unknown;
|
|
35
|
+
_meta?: {
|
|
36
|
+
[x: string]: unknown;
|
|
37
|
+
progressToken?: string | number | undefined;
|
|
38
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
39
|
+
taskId: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
} | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
[x: string]: unknown;
|
|
45
|
+
_meta?: {
|
|
46
|
+
[x: string]: unknown;
|
|
47
|
+
progressToken?: string | number | undefined;
|
|
48
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
49
|
+
taskId: string;
|
|
50
|
+
} | undefined;
|
|
51
|
+
} | undefined;
|
|
52
|
+
}>;
|
|
20
53
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG;AA2JH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,IAAI,CAAC,EAAE;IAClD,MAAM,CAAC,EAAE;QACP,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC;CACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG;AA2JH,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,IAAI,CAAC,EAAE;IAClD,MAAM,CAAC,EAAE;QACP,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC;CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAMA"}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared MCP Server — used by both Node.js (index.ts) and CF Worker (worker.ts)
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
5
5
|
import { CalendarClient } from './calendar-client.js';
|
|
6
6
|
export interface CalendarMcpConfig {
|
|
7
7
|
clientId: string;
|
|
@@ -9,5 +9,5 @@ export interface CalendarMcpConfig {
|
|
|
9
9
|
refreshToken: string;
|
|
10
10
|
}
|
|
11
11
|
export declare function handleToolCall(toolName: string, args: Record<string, unknown>, client: CalendarClient): Promise<import("./types.js").EventList> | Promise<import("./types.js").Event> | Promise<void> | Promise<import("./types.js").CalendarListList> | Promise<import("./types.js").Calendar> | Promise<import("./types.js").AclList> | Promise<import("./types.js").AclRule> | Promise<import("./types.js").FreeBusyResponse> | Promise<import("./types.js").Colors> | Promise<import("./types.js").SettingsList>;
|
|
12
|
-
export declare function createServer(config?: CalendarMcpConfig):
|
|
12
|
+
export declare function createServer(config?: CalendarMcpConfig): Server;
|
|
13
13
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AASnE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,cAAc,gZAiPvB;AAED,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,MAAM,CAyM/D"}
|
package/dist/server.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared MCP Server — used by both Node.js (index.ts) and CF Worker (worker.ts)
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
4
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
5
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
6
6
|
import { CalendarClient } from './calendar-client.js';
|
|
7
7
|
import { TOOLS } from './tools.js';
|
|
8
8
|
export function handleToolCall(toolName, args, client) {
|
|
@@ -242,23 +242,30 @@ export function handleToolCall(toolName, args, client) {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
export function createServer(config) {
|
|
245
|
-
const server = new
|
|
246
|
-
name: 'google-calendar-mcp',
|
|
247
|
-
version: '1.0.0',
|
|
248
|
-
});
|
|
245
|
+
const server = new Server({ name: 'google-calendar-mcp', version: '1.0.0' }, { capabilities: { tools: {}, prompts: {}, resources: {} } });
|
|
249
246
|
let client = null;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
247
|
+
// List available tools
|
|
248
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
249
|
+
tools: TOOLS.map(tool => {
|
|
250
|
+
const hasProperties = Object.keys(tool.inputSchema.properties).length > 0;
|
|
251
|
+
return {
|
|
252
|
+
name: tool.name,
|
|
253
|
+
description: tool.description,
|
|
254
|
+
...(hasProperties ? { inputSchema: tool.inputSchema } : {}),
|
|
255
|
+
annotations: tool.annotations,
|
|
256
|
+
};
|
|
257
|
+
}),
|
|
258
|
+
}));
|
|
259
|
+
// Handle tool calls
|
|
260
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
261
|
+
const { name, arguments: args } = request.params;
|
|
262
|
+
try {
|
|
256
263
|
const clientId = config?.clientId ||
|
|
257
|
-
args
|
|
264
|
+
args?.GOOGLE_CLIENT_ID;
|
|
258
265
|
const clientSecret = config?.clientSecret ||
|
|
259
|
-
args
|
|
266
|
+
args?.GOOGLE_CLIENT_SECRET;
|
|
260
267
|
const refreshToken = config?.refreshToken ||
|
|
261
|
-
args
|
|
268
|
+
args?.GOOGLE_REFRESH_TOKEN;
|
|
262
269
|
if (!clientId || !clientSecret || !refreshToken) {
|
|
263
270
|
return {
|
|
264
271
|
content: [{ type: 'text', text: 'Error: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GOOGLE_REFRESH_TOKEN are all required.' }],
|
|
@@ -268,134 +275,150 @@ export function createServer(config) {
|
|
|
268
275
|
if (!client || config?.clientId !== clientId) {
|
|
269
276
|
client = new CalendarClient({ clientId, clientSecret, refreshToken });
|
|
270
277
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
content: {
|
|
292
|
-
type: 'text',
|
|
293
|
-
text: [
|
|
294
|
-
'You are a Google Calendar scheduling assistant.',
|
|
295
|
-
'',
|
|
296
|
-
'Creating events:',
|
|
297
|
-
'1. **Timed event** — gcal_create_event with start_date_time + end_date_time (RFC 3339)',
|
|
298
|
-
'2. **All-day event** — Use start_date + end_date (YYYY-MM-DD). Single day: start=15, end=16',
|
|
299
|
-
'3. **Quick add** — gcal_quick_add with natural language ("Meeting tomorrow 3pm")',
|
|
300
|
-
'4. **Attendees** — Pass email addresses array, set send_updates="all" to notify',
|
|
301
|
-
'',
|
|
302
|
-
'Recurring events:',
|
|
303
|
-
'1. **Daily** — recurrence: ["RRULE:FREQ=DAILY"]',
|
|
304
|
-
'2. **Weekly** — recurrence: ["RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR"]',
|
|
305
|
-
'3. **Monthly** — recurrence: ["RRULE:FREQ=MONTHLY;BYMONTHDAY=15"]',
|
|
306
|
-
'4. **Until date** — Add ;UNTIL=20261231T235959Z',
|
|
307
|
-
'5. **Count** — Add ;COUNT=10 for 10 occurrences',
|
|
308
|
-
'6. **Exceptions** — Add EXDATE entries to skip dates',
|
|
309
|
-
'7. **View instances** — gcal_list_instances to see individual occurrences',
|
|
310
|
-
'',
|
|
311
|
-
'Reminders:',
|
|
312
|
-
'- Default reminders: { "useDefault": true }',
|
|
313
|
-
'- Custom: { "useDefault": false, "overrides": [{ "method": "popup", "minutes": 10 }, { "method": "email", "minutes": 60 }] }',
|
|
314
|
-
'',
|
|
315
|
-
'Tips:',
|
|
316
|
-
'- Use "primary" as calendar_id for the main calendar',
|
|
317
|
-
'- Set transparency="transparent" for events that don\'t block time',
|
|
318
|
-
'- Use gcal_patch_event to change only specific fields without affecting others',
|
|
319
|
-
'- Use gcal_move_event to transfer events between calendars',
|
|
320
|
-
].join('\n'),
|
|
321
|
-
},
|
|
322
|
-
}],
|
|
323
|
-
}));
|
|
324
|
-
server.prompt('search-and-organize', 'Guide for searching events, managing calendars, sharing, and checking availability', async () => ({
|
|
325
|
-
messages: [{
|
|
326
|
-
role: 'user',
|
|
327
|
-
content: {
|
|
328
|
-
type: 'text',
|
|
329
|
-
text: [
|
|
330
|
-
'You are a Google Calendar organization assistant.',
|
|
331
|
-
'',
|
|
332
|
-
'Searching events:',
|
|
333
|
-
'- **By text** — q parameter searches summary, description, location, attendees',
|
|
334
|
-
'- **By time** — time_min + time_max (RFC 3339) to filter date range',
|
|
335
|
-
'- **Expand recurring** — single_events=true to see individual instances',
|
|
336
|
-
'- **Sort** — order_by="startTime" (requires singleEvents) or "updated"',
|
|
337
|
-
'- **Pagination** — Use max_results + page_token for large result sets',
|
|
338
|
-
'',
|
|
339
|
-
'Managing calendars:',
|
|
340
|
-
'1. **List all** — gcal_list_calendars to see subscribed calendars',
|
|
341
|
-
'2. **Create** — gcal_create_calendar for a new secondary calendar',
|
|
342
|
-
'3. **Customize** — gcal_update_calendar_entry for display color, name override',
|
|
343
|
-
'4. **Subscribe** — gcal_add_calendar to add a shared calendar',
|
|
344
|
-
'5. **Unsubscribe** — gcal_remove_calendar (doesn\'t delete the calendar)',
|
|
345
|
-
'',
|
|
346
|
-
'Sharing calendars (ACL):',
|
|
347
|
-
'- **freeBusyReader** — Can only see free/busy',
|
|
348
|
-
'- **reader** — Can see event details',
|
|
349
|
-
'- **writer** — Can create and edit events',
|
|
350
|
-
'- **owner** — Full control including sharing',
|
|
351
|
-
'- scope_type: "user" (email), "group" (group email), "domain", or "default" (public)',
|
|
352
|
-
'',
|
|
353
|
-
'Checking availability:',
|
|
354
|
-
'- gcal_query_freebusy with time range and calendar IDs',
|
|
355
|
-
'- Returns busy time blocks for each calendar',
|
|
356
|
-
'- Use to find free slots for scheduling meetings',
|
|
357
|
-
'',
|
|
358
|
-
'Colors:',
|
|
359
|
-
'- gcal_get_colors for color palette (IDs 1-24 for calendars, 1-11 for events)',
|
|
360
|
-
'- Apply to events: color_id in gcal_create_event',
|
|
361
|
-
'- Apply to calendars: color_id in gcal_update_calendar_entry',
|
|
362
|
-
].join('\n'),
|
|
363
|
-
},
|
|
364
|
-
}],
|
|
278
|
+
const result = await handleToolCall(name, args || {}, client);
|
|
279
|
+
const text = result === undefined ? '{"success": true}' : JSON.stringify(result, null, 2);
|
|
280
|
+
return {
|
|
281
|
+
content: [{ type: 'text', text }],
|
|
282
|
+
isError: false,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
return {
|
|
287
|
+
content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }],
|
|
288
|
+
isError: true,
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
// List prompts
|
|
293
|
+
server.setRequestHandler(ListPromptsRequestSchema, async () => ({
|
|
294
|
+
prompts: [
|
|
295
|
+
{ name: 'schedule-and-manage', description: 'Guide for creating events, recurring schedules, attendees, and reminders' },
|
|
296
|
+
{ name: 'search-and-organize', description: 'Guide for searching events, managing calendars, sharing, and checking availability' },
|
|
297
|
+
],
|
|
365
298
|
}));
|
|
366
|
-
//
|
|
367
|
-
server.
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
299
|
+
// Get prompt
|
|
300
|
+
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
301
|
+
const { name } = request.params;
|
|
302
|
+
if (name === 'schedule-and-manage') {
|
|
303
|
+
return {
|
|
304
|
+
messages: [{
|
|
305
|
+
role: 'user',
|
|
306
|
+
content: {
|
|
307
|
+
type: 'text',
|
|
308
|
+
text: [
|
|
309
|
+
'You are a Google Calendar scheduling assistant.',
|
|
310
|
+
'',
|
|
311
|
+
'Creating events:',
|
|
312
|
+
'1. **Timed event** — gcal_create_event with start_date_time + end_date_time (RFC 3339)',
|
|
313
|
+
'2. **All-day event** — Use start_date + end_date (YYYY-MM-DD). Single day: start=15, end=16',
|
|
314
|
+
'3. **Quick add** — gcal_quick_add with natural language ("Meeting tomorrow 3pm")',
|
|
315
|
+
'4. **Attendees** — Pass email addresses array, set send_updates="all" to notify',
|
|
316
|
+
'',
|
|
317
|
+
'Recurring events:',
|
|
318
|
+
'1. **Daily** — recurrence: ["RRULE:FREQ=DAILY"]',
|
|
319
|
+
'2. **Weekly** — recurrence: ["RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR"]',
|
|
320
|
+
'3. **Monthly** — recurrence: ["RRULE:FREQ=MONTHLY;BYMONTHDAY=15"]',
|
|
321
|
+
'4. **Until date** — Add ;UNTIL=20261231T235959Z',
|
|
322
|
+
'5. **Count** — Add ;COUNT=10 for 10 occurrences',
|
|
323
|
+
'6. **Exceptions** — Add EXDATE entries to skip dates',
|
|
324
|
+
'7. **View instances** — gcal_list_instances to see individual occurrences',
|
|
325
|
+
'',
|
|
326
|
+
'Reminders:',
|
|
327
|
+
'- Default reminders: { "useDefault": true }',
|
|
328
|
+
'- Custom: { "useDefault": false, "overrides": [{ "method": "popup", "minutes": 10 }, { "method": "email", "minutes": 60 }] }',
|
|
329
|
+
'',
|
|
330
|
+
'Tips:',
|
|
331
|
+
'- Use "primary" as calendar_id for the main calendar',
|
|
332
|
+
'- Set transparency="transparent" for events that don\'t block time',
|
|
333
|
+
'- Use gcal_patch_event to change only specific fields without affecting others',
|
|
334
|
+
'- Use gcal_move_event to transfer events between calendars',
|
|
335
|
+
].join('\n'),
|
|
336
|
+
},
|
|
337
|
+
}],
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
if (name === 'search-and-organize') {
|
|
341
|
+
return {
|
|
342
|
+
messages: [{
|
|
343
|
+
role: 'user',
|
|
344
|
+
content: {
|
|
345
|
+
type: 'text',
|
|
346
|
+
text: [
|
|
347
|
+
'You are a Google Calendar organization assistant.',
|
|
348
|
+
'',
|
|
349
|
+
'Searching events:',
|
|
350
|
+
'- **By text** — q parameter searches summary, description, location, attendees',
|
|
351
|
+
'- **By time** — time_min + time_max (RFC 3339) to filter date range',
|
|
352
|
+
'- **Expand recurring** — single_events=true to see individual instances',
|
|
353
|
+
'- **Sort** — order_by="startTime" (requires singleEvents) or "updated"',
|
|
354
|
+
'- **Pagination** — Use max_results + page_token for large result sets',
|
|
355
|
+
'',
|
|
356
|
+
'Managing calendars:',
|
|
357
|
+
'1. **List all** — gcal_list_calendars to see subscribed calendars',
|
|
358
|
+
'2. **Create** — gcal_create_calendar for a new secondary calendar',
|
|
359
|
+
'3. **Customize** — gcal_update_calendar_entry for display color, name override',
|
|
360
|
+
'4. **Subscribe** — gcal_add_calendar to add a shared calendar',
|
|
361
|
+
'5. **Unsubscribe** — gcal_remove_calendar (doesn\'t delete the calendar)',
|
|
362
|
+
'',
|
|
363
|
+
'Sharing calendars (ACL):',
|
|
364
|
+
'- **freeBusyReader** — Can only see free/busy',
|
|
365
|
+
'- **reader** — Can see event details',
|
|
366
|
+
'- **writer** — Can create and edit events',
|
|
367
|
+
'- **owner** — Full control including sharing',
|
|
368
|
+
'- scope_type: "user" (email), "group" (group email), "domain", or "default" (public)',
|
|
369
|
+
'',
|
|
370
|
+
'Checking availability:',
|
|
371
|
+
'- gcal_query_freebusy with time range and calendar IDs',
|
|
372
|
+
'- Returns busy time blocks for each calendar',
|
|
373
|
+
'- Use to find free slots for scheduling meetings',
|
|
374
|
+
'',
|
|
375
|
+
'Colors:',
|
|
376
|
+
'- gcal_get_colors for color palette (IDs 1-24 for calendars, 1-11 for events)',
|
|
377
|
+
'- Apply to events: color_id in gcal_create_event',
|
|
378
|
+
'- Apply to calendars: color_id in gcal_update_calendar_entry',
|
|
379
|
+
].join('\n'),
|
|
380
|
+
},
|
|
381
|
+
}],
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
throw new Error(`Unknown prompt: ${name}`);
|
|
385
|
+
});
|
|
386
|
+
// List resources
|
|
387
|
+
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
388
|
+
resources: [{
|
|
372
389
|
uri: 'gcal://server-info',
|
|
390
|
+
name: 'server-info',
|
|
391
|
+
description: 'Connection status and available tools for this Google Calendar MCP server',
|
|
373
392
|
mimeType: 'application/json',
|
|
374
|
-
text: JSON.stringify({
|
|
375
|
-
name: 'google-calendar-mcp',
|
|
376
|
-
version: '1.0.0',
|
|
377
|
-
connected: !!config,
|
|
378
|
-
has_oauth: !!(config?.clientId),
|
|
379
|
-
tools_available: TOOLS.length,
|
|
380
|
-
tool_categories: {
|
|
381
|
-
events: 10,
|
|
382
|
-
calendar_list: 5,
|
|
383
|
-
calendars: 5,
|
|
384
|
-
acl: 5,
|
|
385
|
-
utility: 3,
|
|
386
|
-
},
|
|
387
|
-
}, null, 2),
|
|
388
393
|
}],
|
|
389
394
|
}));
|
|
390
|
-
//
|
|
391
|
-
server.
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
395
|
+
// Read resource
|
|
396
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
397
|
+
const { uri } = request.params;
|
|
398
|
+
if (uri === 'gcal://server-info') {
|
|
399
|
+
return {
|
|
400
|
+
contents: [{
|
|
401
|
+
uri: 'gcal://server-info',
|
|
402
|
+
mimeType: 'application/json',
|
|
403
|
+
text: JSON.stringify({
|
|
404
|
+
name: 'google-calendar-mcp',
|
|
405
|
+
version: '1.0.0',
|
|
406
|
+
connected: !!config,
|
|
407
|
+
has_oauth: !!(config?.clientId),
|
|
408
|
+
tools_available: TOOLS.length,
|
|
409
|
+
tool_categories: {
|
|
410
|
+
events: 10,
|
|
411
|
+
calendar_list: 5,
|
|
412
|
+
calendars: 5,
|
|
413
|
+
acl: 5,
|
|
414
|
+
utility: 3,
|
|
415
|
+
},
|
|
416
|
+
}, null, 2),
|
|
417
|
+
}],
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
throw new Error(`Unknown resource: ${uri}`);
|
|
421
|
+
});
|
|
399
422
|
return server;
|
|
400
423
|
}
|
|
401
424
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAQnC,MAAM,UAAU,cAAc,CAC5B,QAAgB,EAChB,IAA6B,EAC7B,MAAsB;IAEtB,QAAQ,QAAQ,EAAE,CAAC;QACjB,+BAA+B;QAC/B,KAAK,kBAAkB;YACrB,OAAO,MAAM,CAAC,UAAU,CAAC;gBACvB,UAAU,EAAE,IAAI,CAAC,WAAqB;gBACtC,OAAO,EAAE,IAAI,CAAC,QAA8B;gBAC5C,OAAO,EAAE,IAAI,CAAC,QAA8B;gBA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CAAC;KACH,CAAC,CAAC,CAAC;IAEJ,gBAAgB;IAChB,MAAM,CAAC,iBAAiB,CAAC,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACpE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAE/B,IAAI,GAAG,KAAK,oBAAoB,EAAE,CAAC;YACjC,OAAO;gBACL,QAAQ,EAAE,CAAC;wBACT,GAAG,EAAE,oBAAoB;wBACzB,QAAQ,EAAE,kBAAkB;wBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACnB,IAAI,EAAE,qBAAqB;4BAC3B,OAAO,EAAE,OAAO;4BAChB,SAAS,EAAE,CAAC,CAAC,MAAM;4BACnB,SAAS,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC;4BAC/B,eAAe,EAAE,KAAK,CAAC,MAAM;4BAC7B,eAAe,EAAE;gCACf,MAAM,EAAE,EAAE;gCACV,aAAa,EAAE,CAAC;gCAChB,SAAS,EAAE,CAAC;gCACZ,GAAG,EAAE,CAAC;gCACN,OAAO,EAAE,CAAC;6BACX;yBACF,EAAE,IAAI,EAAE,CAAC,CAAC;qBACZ,CAAC;aACH,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node2flow/google-calendar-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MCP server for Google Calendar — create events, manage calendars, check availability, and share calendars through 28 tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
package/src/server.ts
CHANGED
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
* Shared MCP Server — used by both Node.js (index.ts) and CF Worker (worker.ts)
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
6
|
+
import {
|
|
7
|
+
CallToolRequestSchema,
|
|
8
|
+
ListToolsRequestSchema,
|
|
9
|
+
ListPromptsRequestSchema,
|
|
10
|
+
GetPromptRequestSchema,
|
|
11
|
+
ListResourcesRequestSchema,
|
|
12
|
+
ReadResourceRequestSchema,
|
|
13
|
+
} from '@modelcontextprotocol/sdk/types.js';
|
|
7
14
|
import { CalendarClient } from './calendar-client.js';
|
|
8
15
|
import { TOOLS } from './tools.js';
|
|
9
16
|
|
|
@@ -259,189 +266,205 @@ export function handleToolCall(
|
|
|
259
266
|
}
|
|
260
267
|
}
|
|
261
268
|
|
|
262
|
-
export function createServer(config?: CalendarMcpConfig) {
|
|
263
|
-
const server = new
|
|
264
|
-
name: 'google-calendar-mcp',
|
|
265
|
-
|
|
266
|
-
|
|
269
|
+
export function createServer(config?: CalendarMcpConfig): Server {
|
|
270
|
+
const server = new Server(
|
|
271
|
+
{ name: 'google-calendar-mcp', version: '1.0.0' },
|
|
272
|
+
{ capabilities: { tools: {}, prompts: {}, resources: {} } }
|
|
273
|
+
);
|
|
267
274
|
|
|
268
275
|
let client: CalendarClient | null = null;
|
|
269
276
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
277
|
+
// List available tools
|
|
278
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
279
|
+
tools: TOOLS.map(tool => {
|
|
280
|
+
const hasProperties = Object.keys(tool.inputSchema.properties).length > 0;
|
|
281
|
+
return {
|
|
282
|
+
name: tool.name,
|
|
274
283
|
description: tool.description,
|
|
275
|
-
inputSchema: tool.inputSchema
|
|
284
|
+
...(hasProperties ? { inputSchema: tool.inputSchema } : {}),
|
|
276
285
|
annotations: tool.annotations,
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
config?.clientId ||
|
|
281
|
-
(args as Record<string, unknown>).GOOGLE_CLIENT_ID as string;
|
|
282
|
-
const clientSecret =
|
|
283
|
-
config?.clientSecret ||
|
|
284
|
-
(args as Record<string, unknown>).GOOGLE_CLIENT_SECRET as string;
|
|
285
|
-
const refreshToken =
|
|
286
|
-
config?.refreshToken ||
|
|
287
|
-
(args as Record<string, unknown>).GOOGLE_REFRESH_TOKEN as string;
|
|
286
|
+
};
|
|
287
|
+
}),
|
|
288
|
+
}));
|
|
288
289
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
isError: true,
|
|
293
|
-
};
|
|
294
|
-
}
|
|
290
|
+
// Handle tool calls
|
|
291
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
292
|
+
const { name, arguments: args } = request.params;
|
|
295
293
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
294
|
+
try {
|
|
295
|
+
const clientId =
|
|
296
|
+
config?.clientId ||
|
|
297
|
+
(args as Record<string, unknown>)?.GOOGLE_CLIENT_ID as string;
|
|
298
|
+
const clientSecret =
|
|
299
|
+
config?.clientSecret ||
|
|
300
|
+
(args as Record<string, unknown>)?.GOOGLE_CLIENT_SECRET as string;
|
|
301
|
+
const refreshToken =
|
|
302
|
+
config?.refreshToken ||
|
|
303
|
+
(args as Record<string, unknown>)?.GOOGLE_REFRESH_TOKEN as string;
|
|
299
304
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
isError: false,
|
|
306
|
-
};
|
|
307
|
-
} catch (error) {
|
|
308
|
-
return {
|
|
309
|
-
content: [{ type: 'text' as const, text: `Error: ${error instanceof Error ? error.message : String(error)}` }],
|
|
310
|
-
isError: true,
|
|
311
|
-
};
|
|
312
|
-
}
|
|
305
|
+
if (!clientId || !clientSecret || !refreshToken) {
|
|
306
|
+
return {
|
|
307
|
+
content: [{ type: 'text' as const, text: 'Error: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GOOGLE_REFRESH_TOKEN are all required.' }],
|
|
308
|
+
isError: true,
|
|
309
|
+
};
|
|
313
310
|
}
|
|
314
|
-
);
|
|
315
|
-
}
|
|
316
311
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
'Guide for creating events, recurring schedules, attendees, and reminders',
|
|
321
|
-
async () => ({
|
|
322
|
-
messages: [{
|
|
323
|
-
role: 'user' as const,
|
|
324
|
-
content: {
|
|
325
|
-
type: 'text' as const,
|
|
326
|
-
text: [
|
|
327
|
-
'You are a Google Calendar scheduling assistant.',
|
|
328
|
-
'',
|
|
329
|
-
'Creating events:',
|
|
330
|
-
'1. **Timed event** — gcal_create_event with start_date_time + end_date_time (RFC 3339)',
|
|
331
|
-
'2. **All-day event** — Use start_date + end_date (YYYY-MM-DD). Single day: start=15, end=16',
|
|
332
|
-
'3. **Quick add** — gcal_quick_add with natural language ("Meeting tomorrow 3pm")',
|
|
333
|
-
'4. **Attendees** — Pass email addresses array, set send_updates="all" to notify',
|
|
334
|
-
'',
|
|
335
|
-
'Recurring events:',
|
|
336
|
-
'1. **Daily** — recurrence: ["RRULE:FREQ=DAILY"]',
|
|
337
|
-
'2. **Weekly** — recurrence: ["RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR"]',
|
|
338
|
-
'3. **Monthly** — recurrence: ["RRULE:FREQ=MONTHLY;BYMONTHDAY=15"]',
|
|
339
|
-
'4. **Until date** — Add ;UNTIL=20261231T235959Z',
|
|
340
|
-
'5. **Count** — Add ;COUNT=10 for 10 occurrences',
|
|
341
|
-
'6. **Exceptions** — Add EXDATE entries to skip dates',
|
|
342
|
-
'7. **View instances** — gcal_list_instances to see individual occurrences',
|
|
343
|
-
'',
|
|
344
|
-
'Reminders:',
|
|
345
|
-
'- Default reminders: { "useDefault": true }',
|
|
346
|
-
'- Custom: { "useDefault": false, "overrides": [{ "method": "popup", "minutes": 10 }, { "method": "email", "minutes": 60 }] }',
|
|
347
|
-
'',
|
|
348
|
-
'Tips:',
|
|
349
|
-
'- Use "primary" as calendar_id for the main calendar',
|
|
350
|
-
'- Set transparency="transparent" for events that don\'t block time',
|
|
351
|
-
'- Use gcal_patch_event to change only specific fields without affecting others',
|
|
352
|
-
'- Use gcal_move_event to transfer events between calendars',
|
|
353
|
-
].join('\n'),
|
|
354
|
-
},
|
|
355
|
-
}],
|
|
356
|
-
}),
|
|
357
|
-
);
|
|
312
|
+
if (!client || config?.clientId !== clientId) {
|
|
313
|
+
client = new CalendarClient({ clientId, clientSecret, refreshToken });
|
|
314
|
+
}
|
|
358
315
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
'- **By time** — time_min + time_max (RFC 3339) to filter date range',
|
|
373
|
-
'- **Expand recurring** — single_events=true to see individual instances',
|
|
374
|
-
'- **Sort** — order_by="startTime" (requires singleEvents) or "updated"',
|
|
375
|
-
'- **Pagination** — Use max_results + page_token for large result sets',
|
|
376
|
-
'',
|
|
377
|
-
'Managing calendars:',
|
|
378
|
-
'1. **List all** — gcal_list_calendars to see subscribed calendars',
|
|
379
|
-
'2. **Create** — gcal_create_calendar for a new secondary calendar',
|
|
380
|
-
'3. **Customize** — gcal_update_calendar_entry for display color, name override',
|
|
381
|
-
'4. **Subscribe** — gcal_add_calendar to add a shared calendar',
|
|
382
|
-
'5. **Unsubscribe** — gcal_remove_calendar (doesn\'t delete the calendar)',
|
|
383
|
-
'',
|
|
384
|
-
'Sharing calendars (ACL):',
|
|
385
|
-
'- **freeBusyReader** — Can only see free/busy',
|
|
386
|
-
'- **reader** — Can see event details',
|
|
387
|
-
'- **writer** — Can create and edit events',
|
|
388
|
-
'- **owner** — Full control including sharing',
|
|
389
|
-
'- scope_type: "user" (email), "group" (group email), "domain", or "default" (public)',
|
|
390
|
-
'',
|
|
391
|
-
'Checking availability:',
|
|
392
|
-
'- gcal_query_freebusy with time range and calendar IDs',
|
|
393
|
-
'- Returns busy time blocks for each calendar',
|
|
394
|
-
'- Use to find free slots for scheduling meetings',
|
|
395
|
-
'',
|
|
396
|
-
'Colors:',
|
|
397
|
-
'- gcal_get_colors for color palette (IDs 1-24 for calendars, 1-11 for events)',
|
|
398
|
-
'- Apply to events: color_id in gcal_create_event',
|
|
399
|
-
'- Apply to calendars: color_id in gcal_update_calendar_entry',
|
|
400
|
-
].join('\n'),
|
|
401
|
-
},
|
|
402
|
-
}],
|
|
403
|
-
}),
|
|
404
|
-
);
|
|
316
|
+
const result = await handleToolCall(name, args || {}, client);
|
|
317
|
+
const text = result === undefined ? '{"success": true}' : JSON.stringify(result, null, 2);
|
|
318
|
+
return {
|
|
319
|
+
content: [{ type: 'text' as const, text }],
|
|
320
|
+
isError: false,
|
|
321
|
+
};
|
|
322
|
+
} catch (error) {
|
|
323
|
+
return {
|
|
324
|
+
content: [{ type: 'text' as const, text: `Error: ${error instanceof Error ? error.message : String(error)}` }],
|
|
325
|
+
isError: true,
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
});
|
|
405
329
|
|
|
406
|
-
//
|
|
407
|
-
server.
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
330
|
+
// List prompts
|
|
331
|
+
server.setRequestHandler(ListPromptsRequestSchema, async () => ({
|
|
332
|
+
prompts: [
|
|
333
|
+
{ name: 'schedule-and-manage', description: 'Guide for creating events, recurring schedules, attendees, and reminders' },
|
|
334
|
+
{ name: 'search-and-organize', description: 'Guide for searching events, managing calendars, sharing, and checking availability' },
|
|
335
|
+
],
|
|
336
|
+
}));
|
|
337
|
+
|
|
338
|
+
// Get prompt
|
|
339
|
+
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
340
|
+
const { name } = request.params;
|
|
341
|
+
|
|
342
|
+
if (name === 'schedule-and-manage') {
|
|
343
|
+
return {
|
|
344
|
+
messages: [{
|
|
345
|
+
role: 'user' as const,
|
|
346
|
+
content: {
|
|
347
|
+
type: 'text' as const,
|
|
348
|
+
text: [
|
|
349
|
+
'You are a Google Calendar scheduling assistant.',
|
|
350
|
+
'',
|
|
351
|
+
'Creating events:',
|
|
352
|
+
'1. **Timed event** — gcal_create_event with start_date_time + end_date_time (RFC 3339)',
|
|
353
|
+
'2. **All-day event** — Use start_date + end_date (YYYY-MM-DD). Single day: start=15, end=16',
|
|
354
|
+
'3. **Quick add** — gcal_quick_add with natural language ("Meeting tomorrow 3pm")',
|
|
355
|
+
'4. **Attendees** — Pass email addresses array, set send_updates="all" to notify',
|
|
356
|
+
'',
|
|
357
|
+
'Recurring events:',
|
|
358
|
+
'1. **Daily** — recurrence: ["RRULE:FREQ=DAILY"]',
|
|
359
|
+
'2. **Weekly** — recurrence: ["RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR"]',
|
|
360
|
+
'3. **Monthly** — recurrence: ["RRULE:FREQ=MONTHLY;BYMONTHDAY=15"]',
|
|
361
|
+
'4. **Until date** — Add ;UNTIL=20261231T235959Z',
|
|
362
|
+
'5. **Count** — Add ;COUNT=10 for 10 occurrences',
|
|
363
|
+
'6. **Exceptions** — Add EXDATE entries to skip dates',
|
|
364
|
+
'7. **View instances** — gcal_list_instances to see individual occurrences',
|
|
365
|
+
'',
|
|
366
|
+
'Reminders:',
|
|
367
|
+
'- Default reminders: { "useDefault": true }',
|
|
368
|
+
'- Custom: { "useDefault": false, "overrides": [{ "method": "popup", "minutes": 10 }, { "method": "email", "minutes": 60 }] }',
|
|
369
|
+
'',
|
|
370
|
+
'Tips:',
|
|
371
|
+
'- Use "primary" as calendar_id for the main calendar',
|
|
372
|
+
'- Set transparency="transparent" for events that don\'t block time',
|
|
373
|
+
'- Use gcal_patch_event to change only specific fields without affecting others',
|
|
374
|
+
'- Use gcal_move_event to transfer events between calendars',
|
|
375
|
+
].join('\n'),
|
|
430
376
|
},
|
|
431
|
-
},
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
377
|
+
}],
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
if (name === 'search-and-organize') {
|
|
382
|
+
return {
|
|
383
|
+
messages: [{
|
|
384
|
+
role: 'user' as const,
|
|
385
|
+
content: {
|
|
386
|
+
type: 'text' as const,
|
|
387
|
+
text: [
|
|
388
|
+
'You are a Google Calendar organization assistant.',
|
|
389
|
+
'',
|
|
390
|
+
'Searching events:',
|
|
391
|
+
'- **By text** — q parameter searches summary, description, location, attendees',
|
|
392
|
+
'- **By time** — time_min + time_max (RFC 3339) to filter date range',
|
|
393
|
+
'- **Expand recurring** — single_events=true to see individual instances',
|
|
394
|
+
'- **Sort** — order_by="startTime" (requires singleEvents) or "updated"',
|
|
395
|
+
'- **Pagination** — Use max_results + page_token for large result sets',
|
|
396
|
+
'',
|
|
397
|
+
'Managing calendars:',
|
|
398
|
+
'1. **List all** — gcal_list_calendars to see subscribed calendars',
|
|
399
|
+
'2. **Create** — gcal_create_calendar for a new secondary calendar',
|
|
400
|
+
'3. **Customize** — gcal_update_calendar_entry for display color, name override',
|
|
401
|
+
'4. **Subscribe** — gcal_add_calendar to add a shared calendar',
|
|
402
|
+
'5. **Unsubscribe** — gcal_remove_calendar (doesn\'t delete the calendar)',
|
|
403
|
+
'',
|
|
404
|
+
'Sharing calendars (ACL):',
|
|
405
|
+
'- **freeBusyReader** — Can only see free/busy',
|
|
406
|
+
'- **reader** — Can see event details',
|
|
407
|
+
'- **writer** — Can create and edit events',
|
|
408
|
+
'- **owner** — Full control including sharing',
|
|
409
|
+
'- scope_type: "user" (email), "group" (group email), "domain", or "default" (public)',
|
|
410
|
+
'',
|
|
411
|
+
'Checking availability:',
|
|
412
|
+
'- gcal_query_freebusy with time range and calendar IDs',
|
|
413
|
+
'- Returns busy time blocks for each calendar',
|
|
414
|
+
'- Use to find free slots for scheduling meetings',
|
|
415
|
+
'',
|
|
416
|
+
'Colors:',
|
|
417
|
+
'- gcal_get_colors for color palette (IDs 1-24 for calendars, 1-11 for events)',
|
|
418
|
+
'- Apply to events: color_id in gcal_create_event',
|
|
419
|
+
'- Apply to calendars: color_id in gcal_update_calendar_entry',
|
|
420
|
+
].join('\n'),
|
|
421
|
+
},
|
|
422
|
+
}],
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
throw new Error(`Unknown prompt: ${name}`);
|
|
427
|
+
});
|
|
435
428
|
|
|
436
|
-
//
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
429
|
+
// List resources
|
|
430
|
+
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
431
|
+
resources: [{
|
|
432
|
+
uri: 'gcal://server-info',
|
|
433
|
+
name: 'server-info',
|
|
434
|
+
description: 'Connection status and available tools for this Google Calendar MCP server',
|
|
435
|
+
mimeType: 'application/json',
|
|
436
|
+
}],
|
|
444
437
|
}));
|
|
445
438
|
|
|
439
|
+
// Read resource
|
|
440
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
441
|
+
const { uri } = request.params;
|
|
442
|
+
|
|
443
|
+
if (uri === 'gcal://server-info') {
|
|
444
|
+
return {
|
|
445
|
+
contents: [{
|
|
446
|
+
uri: 'gcal://server-info',
|
|
447
|
+
mimeType: 'application/json',
|
|
448
|
+
text: JSON.stringify({
|
|
449
|
+
name: 'google-calendar-mcp',
|
|
450
|
+
version: '1.0.0',
|
|
451
|
+
connected: !!config,
|
|
452
|
+
has_oauth: !!(config?.clientId),
|
|
453
|
+
tools_available: TOOLS.length,
|
|
454
|
+
tool_categories: {
|
|
455
|
+
events: 10,
|
|
456
|
+
calendar_list: 5,
|
|
457
|
+
calendars: 5,
|
|
458
|
+
acl: 5,
|
|
459
|
+
utility: 3,
|
|
460
|
+
},
|
|
461
|
+
}, null, 2),
|
|
462
|
+
}],
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
throw new Error(`Unknown resource: ${uri}`);
|
|
467
|
+
});
|
|
468
|
+
|
|
446
469
|
return server;
|
|
447
470
|
}
|