@availsync/mcp 0.1.0-alpha.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Availsync
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,58 @@
1
+ # @availsync/mcp
2
+
3
+ MCP server for Availsync. Use it with Claude Desktop, Cursor, or another stdio MCP client so an agent can check availability, preview conflicts, claim a repo/project, extend a live claim, and release it when finished.
4
+
5
+ ## Install
6
+
7
+ Use the explicit alpha tag during the pilot:
8
+
9
+ ```bash
10
+ npx -y @availsync/mcp@alpha --help
11
+ ```
12
+
13
+ ## Claude or Cursor config
14
+
15
+ ```json
16
+ {
17
+ "mcpServers": {
18
+ "availsync": {
19
+ "command": "npx",
20
+ "args": ["-y", "@availsync/mcp@alpha"],
21
+ "env": {
22
+ "AVAILSYNC_API_URL": "https://availsync.dev",
23
+ "AVAILSYNC_AGENT_ID": "AGENT_ID",
24
+ "AVAILSYNC_API_KEY": "API_KEY"
25
+ }
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ ## Environment
32
+
33
+ ```bash
34
+ AVAILSYNC_API_URL=https://availsync.dev
35
+ AVAILSYNC_AGENT_ID=AGENT_ID
36
+ AVAILSYNC_API_KEY=API_KEY
37
+ ```
38
+
39
+ `AVAILSYNC_API_KEY` is a runtime secret. Keep it in your MCP/client secret store or environment, not in prompts, repos, or browser-visible code.
40
+
41
+ ## Tools
42
+
43
+ - `check_work_slot`
44
+ - `claim_work_slot`
45
+ - `extend_work_slot`
46
+ - `release_work_slot`
47
+ - `check_availability`
48
+ - `preview_conflict`
49
+ - `book_slot`
50
+ - `release_slot`
51
+
52
+ Recommended production flow for coding agents:
53
+
54
+ ```text
55
+ heartbeat -> check_work_slot -> claim_work_slot -> extend_work_slot while working -> release_work_slot
56
+ ```
57
+
58
+ If Availsync is unavailable in enforce mode, stop the agent run instead of editing files unguarded. In observe mode, you can choose to continue and record what Availsync would have blocked.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export declare function main(): Promise<void>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AA4UA,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAc1C"}
package/dist/index.js ADDED
@@ -0,0 +1,274 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
+ import { z } from 'zod';
5
+ import { createHash } from 'crypto';
6
+ import { fileURLToPath } from 'url';
7
+ function printHelp() {
8
+ console.log(`Availsync MCP server
9
+
10
+ Environment:
11
+ AVAILSYNC_API_URL Base URL for Availsync, default https://availsync.dev
12
+ AVAILSYNC_AGENT_ID Agent UUID shown in the Availsync dashboard
13
+ AVAILSYNC_API_KEY Agent API key, stored as a runtime secret
14
+
15
+ Tools:
16
+ check_availability Check available slots before booking
17
+ preview_conflict Preview who would win before booking
18
+ book_slot Reserve a slot
19
+ release_slot Release a booked hold
20
+ check_work_slot Check whether a coding agent can work on a repo/project
21
+ claim_work_slot Claim a repo/project before a coding agent starts
22
+ extend_work_slot Extend a live work claim while the agent is still working
23
+ release_work_slot Release a repo/project work claim
24
+
25
+ Status:
26
+ The server sends a heartbeat to Availsync on startup and then every 60 seconds.
27
+
28
+ Production flow:
29
+ heartbeat -> check_work_slot -> claim_work_slot -> extend_work_slot while working -> release_work_slot
30
+ `);
31
+ }
32
+ function getConfig() {
33
+ const apiUrl = process.env.AVAILSYNC_API_URL || 'https://availsync.dev';
34
+ const apiKey = process.env.AVAILSYNC_API_KEY;
35
+ if (!apiKey) {
36
+ throw new Error('AVAILSYNC_API_KEY is required');
37
+ }
38
+ return { apiUrl: apiUrl.replace(/\/$/, ''), apiKey };
39
+ }
40
+ async function requestAvailsync(method, path, body, extraHeaders = {}) {
41
+ const { apiUrl, apiKey } = getConfig();
42
+ const response = await fetch(`${apiUrl}${path}`, {
43
+ method,
44
+ headers: {
45
+ Authorization: `Bearer ${apiKey}`,
46
+ 'Content-Type': 'application/json',
47
+ ...extraHeaders,
48
+ },
49
+ body: body ? JSON.stringify(body) : undefined,
50
+ });
51
+ const text = await response.text();
52
+ const payload = text ? JSON.parse(text) : {};
53
+ if (!response.ok) {
54
+ return {
55
+ status: response.status,
56
+ error: payload,
57
+ };
58
+ }
59
+ return payload;
60
+ }
61
+ function deterministicWorkKey(input) {
62
+ return createHash('sha256')
63
+ .update(`${input.agent_id}:${input.resource_type}:${input.resource_key}:${input.start_at ?? 'now'}:${input.reason ?? ''}`)
64
+ .digest('hex');
65
+ }
66
+ async function sendHeartbeat() {
67
+ await requestAvailsync('POST', '/v1/mcp/heartbeat', {
68
+ client_name: 'availsync-mcp',
69
+ });
70
+ }
71
+ function jsonContent(payload) {
72
+ return {
73
+ content: [
74
+ {
75
+ type: 'text',
76
+ text: JSON.stringify(payload, null, 2),
77
+ },
78
+ ],
79
+ };
80
+ }
81
+ const usageSchema = z
82
+ .object({
83
+ provider: z.string().optional(),
84
+ model: z.string().optional(),
85
+ input_tokens: z.number().int().min(0).optional(),
86
+ output_tokens: z.number().int().min(0).optional(),
87
+ total_tokens: z.number().int().min(0).optional(),
88
+ estimated_cost_usd: z.number().min(0).optional(),
89
+ })
90
+ .optional();
91
+ async function reportUsage(activityType, usage) {
92
+ if (!usage)
93
+ return;
94
+ await requestAvailsync('POST', '/v1/activity/usage', {
95
+ activity_type: activityType,
96
+ client_name: 'availsync-mcp',
97
+ ...usage,
98
+ });
99
+ }
100
+ function createServer() {
101
+ const server = new McpServer({
102
+ name: 'availsync',
103
+ version: '0.1.0',
104
+ });
105
+ server.registerTool('check_availability', {
106
+ description: 'Check available time slots for an AI scheduling agent before booking. Always call this before book_slot.',
107
+ inputSchema: {
108
+ agent_id: z.string().uuid().describe('UUID of the agent to check availability for'),
109
+ from: z.string().datetime().describe('Start of search window (ISO 8601 UTC)'),
110
+ to: z.string().datetime().describe('End of search window (ISO 8601 UTC)'),
111
+ duration_minutes: z.number().describe('Required meeting duration in minutes'),
112
+ usage: usageSchema,
113
+ },
114
+ }, async ({ agent_id, from, to, duration_minutes, usage }) => {
115
+ const query = new URLSearchParams({
116
+ agent_id,
117
+ from,
118
+ to,
119
+ duration_minutes: String(duration_minutes),
120
+ });
121
+ const result = await requestAvailsync('GET', `/v1/availability?${query.toString()}`);
122
+ await reportUsage('mcp_check_availability', usage);
123
+ return jsonContent(result);
124
+ });
125
+ server.registerTool('preview_conflict', {
126
+ description: 'Preview whether a proposed slot would be available, win, or lose before booking. Call this after check_availability and before book_slot.',
127
+ inputSchema: {
128
+ agent_id: z.string().uuid(),
129
+ start_at: z.string().datetime(),
130
+ end_at: z.string().datetime(),
131
+ reason: z.string().max(500).optional(),
132
+ usage: usageSchema,
133
+ },
134
+ }, async ({ agent_id, start_at, end_at, reason, usage }) => {
135
+ const result = await requestAvailsync('POST', '/v1/conflicts/check', {
136
+ agent_id,
137
+ start_at,
138
+ end_at,
139
+ ...(reason ? { reason } : {}),
140
+ });
141
+ await reportUsage('mcp_preview_conflict', usage);
142
+ return jsonContent(result);
143
+ });
144
+ server.registerTool('book_slot', {
145
+ description: 'Reserve a time slot. Returns confirmed hold or 409 with alternative suggestions if slot is taken by higher-priority agent.',
146
+ inputSchema: {
147
+ agent_id: z.string().uuid(),
148
+ start_at: z.string().datetime(),
149
+ end_at: z.string().datetime(),
150
+ reason: z.string().max(500).optional(),
151
+ usage: usageSchema,
152
+ },
153
+ }, async ({ agent_id, start_at, end_at, reason, usage }) => {
154
+ const result = await requestAvailsync('POST', '/v1/holds', {
155
+ agent_id,
156
+ start_at,
157
+ end_at,
158
+ ...(reason ? { reason } : {}),
159
+ });
160
+ await reportUsage('mcp_book_slot', usage);
161
+ return jsonContent(result);
162
+ });
163
+ server.registerTool('release_slot', {
164
+ description: 'Release a previously booked hold so other agents can use the time.',
165
+ inputSchema: {
166
+ hold_id: z.string().uuid(),
167
+ usage: usageSchema,
168
+ },
169
+ }, async ({ hold_id, usage }) => {
170
+ const result = await requestAvailsync('DELETE', `/v1/holds/${hold_id}`);
171
+ await reportUsage('mcp_release_slot', usage);
172
+ return jsonContent(result);
173
+ });
174
+ server.registerTool('check_work_slot', {
175
+ description: 'Check whether a coding agent can work on a repo or project before it starts. If status is would_lose, skip the run.',
176
+ inputSchema: {
177
+ agent_id: z.string().uuid(),
178
+ resource_type: z.enum(['repo', 'project']),
179
+ resource_key: z.string().min(1),
180
+ label: z.string().optional(),
181
+ start_at: z.string().datetime().optional(),
182
+ duration_minutes: z.number().int().min(1).max(240).optional(),
183
+ reason: z.string().max(500).optional(),
184
+ usage: usageSchema,
185
+ },
186
+ }, async ({ agent_id, resource_type, resource_key, label, start_at, duration_minutes, reason, usage }) => {
187
+ const result = await requestAvailsync('POST', '/v1/work/check', {
188
+ agent_id,
189
+ resource_type,
190
+ resource_key,
191
+ ...(label ? { label } : {}),
192
+ ...(start_at ? { start_at } : {}),
193
+ ...(duration_minutes ? { duration_minutes } : {}),
194
+ ...(reason ? { reason } : {}),
195
+ });
196
+ await reportUsage('mcp_check_work_slot', usage);
197
+ return jsonContent(result);
198
+ });
199
+ server.registerTool('claim_work_slot', {
200
+ description: 'Claim a repo or project before a coding agent starts. Use the returned claim id and release it when done.',
201
+ inputSchema: {
202
+ agent_id: z.string().uuid(),
203
+ resource_type: z.enum(['repo', 'project']),
204
+ resource_key: z.string().min(1),
205
+ label: z.string().optional(),
206
+ start_at: z.string().datetime().optional(),
207
+ duration_minutes: z.number().int().min(1).max(240).optional(),
208
+ reason: z.string().max(500).optional(),
209
+ idempotency_key: z.string().min(1).max(200).optional(),
210
+ usage: usageSchema,
211
+ },
212
+ }, async ({ agent_id, resource_type, resource_key, label, start_at, duration_minutes, reason, idempotency_key, usage }) => {
213
+ const key = idempotency_key ?? deterministicWorkKey({ agent_id, resource_type, resource_key, start_at, reason });
214
+ const result = await requestAvailsync('POST', '/v1/work/claim', {
215
+ agent_id,
216
+ resource_type,
217
+ resource_key,
218
+ ...(label ? { label } : {}),
219
+ ...(start_at ? { start_at } : {}),
220
+ ...(duration_minutes ? { duration_minutes } : {}),
221
+ ...(reason ? { reason } : {}),
222
+ }, { 'Idempotency-Key': key });
223
+ await reportUsage('mcp_claim_work_slot', usage);
224
+ return jsonContent(result);
225
+ });
226
+ server.registerTool('extend_work_slot', {
227
+ description: 'Extend an active work claim while a coding agent is still working. Call periodically before expires_at.',
228
+ inputSchema: {
229
+ claim_id: z.string().uuid(),
230
+ duration_minutes: z.number().int().min(1).max(120).optional(),
231
+ usage: usageSchema,
232
+ },
233
+ }, async ({ claim_id, duration_minutes, usage }) => {
234
+ const result = await requestAvailsync('POST', `/v1/work/claims/${claim_id}/extend`, {
235
+ ...(duration_minutes ? { duration_minutes } : {}),
236
+ });
237
+ await reportUsage('mcp_extend_work_slot', usage);
238
+ return jsonContent(result);
239
+ });
240
+ server.registerTool('release_work_slot', {
241
+ description: 'Release a repo or project work claim so another coding agent can work.',
242
+ inputSchema: {
243
+ claim_id: z.string().uuid(),
244
+ usage: usageSchema,
245
+ },
246
+ }, async ({ claim_id, usage }) => {
247
+ const result = await requestAvailsync('DELETE', `/v1/work/claims/${claim_id}`);
248
+ await reportUsage('mcp_release_work_slot', usage);
249
+ return jsonContent(result);
250
+ });
251
+ return server;
252
+ }
253
+ export async function main() {
254
+ if (process.argv.includes('--help') || process.argv.includes('-h')) {
255
+ printHelp();
256
+ return;
257
+ }
258
+ const server = createServer();
259
+ const transport = new StdioServerTransport();
260
+ void sendHeartbeat().catch(() => { });
261
+ const heartbeat = setInterval(() => {
262
+ void sendHeartbeat().catch(() => { });
263
+ }, 60_000);
264
+ heartbeat.unref?.();
265
+ await server.connect(transport);
266
+ }
267
+ const isDirectRun = process.argv[1] ? fileURLToPath(import.meta.url) === process.argv[1] : false;
268
+ if (isDirectRun) {
269
+ main().catch((error) => {
270
+ console.error('Server error:', error);
271
+ process.exit(1);
272
+ });
273
+ }
274
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAIpC,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;CAsBb,CAAC,CAAC;AACH,CAAC;AAED,SAAS,SAAS;IAChB,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G,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAEjG,IAAI,WAAW,EAAE,CAAC;IAChB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACrB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;QACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@availsync/mcp",
3
+ "version": "0.1.0-alpha.0",
4
+ "description": "MCP server for Availsync coding-agent and scheduling guardrails.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "sideEffects": false,
8
+ "bin": {
9
+ "availsync-mcp": "./dist/index.js"
10
+ },
11
+ "main": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "homepage": "https://availsync.dev/docs/quickstart",
25
+ "keywords": [
26
+ "availsync",
27
+ "mcp",
28
+ "claude",
29
+ "cursor",
30
+ "ai-agents",
31
+ "coding-agents",
32
+ "guardrails",
33
+ "repo-locks"
34
+ ],
35
+ "publishConfig": {
36
+ "access": "public",
37
+ "tag": "alpha"
38
+ },
39
+ "engines": {
40
+ "node": ">=18"
41
+ },
42
+ "scripts": {
43
+ "build": "tsc -p tsconfig.json",
44
+ "prepack": "npm run build",
45
+ "typecheck": "tsc -p tsconfig.json --noEmit",
46
+ "start": "node dist/index.js",
47
+ "test:help": "npm run build && node dist/index.js --help"
48
+ },
49
+ "dependencies": {
50
+ "@modelcontextprotocol/sdk": "^1.29.0",
51
+ "zod": "^4.4.3"
52
+ }
53
+ }