mcp-agents 0.5.3 → 0.5.4

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 (3) hide show
  1. package/README.md +8 -4
  2. package/package.json +1 -1
  3. package/server.js +27 -7
package/README.md CHANGED
@@ -57,7 +57,9 @@ Each `--provider` flag maps to a single exposed tool:
57
57
  | Parameter | Type | Required | Description |
58
58
  |-----------|------|----------|-------------|
59
59
  | `prompt` | `string` | yes | The prompt to send to Claude Code |
60
- | `timeout_ms` | `integer` | no | Timeout in ms (default: 120 000) |
60
+ | `timeout_ms` | `integer` | no | Timeout in ms (default: 300 000 / 5 minutes) |
61
+
62
+ Any additional `tools/call` arguments are ignored (for example `model` or `model_reasoning_effort`).
61
63
 
62
64
  ### `gemini` parameters
63
65
 
@@ -65,7 +67,9 @@ Each `--provider` flag maps to a single exposed tool:
65
67
  |-----------|------|----------|-------------|
66
68
  | `prompt` | `string` | yes | The prompt to send to Gemini CLI |
67
69
  | `sandbox` | `boolean` | no | Run in sandbox mode (`-s` flag, default: false) |
68
- | `timeout_ms` | `integer` | no | Timeout in ms (default: 120 000) |
70
+ | `timeout_ms` | `integer` | no | Timeout in ms (default: 300 000 / 5 minutes) |
71
+
72
+ Any additional `tools/call` arguments are ignored (for example `model` or `model_reasoning_effort`).
69
73
 
70
74
  ### `codex` (pass-through)
71
75
 
@@ -98,14 +102,14 @@ Add entries to your project's `.mcp.json` (requires `npm i -g mcp-agents`):
98
102
  }
99
103
  ```
100
104
 
101
- Override codex defaults:
105
+ Override codex defaults at server startup (not via `tools/call` arguments):
102
106
 
103
107
  ```json
104
108
  {
105
109
  "mcpServers": {
106
110
  "codex": {
107
111
  "command": "mcp-agents",
108
- "args": ["--provider", "codex", "--model", "o3-pro", "--model_reasoning_effort", "medium"]
112
+ "args": ["--provider", "codex", "--model", "gpt-5.3-codex", "--model_reasoning_effort", "medium"]
109
113
  }
110
114
  }
111
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-agents",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "MCP server that wraps AI CLI tools (Claude Code, Gemini CLI, Codex CLI) for use by any MCP client",
5
5
  "type": "module",
6
6
  "bin": {
package/server.js CHANGED
@@ -29,7 +29,8 @@ const CLI_BACKENDS = {
29
29
  claude: {
30
30
  command: "claude",
31
31
  toolName: "claude_code",
32
- description: "Run Claude Code CLI with a prompt (via stdin).",
32
+ description:
33
+ "Run Claude Code CLI with a prompt (via stdin). Supports prompt + optional timeout_ms only; other arguments are ignored.",
33
34
  stdinPrompt: true,
34
35
  buildArgs: () => ["--no-session-persistence", "-p"],
35
36
  extraProperties: {},
@@ -37,7 +38,8 @@ const CLI_BACKENDS = {
37
38
  gemini: {
38
39
  command: "gemini",
39
40
  toolName: "gemini",
40
- description: "Run Gemini CLI (gemini -p) with a prompt.",
41
+ description:
42
+ "Run Gemini CLI (gemini -p) with a prompt. Supports prompt + optional timeout_ms/sandbox only; other arguments are ignored.",
41
43
  stdinPrompt: false,
42
44
  buildArgs: (prompt, opts) => {
43
45
  const args = [];
@@ -352,7 +354,7 @@ async function main() {
352
354
  const properties = {
353
355
  prompt: {
354
356
  type: "string",
355
- description: `Prompt for ${backend.command}`,
357
+ description: `Prompt for ${backend.command}. Unsupported extra arguments are ignored.`,
356
358
  },
357
359
  timeout_ms: {
358
360
  type: "integer",
@@ -379,7 +381,7 @@ async function main() {
379
381
  description: backend.description,
380
382
  inputSchema: {
381
383
  type: "object",
382
- additionalProperties: false,
384
+ additionalProperties: true,
383
385
  properties,
384
386
  required: ["prompt"],
385
387
  },
@@ -404,8 +406,26 @@ async function main() {
404
406
  };
405
407
  }
406
408
 
407
- const prompt = toStringArg(params.arguments?.prompt);
408
- const timeoutMsRaw = params.arguments?.timeout_ms;
409
+ const rawArgs =
410
+ params.arguments && typeof params.arguments === "object"
411
+ ? params.arguments
412
+ : {};
413
+ const allowedArgKeys = new Set([
414
+ "prompt",
415
+ "timeout_ms",
416
+ ...Object.keys(backend.extraProperties),
417
+ ]);
418
+ const ignoredArgKeys = Object.keys(rawArgs).filter(
419
+ (key) => !allowedArgKeys.has(key),
420
+ );
421
+ if (ignoredArgKeys.length > 0) {
422
+ logErr(
423
+ `[mcp-agents] tools/call: ignoring unsupported args: ${ignoredArgKeys.join(", ")}`,
424
+ );
425
+ }
426
+
427
+ const prompt = toStringArg(rawArgs.prompt);
428
+ const timeoutMsRaw = rawArgs.timeout_ms;
409
429
  const timeoutMs = Number.isInteger(timeoutMsRaw)
410
430
  ? timeoutMsRaw
411
431
  : effectiveTimeout;
@@ -424,7 +444,7 @@ async function main() {
424
444
 
425
445
  const extraOpts = {};
426
446
  for (const key of Object.keys(backend.extraProperties)) {
427
- extraOpts[key] = params.arguments?.[key] ?? backend.extraProperties[key].default;
447
+ extraOpts[key] = rawArgs[key] ?? backend.extraProperties[key].default;
428
448
  }
429
449
 
430
450
  const cliArgs = backend.stdinPrompt