Skip to content

feedback(configure-plugin): /configure-mcp hard-fails on missing .mcp.json #1306

@laurigates

Description

@laurigates

Skill

configure-plugin/commands/configure-mcp.md (or the underlying skill file)

Category

Bug

Description

Running /configure-mcp in a working directory that does not contain a .mcp.json file aborts immediately with a raw jq error instead of degrading gracefully.

The command appears to use a Context backtick of the form !`jq -r '.mcpServers' .mcp.json` which causes the entire skill to abort before its body runs when .mcp.json is missing — this is the same class of failure documented in the feedback-session skill's own Context note (stderr in a Context backtick aborts the skill).

Evidence

Session invocation in /Users/lgates/Documents/Immeral (an Obsidian vault, no .mcp.json):

<command-name>/configure-mcp</command-name>
<local-command-stderr>Error: Shell command failed for pattern "!`jq -r '.mcpServers' .mcp.json`": [stderr]
jq: error: Could not open file .mcp.json: No such file or directory</local-command-stderr>

No further output — the skill body never executed, so there was no chance to detect the missing file, offer to scaffold one, or print a friendly status message.

Suggested Action

Replace the Context backtick with a form that survives a missing .mcp.json. Options:

  1. Read in the skill bodyjq from Bash inside Step 1 with a test -f .mcp.json guard so the skill can branch into "no MCP config yet — would you like to create one?" instead of aborting.
  2. Use --null-input / default: jq -r '.mcpServers // {}' .mcp.json 2>/dev/null || echo '{}' — but per .claude/rules/agentic-permissions.md, || and 2>/dev/null are also blocked in Context backticks, so this doesn't actually help inside Context. Moving the read into the body is the safer fix.
  3. Pre-check with a separate Context line that returns a sentinel (e.g. MCP_CONFIG_EXISTS=$([ -f .mcp.json ] && echo yes || echo no)), then branch on the sentinel — same caveat about ||, so prefer option 1.

For maximum robustness, also consider supporting cwds that aren't software repos at all (e.g. Obsidian vaults, doc repos) — either by gating on a project-type detection or by clearly stating "this command only applies to repos with an .mcp.json."

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsession-feedbackFeedback from session analysis

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions