Repository navigation
Skip .mcp.json for projects created through the plugin - #11
Merged
Merged
Conversation
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>
…e-mcp-json # Conflicts: # CHANGELOG.md
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With the Claude Code plugin installed, a new project gets two
coursecodeMCP servers.claude mcp listin a project created by 0.4.1:Once the author approves the project server, the agent sees all 16 CourseCode tools twice.
Change
create,init,import, andagent-setuptake--plugin. It leaves out.mcp.jsonand still writes the Codex, Cursor, and VS Code settings plusAGENTS.mdandCLAUDE.md.new-courseskill passes--pluginin every create and import command.COURSECODE_PLUGIN=1. The MCP server's no-project instructions then suggestcreate . --plugin, so an agent that follows those instead of the skill gets the same result.setupskill checks existing projects for a duplicatecoursecodeentry in.mcp.jsonand offers to remove it.coursecode agent-setupadds.mcp.jsonfor 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 coverwriteAgentSetup({ plugin: true }),create({ plugin: true }), and the plugin and standalone MCP instructions.npm run lintpasses.COURSECODE_PLUGIN=1, andcreate . --blank --pluginwrites.codex,.cursor,.vscode, andAGENTS.mdbut no.mcp.json.agent-setup --pluginadds nothing, and plainagent-setupadds.mcp.json.Not covered: Codex may also show duplicate tools when the plugin and the project's
.codex/config.tomlboth definecoursecode. 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