Skip to content

fix(setup): write "type": "http" for Claude and CodeBuddy HTTP plugin MCP - #424

Open
Pybsama wants to merge 1 commit into
AVIDS2:mainfrom
Pybsama:fix/setup-http-mcp-type-422
Open

Pybsama wants to merge 1 commit into
AVIDS2:mainfrom
Pybsama:fix/setup-http-mcp-type-422

Conversation

@Pybsama

@Pybsama Pybsama commented Dec 5, 2026

Copy link
Copy Markdown

Summary

  • Update rewriteBundledMemorixMcpToHttp / toHttpMemorixServer in src/cli/commands/setup.ts to always write "type": "http" for Claude Code and CodeBuddy plugin .mcp.json targets (matched via explicit { agent } option or detected .claude-plugin/plugin.json / .codebuddy-plugin/plugin.json manifest).
  • Keep existing behavior unchanged for Codex, Gemini extension, OpenClaw, and Antigravity manifests (preserving type: "http" only when an entry already carries a string type).
  • Perform the HTTP manifest rewrite in installAgentSetup before host plugin CLIs (claude, codebuddy, codex, copilot, openclaw) register or snapshot the copied plugin, so cached plugin copies also receive the HTTP .mcp.json entry rather than the pre-rewrite stdio entry.
  • Update and expand tests/cli/setup-command.test.ts to verify Claude and CodeBuddy .mcp.json get "type": "http", cached Claude plugin copies match when claude CLI is present, and Codex/Gemini/OpenClaw/Antigravity formats remain unchanged.

Fixes #422

Verification

  • npx vitest run --no-file-parallelism --maxWorkers=1 tests/cli/setup-command.test.ts tests/workspace/claude-code-mcp.test.ts tests/workspace/mcp-config.test.ts tests/cli/agent-doctor.test.ts tests/cli/pi-setup.test.ts tests/cli/workbuddy-setup.test.ts tests/cli/dsh-setup.test.ts: 7 files / 142 tests passed.
  • npm run build:workspaces && npm run lint && npm run build:cli: passed.
  • npm run check:mcp-registry && npm run check:plugin-release: passed.
  • Isolated HOME end-to-end run of node dist/cli/index.js setup --agent claude --global --mcp http verified both the marketplace .mcp.json and .claude/plugins/cache/memorix-local/memorix/1.10.5/.mcp.json contain "type": "http", and claude plugin validate passes on both directories.

… MCP

When rewriting bundled plugin MCP manifests to HTTP (`--mcp http`),
always emit `"type": "http"` for Claude Code and CodeBuddy plugin
`.mcp.json` targets (either via explicit `{ agent }` option or detected
`.claude-plugin/plugin.json` / `.codebuddy-plugin/plugin.json` manifest)
so Claude Code does not treat the url-only entry as stdio and silently
drop it.

Keep existing behavior for Codex, Gemini extension, OpenClaw, and
Antigravity manifests. Also run the HTTP manifest rewrite before host
plugin CLIs install/snapshot the copied bundle so cached plugin copies
carry the rewritten HTTP entry too.

Fixes AVIDS2#422.

Signed-off-by: sama Pyb <peiyibopybsama@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: setup --mcp http writes Claude plugin .mcp.json without "type": "http", server silently dropped

1 participant