GrepBoard/Manuals
605 manuals ·

Automation 14

Connecting AI tools to other tools: MCP servers, hooks and scripted runs.

  1. Fix Codex "MCP client for … timed out"

    Raise startup_timeout_sec when Codex gives up on an MCP server after 10 seconds, and rule out look-alike mistakes: a misspelled section name or a TOML escape.

    Codex CLI 0.163.0 · Ubuntu 24.04 · Node 24 (config errors reproduced; timeout behavior per official docs)
  2. Test an MCP server with MCP Inspector --cli, no client needed

    Send initialize, tools/list and tools/call to a stdio MCP server with Inspector --cli and read exit codes. Passing the Inspector is not passing every client.

    MCP Inspector 2.12.0 · @modelcontextprotocol/sdk 1.32.2 · Node.js 24 · Ubuntu 24.04 · 2026-10
  3. MCP on Windows: "spawn npx ENOENT" — wrap with cmd /c

    MCP server fails on Windows with spawn npx ENOENT (or EINVAL) because npx is npx.cmd. Set command to cmd and args to /c npx … so a shell launches it.

    Node.js official docs · Claude Code issues · 2026-10
  4. Fix MCP error -32022 "Unsupported protocol version"

    MCP error -32022 "Unsupported protocol version": the server rejects the version the request names. Resend with a version from data.supported.

    MCP specification 2026-07-28 official docs · 2026-10
  5. Get claude -p output as JSON and use it in a script

    Switch claude -p to --output-format json, pull result out with jq, and branch on the exit code and is_error so a shell script can tell success from failure.

    Claude Code 2.1.302 · Linux · jq · model Claude Opus 5.5 · 2026-10
  6. Block Claude Code from Reading .env with deny Rules

    Add Read(./.env) to permissions.deny in settings.json so Claude Code cannot read secret files, then run it to see what is denied and what still leaks via Bash.

    Claude Code 2.1.302 · Ubuntu 24.04 · 2026-10
  7. Fix a .mcp.json server stuck on "Pending approval"

    Approve or reject a .mcp.json server that claude mcp list shows as ⏸ Pending approval, and see where local, project and user scope store servers and which wins.

    Claude Code 2.1.302 · Ubuntu 24.04 · setting keys per Claude Code docs · 2026-10
  8. Fix Claude Code Action 403 permission errors

    When Claude Code Action fails with 403 Resource not accessible by integration, check the token type, permissions block, repo defaults, then fork PRs.

    claude-code-action v1 official docs · actionlint 1.7.12 · 2026-10
  9. Block dangerous commands with a Claude Code hook

    Inspect each Bash command Claude Code is about to run with a PreToolUse hook, and block rm -rf or force pushes with exit code 2, via a settings file and script.

    Claude Code 2.1.302 · Ubuntu 24.04 · jq 1.7
  10. Connect an MCP server to Claude Code and diagnose "not connected"

    Add a one-tool stdio MCP server to Claude Code at project scope and read the symptoms of pending approval, a bad command path, broken .mcp.json and stdout logs.

    Claude Code 2.1.302 · Node.js · @modelcontextprotocol/sdk 1.32.1 · Ubuntu 24.04
  11. codex exec non-interactive mode in CI: flags and defaults

    Defaults and flags for codex exec in CI: sandbox and approval, --json, -o, --output-schema, stdin waits, CI auth, and the MCP tool-call cancellation limit.

    Codex CLI 0.163.0 · Ubuntu 24.04 · Node 24 · only the parts that work without login were tested · 2026-10
  12. Fix MCP error -32000: Connection closed (stdio server exited)

    MCP error -32000 Connection closed means the stdio server exited; run it in a terminal to see why, and see what a stray print() on stdout does instead.

    Claude Code 2.1.302 · Python 3.12.3 · mcp 2.3.0 · @modelcontextprotocol/sdk 1.32.1 · Node.js 24 · Ubuntu 24.04
  13. Claude Code settings.local.json allow rule not applied

    Claude Code still asks despite a Bash allow rule in settings.local.json. Check loaded files, rule syntax, compound commands and deny precedence via claude -p.

    Claude Code 2.1.302 · Ubuntu 24.04 · 2026-10
  14. Fix codex exec MCP "user cancelled" / "approval policy is never"

    codex exec cancels MCP calls ("user cancelled" or "requires approval, but approval policy is never"): approve per tool with approval_mode, keep the sandbox.

    Codex CLI 0.163.0 · Ubuntu 24.04 · Node 24 (config checks reproduced; real tool calls per issue #24135)