@pipeworx/mcp-calendly 0.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/LICENSE +21 -0
- package/README.md +55 -0
- package/package.json +20 -0
- package/server.json +18 -0
- package/src/index.ts +190 -0
- package/tsconfig.json +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Pipeworx
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# mcp-calendly
|
|
2
|
+
|
|
3
|
+
Calendly MCP Pack — wraps the Calendly API v2 for scheduling data.
|
|
4
|
+
|
|
5
|
+
Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 250+ live data sources.
|
|
6
|
+
|
|
7
|
+
## Tools
|
|
8
|
+
|
|
9
|
+
| Tool | Description |
|
|
10
|
+
|------|-------------|
|
|
11
|
+
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"mcpServers": {
|
|
19
|
+
"calendly": {
|
|
20
|
+
"url": "https://gateway.pipeworx.io/calendly/mcp"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or connect to the full Pipeworx gateway for access to all 250+ data sources:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"pipeworx": {
|
|
32
|
+
"url": "https://gateway.pipeworx.io/mcp"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Using with ask_pipeworx
|
|
39
|
+
|
|
40
|
+
Instead of calling tools directly, you can ask questions in plain English:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
ask_pipeworx({ question: "your question about Calendly data" })
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The gateway picks the right tool and fills the arguments automatically.
|
|
47
|
+
|
|
48
|
+
## More
|
|
49
|
+
|
|
50
|
+
- [All tools and guides](https://github.com/pipeworx-io/examples)
|
|
51
|
+
- [pipeworx.io](https://pipeworx.io)
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pipeworx/mcp-calendly",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Calendly MCP Pack — wraps the Calendly API v2 for scheduling data.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
|
+
"types": "src/index.ts",
|
|
8
|
+
"keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "calendly"],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/pipeworx-io/mcp-calendly"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"typecheck": "tsc --noEmit"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"typescript": "^5.7.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.pipeworx-io/calendly",
|
|
4
|
+
"title": "Calendly",
|
|
5
|
+
"description": "Calendly MCP Pack — wraps the Calendly API v2 for scheduling data.",
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"websiteUrl": "https://pipeworx.io/packs/calendly",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/pipeworx-io/mcp-calendly",
|
|
10
|
+
"source": "github"
|
|
11
|
+
},
|
|
12
|
+
"remotes": [
|
|
13
|
+
{
|
|
14
|
+
"type": "streamable-http",
|
|
15
|
+
"url": "https://gateway.pipeworx.io/calendly/mcp"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
interface McpToolDefinition {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
inputSchema: {
|
|
5
|
+
type: 'object';
|
|
6
|
+
properties: Record<string, unknown>;
|
|
7
|
+
required?: string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface McpToolExport {
|
|
12
|
+
tools: McpToolDefinition[];
|
|
13
|
+
callTool: (name: string, args: Record<string, unknown>) => Promise<unknown>;
|
|
14
|
+
meter?: { credits: number };
|
|
15
|
+
cost?: Record<string, unknown>;
|
|
16
|
+
provider?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Calendly MCP Pack — wraps the Calendly API v2 for scheduling data.
|
|
21
|
+
*
|
|
22
|
+
* BYO key: pass _apiKey (Calendly personal access token), sent as a Bearer token.
|
|
23
|
+
* Auth: Authorization: Bearer <token>.
|
|
24
|
+
*
|
|
25
|
+
* Quirk: most endpoints REQUIRE a user or organization URI. Callers should call
|
|
26
|
+
* `current_user` first to obtain both URIs, then pass them to the other tools.
|
|
27
|
+
* Pagination via `count` + `page_token`.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
const BASE = 'https://api.calendly.com';
|
|
32
|
+
const UA = 'pipeworx-mcp-calendly/1.0 (+https://pipeworx.io)';
|
|
33
|
+
|
|
34
|
+
async function calendlyGet(apiKey: string, path: string, params?: URLSearchParams): Promise<unknown> {
|
|
35
|
+
const qs = params?.toString();
|
|
36
|
+
const url = `${BASE}${path}${qs ? `?${qs}` : ''}`;
|
|
37
|
+
const res = await fetch(url, {
|
|
38
|
+
headers: {
|
|
39
|
+
Authorization: `Bearer ${apiKey}`,
|
|
40
|
+
Accept: 'application/json',
|
|
41
|
+
'User-Agent': UA,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
if (!res.ok) {
|
|
45
|
+
const body = await res.text();
|
|
46
|
+
throw new Error(`Calendly: ${res.status} ${body.slice(0, 200)}`);
|
|
47
|
+
}
|
|
48
|
+
return res.json();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// -- Tool definitions --------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
const tools: McpToolExport['tools'] = [
|
|
54
|
+
{
|
|
55
|
+
name: 'current_user',
|
|
56
|
+
description:
|
|
57
|
+
'Get the current Calendly user for the supplied token. Returns the user URI and organization URI — call this FIRST, since list_scheduled_events and list_event_types require a user or organization URI.',
|
|
58
|
+
inputSchema: {
|
|
59
|
+
type: 'object' as const,
|
|
60
|
+
properties: {
|
|
61
|
+
_apiKey: { type: 'string', description: 'Calendly personal access token (sent as Bearer token)' },
|
|
62
|
+
},
|
|
63
|
+
required: ['_apiKey'],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'list_scheduled_events',
|
|
68
|
+
description:
|
|
69
|
+
'List scheduled meetings (events). Requires a user URI OR an organization URI (get them from current_user). Filter by status, time window, and paginate. Returns event URIs/UUIDs, names, start/end times, status, and locations.',
|
|
70
|
+
inputSchema: {
|
|
71
|
+
type: 'object' as const,
|
|
72
|
+
properties: {
|
|
73
|
+
_apiKey: { type: 'string', description: 'Calendly personal access token (sent as Bearer token)' },
|
|
74
|
+
user: { type: 'string', description: 'User URI (from current_user). Provide user OR organization.' },
|
|
75
|
+
organization: { type: 'string', description: 'Organization URI (from current_user). Provide user OR organization.' },
|
|
76
|
+
status: { type: 'string', enum: ['active', 'canceled'], description: 'Filter by event status.' },
|
|
77
|
+
min_start_time: { type: 'string', description: 'ISO 8601 timestamp; only events starting at/after this time.' },
|
|
78
|
+
max_start_time: { type: 'string', description: 'ISO 8601 timestamp; only events starting at/before this time.' },
|
|
79
|
+
count: { type: 'number', description: 'Number of results per page (default 20, max 100).' },
|
|
80
|
+
page_token: { type: 'string', description: 'Token from a previous response for the next page.' },
|
|
81
|
+
},
|
|
82
|
+
required: ['_apiKey'],
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'get_event',
|
|
87
|
+
description:
|
|
88
|
+
'Get a single scheduled event by its UUID (the last path segment of an event URI). Returns full event details including name, times, status, location, and event membership.',
|
|
89
|
+
inputSchema: {
|
|
90
|
+
type: 'object' as const,
|
|
91
|
+
properties: {
|
|
92
|
+
_apiKey: { type: 'string', description: 'Calendly personal access token (sent as Bearer token)' },
|
|
93
|
+
uuid: { type: 'string', description: 'Scheduled event UUID (last segment of the event URI).' },
|
|
94
|
+
},
|
|
95
|
+
required: ['_apiKey', 'uuid'],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'list_invitees',
|
|
100
|
+
description:
|
|
101
|
+
'List the invitees of a scheduled event by event UUID. Returns invitee names, emails, status (active/canceled), timezone, and answers to booking questions.',
|
|
102
|
+
inputSchema: {
|
|
103
|
+
type: 'object' as const,
|
|
104
|
+
properties: {
|
|
105
|
+
_apiKey: { type: 'string', description: 'Calendly personal access token (sent as Bearer token)' },
|
|
106
|
+
uuid: { type: 'string', description: 'Scheduled event UUID (last segment of the event URI).' },
|
|
107
|
+
status: { type: 'string', enum: ['active', 'canceled'], description: 'Filter invitees by status.' },
|
|
108
|
+
count: { type: 'number', description: 'Number of results per page (default 20, max 100).' },
|
|
109
|
+
page_token: { type: 'string', description: 'Token from a previous response for the next page.' },
|
|
110
|
+
},
|
|
111
|
+
required: ['_apiKey', 'uuid'],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'list_event_types',
|
|
116
|
+
description:
|
|
117
|
+
'List bookable event types (meeting templates). Requires a user URI OR an organization URI (get them from current_user). Returns event type URIs, names, durations, scheduling URLs, and active state.',
|
|
118
|
+
inputSchema: {
|
|
119
|
+
type: 'object' as const,
|
|
120
|
+
properties: {
|
|
121
|
+
_apiKey: { type: 'string', description: 'Calendly personal access token (sent as Bearer token)' },
|
|
122
|
+
user: { type: 'string', description: 'User URI (from current_user). Provide user OR organization.' },
|
|
123
|
+
organization: { type: 'string', description: 'Organization URI (from current_user). Provide user OR organization.' },
|
|
124
|
+
active: { type: 'boolean', description: 'If true, only return active event types.' },
|
|
125
|
+
count: { type: 'number', description: 'Number of results per page (default 20, max 100).' },
|
|
126
|
+
page_token: { type: 'string', description: 'Token from a previous response for the next page.' },
|
|
127
|
+
},
|
|
128
|
+
required: ['_apiKey'],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
// -- callTool dispatcher -----------------------------------------------------
|
|
134
|
+
|
|
135
|
+
async function callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
|
|
136
|
+
const apiKey = args._apiKey as string | undefined;
|
|
137
|
+
delete args._context;
|
|
138
|
+
delete args._apiKey;
|
|
139
|
+
|
|
140
|
+
if (!apiKey) throw new Error('_apiKey is required: pass your Calendly personal access token (sent as a Bearer token).');
|
|
141
|
+
|
|
142
|
+
switch (name) {
|
|
143
|
+
case 'current_user':
|
|
144
|
+
return calendlyGet(apiKey, '/users/me');
|
|
145
|
+
|
|
146
|
+
case 'list_scheduled_events': {
|
|
147
|
+
if (!args.user && !args.organization) {
|
|
148
|
+
throw new Error('list_scheduled_events requires a "user" or "organization" URI. Call current_user first to obtain them.');
|
|
149
|
+
}
|
|
150
|
+
const params = new URLSearchParams();
|
|
151
|
+
if (args.user) params.set('user', args.user as string);
|
|
152
|
+
if (args.organization) params.set('organization', args.organization as string);
|
|
153
|
+
if (args.status) params.set('status', args.status as string);
|
|
154
|
+
if (args.min_start_time) params.set('min_start_time', args.min_start_time as string);
|
|
155
|
+
if (args.max_start_time) params.set('max_start_time', args.max_start_time as string);
|
|
156
|
+
if (args.count) params.set('count', String(Math.min(100, args.count as number)));
|
|
157
|
+
if (args.page_token) params.set('page_token', args.page_token as string);
|
|
158
|
+
return calendlyGet(apiKey, '/scheduled_events', params);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
case 'get_event':
|
|
162
|
+
return calendlyGet(apiKey, `/scheduled_events/${encodeURIComponent(args.uuid as string)}`);
|
|
163
|
+
|
|
164
|
+
case 'list_invitees': {
|
|
165
|
+
const params = new URLSearchParams();
|
|
166
|
+
if (args.status) params.set('status', args.status as string);
|
|
167
|
+
if (args.count) params.set('count', String(Math.min(100, args.count as number)));
|
|
168
|
+
if (args.page_token) params.set('page_token', args.page_token as string);
|
|
169
|
+
return calendlyGet(apiKey, `/scheduled_events/${encodeURIComponent(args.uuid as string)}/invitees`, params);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
case 'list_event_types': {
|
|
173
|
+
if (!args.user && !args.organization) {
|
|
174
|
+
throw new Error('list_event_types requires a "user" or "organization" URI. Call current_user first to obtain them.');
|
|
175
|
+
}
|
|
176
|
+
const params = new URLSearchParams();
|
|
177
|
+
if (args.user) params.set('user', args.user as string);
|
|
178
|
+
if (args.organization) params.set('organization', args.organization as string);
|
|
179
|
+
if (args.active !== undefined) params.set('active', String(args.active));
|
|
180
|
+
if (args.count) params.set('count', String(Math.min(100, args.count as number)));
|
|
181
|
+
if (args.page_token) params.set('page_token', args.page_token as string);
|
|
182
|
+
return calendlyGet(apiKey, '/event_types', params);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
default:
|
|
186
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export default { tools, callTool, meter: { credits: 1 } } satisfies McpToolExport;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"strict": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"outDir": "dist",
|
|
10
|
+
"rootDir": "src",
|
|
11
|
+
"declaration": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src"]
|
|
14
|
+
}
|