Skip to content

feat: add a Claude Code plugin with the MCP server - #292

Merged
nucliweb merged 1 commit into
mainfrom
feat/claude-code-plugin
Oct 21, 2026
Merged

nucliweb merged 1 commit into
mainfrom
feat/claude-code-plugin

Conversation

@nucliweb

Copy link
Copy Markdown
Owner

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 marketplace webperf-snippets, with one plugin.
  • plugins/webperf/: plugin.json (WebPerf Snippets, 1.0.0) and .mcp.json, which starts npx -y webperf-snippets@1 mcp, with the major version pinned.
  • No userConfig for the CrUX key: with an env that references it, an option left empty becomes an empty string and replaces a CRUX_API_KEY exported in the shell. Without env, the server gets the environment of Claude Code.
  • content/MCP.mdx and README.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 validate on the marketplace and the plugin: passed, no advice, locally
  • --plugin-dir with --setting-sources "": the server connects, 8 tools, list_snippets answers; get_crux reads an exported CRUX_API_KEY (fake CrUX endpoint), and with a userConfig env it did not, locally
  • Marketplace flow with a temporary CLAUDE_CONFIG_DIR: plugin marketplace add ./, plugin install webperf@webperf-snippets, plugin details lists one MCP server, locally
  • check:consistency, check:emoji, test:site 44/44, lint, locally
  • /plugin install webperf --marketplace nucliweb/webperf-snippets after the merge, from GitHub
  • CI

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.
@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
webperf-snippets Ready Ready Preview Oct 21, 2026 4:06pm UTC

@nucliweb
nucliweb merged commit 14e514d into main Oct 21, 2026
3 checks passed
@nucliweb
nucliweb deleted the feat/claude-code-plugin branch October 21, 2026 16:08
@nucliweb nucliweb mentioned this pull request Oct 22, 2026
3 tasks done

This branch was successfully deployed

1 active deployment
Preview — 06413b18 Deployed Oct 21, 2026 by vercel[bot]
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