Skip to content

Skip .mcp.json for projects created through the plugin - #11

Merged
svincent240 merged 2 commits into
mainfrom
fix/plugin-skip-claude-mcp-json
Oct 29, 2026
Merged

svincent240 merged 2 commits into
mainfrom
fix/plugin-skip-claude-mcp-json

Conversation

@svincent240

@svincent240 svincent240 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem

With the Claude Code plugin installed, a new project gets two coursecode MCP servers. claude mcp list in a project created by 0.4.1:

plugin:coursecode:coursecode: node …/plugins/cache/coursecode/coursecode/0.3.0/mcp/coursecode-mcp.mjs - ✔ Connected
coursecode: node node_modules/coursecode/bin/cli.js mcp - ⏸ Pending approval

Once the author approves the project server, the agent sees all 16 CourseCode tools twice.

Change

  • create, init, import, and agent-setup take --plugin. It leaves out .mcp.json and still writes the Codex, Cursor, and VS Code settings plus AGENTS.md and CLAUDE.md.
  • The plugin's new-course skill passes --plugin in every create and import command.
  • The plugin launcher runs the CLI with COURSECODE_PLUGIN=1. The MCP server's no-project instructions then suggest create . --plugin, so an agent that follows those instead of the skill gets the same result.
  • In Claude Code, the setup skill checks existing projects for a duplicate coursecode entry in .mcp.json and offers to remove it.
  • Docs: the user guide, plugin README, and CHANGELOG explain the behavior, and that running coursecode agent-setup adds .mcp.json for someone opening the project in Claude Code without the plugin.

The trade-off: a project created through the plugin has no Claude Code project server until someone runs coursecode agent-setup.

Testing

  • npm test: 121 files, 1671 tests pass. New tests cover writeAgentSetup({ plugin: true }), create({ plugin: true }), and the plugin and standalone MCP instructions.
  • npm run lint passes.
  • Through the real launcher: it sets COURSECODE_PLUGIN=1, and create . --blank --plugin writes .codex, .cursor, .vscode, and AGENTS.md but no .mcp.json. agent-setup --plugin adds nothing, and plain agent-setup adds .mcp.json.

Not covered: Codex may also show duplicate tools when the plugin and the project's .codex/config.toml both define coursecode. I haven't checked that.

This and #10 both add entries under ## [Unreleased] in CHANGELOG.md, so whichever merges second may need a trivial conflict fix.

🤖 Generated with Claude Code

With the Claude Code plugin installed, a new project had two coursecode
servers: the plugin's and the one in the project's .mcp.json. Once the
author approved the project server, the agent saw every tool twice.

create, init, import, and agent-setup take --plugin, which leaves out
.mcp.json and keeps the Codex, Cursor, and VS Code settings. The
new-course skill passes it. The launcher sets COURSECODE_PLUGIN=1 so
the MCP server's no-project instructions include it too, and the setup
skill offers to remove a duplicate entry from existing projects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@svincent240
svincent240 merged commit 19ac34b into main Oct 29, 2026
2 checks passed
@svincent240 svincent240 mentioned this pull request Oct 29, 2026
@svincent240
svincent240 deleted the fix/plugin-skip-claude-mcp-json branch October 29, 2026 22:31
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.

1 participant