Repository navigation
feat: add a Claude Code plugin with the MCP server - #292
Merged
Merged
Conversation
A plugin is how Claude Code installs a set of components in one step: the repository becomes a marketplace (.claude-plugin/marketplace.json) with one plugin, webperf, whose .mcp.json starts npx -y webperf-snippets@1 mcp. The major version is pinned, so a breaking release of the CLI does not reach the plugin. The plugin declares no env: Claude Code passes its environment to the MCP servers of a plugin, so the server reads CRUX_API_KEY exported in the shell. A userConfig option for the key would replace it with an empty string whenever the option is left empty, also for someone who exports it. The MCP page and the README give the install line, /plugin install webperf --marketplace nucliweb/webperf-snippets.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks done
This branch was successfully deployed
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.
Summary
Chapter 7d, the last one of the MCP server: Claude Code installs the server as a plugin.
.claude-plugin/marketplace.json: the repository is the marketplacewebperf-snippets, with one plugin.plugins/webperf/:plugin.json(WebPerf Snippets, 1.0.0) and.mcp.json, which startsnpx -y webperf-snippets@1 mcp, with the major version pinned.userConfigfor the CrUX key: with anenvthat references it, an option left empty becomes an empty string and replaces aCRUX_API_KEYexported in the shell. Withoutenv, the server gets the environment of Claude Code.content/MCP.mdxandREADME.md:/plugin install webperf --marketplace nucliweb/webperf-snippets, and the two steps for versions before 2.1.275.CLAUDE.md: the new directories.Test plan
claude plugin validateon the marketplace and the plugin: passed, no advice, locally--plugin-dirwith--setting-sources "": the server connects, 8 tools,list_snippetsanswers;get_cruxreads an exportedCRUX_API_KEY(fake CrUX endpoint), and with auserConfigenv it did not, locallyCLAUDE_CONFIG_DIR:plugin marketplace add ./,plugin install webperf@webperf-snippets,plugin detailslists one MCP server, locallycheck:consistency,check:emoji,test:site44/44, lint, locally/plugin install webperf --marketplace nucliweb/webperf-snippetsafter the merge, from GitHub