@moor-sh/mcp 0.3.0 → 0.4.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +15 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moor-sh/mcp",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "MCP server for moor - lets AI agents (Claude Code, Cursor, etc.) manage your moor projects via the moor HTTP API.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -364,15 +364,27 @@ server.registerTool(
364
364
  "moor_exec",
365
365
  {
366
366
  title: "Execute Command",
367
- description: "Run a shell command inside a project's running container.",
367
+ description:
368
+ "Run a shell command inside a project's running container. Bounded by a per-call timeout (default 10 min, max 1 h). For jobs that may exceed an hour, wait for the async exec tools to ship.",
368
369
  inputSchema: z.object({
369
370
  project: z.string().describe("Project name or ID"),
370
371
  command: z.string().describe("Shell command to execute"),
372
+ timeout_ms: z
373
+ .number()
374
+ .int()
375
+ .min(1000)
376
+ .max(3_600_000)
377
+ .optional()
378
+ .describe(
379
+ "Max time in milliseconds before the exec is aborted. Default 600000 (10 min). Max 3600000 (1 h).",
380
+ ),
371
381
  }),
372
382
  },
373
- async ({ project, command }) => {
383
+ async ({ project, command, timeout_ms }) => {
374
384
  const p = await resolveProject(project);
375
- const res = await apiPost(`/api/projects/${p.id}/exec`, { command });
385
+ const body: Record<string, unknown> = { command };
386
+ if (timeout_ms !== undefined) body.timeout_ms = timeout_ms;
387
+ const res = await apiPost(`/api/projects/${p.id}/exec`, body);
376
388
  if (!res.ok) throw new Error(`Failed: ${await res.text()}`);
377
389
  const result = (await res.json()) as {
378
390
  exitCode: number;