replicas-mcp 0.2.19 → 0.2.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-mcp",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@modelcontextprotocol/sdk": "^1.25.0",
17
- "zod": "^3.25.0"
17
+ "zod": "^4.0.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/node": "^20.11.17",
package/src/index.ts CHANGED
@@ -17,6 +17,13 @@ import {
17
17
  import {
18
18
  VALID_LIFECYCLE_POLICIES,
19
19
  } from '../../shared/src/routes/workspaces';
20
+ import { type ListEnvironmentsResponse } from '../../shared/src/routes/environment';
21
+ import {
22
+ automationRequestFromToolInput,
23
+ automationToolInputSchema,
24
+ environmentToolSummary,
25
+ REPLICAS_MCP_TOOLS,
26
+ } from '../../shared/src/replicas-mcp';
20
27
 
21
28
  const API_URL = process.env.REPLICAS_API_URL || 'https://api.replicas.dev';
22
29
  const API_KEY = process.env.REPLICAS_API_KEY;
@@ -71,7 +78,7 @@ type RegisterToolFn = (
71
78
 
72
79
  const server = new McpServer({
73
80
  name: 'replicas-mcp',
74
- version: '0.2.19',
81
+ version: '0.2.21',
75
82
  });
76
83
 
77
84
  function registerTool(
@@ -283,13 +290,6 @@ registerTool(
283
290
  const q = params.toString();
284
291
  const response = await api<ReadReplicaHistoryResponse>('GET', `/v1/replica/${args.id}/history${q ? '?' + q : ''}`);
285
292
 
286
- if (response.waking) {
287
- return {
288
- status: 'waking',
289
- message: 'Workspace is waking from sleep. Retry in 30-90 seconds.',
290
- };
291
- }
292
-
293
293
  const agentType = (response.coding_agent || 'claude') as AgentProvider;
294
294
  const messages = parseAgentEvents(response.events, agentType);
295
295
 
@@ -314,5 +314,22 @@ registerTool(
314
314
  (args) => api('GET', `/v1/replica/${args.id}/hooks`)
315
315
  );
316
316
 
317
+ registerTool(
318
+ REPLICAS_MCP_TOOLS.listEnvironments,
319
+ {
320
+ description: "List the organization's environments with their ids, descriptions, and repository bindings, for choosing an environment_id",
321
+ },
322
+ async () => (await api<ListEnvironmentsResponse>('GET', '/v1/environments')).environments.map(environmentToolSummary)
323
+ );
324
+
325
+ registerTool(
326
+ REPLICAS_MCP_TOOLS.createAutomation,
327
+ {
328
+ description: 'Create an organization automation that runs a prompt in an environment on a schedule or event trigger',
329
+ inputSchema: automationToolInputSchema.shape,
330
+ },
331
+ (args) => api('POST', '/v1/automations', automationRequestFromToolInput(automationToolInputSchema.parse(args)))
332
+ );
333
+
317
334
  const transport = new StdioServerTransport();
318
335
  await server.connect(transport);