/context7:setup [check|apply] [install-cli]from context7
Checks and configures Context7 CLI and MCP server for documentation lookups. Reports PASS/FAIL/INFO on CLI version, MCP availability, auth, and path status.
Ships in context7. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Installed CLI version: !ctx7 --version 2>/dev/null || echo "not installed"
Latest published CLI version: !npm view ctx7 version 2>/dev/null || echo "unknown (npm registry unreachable)"
MCP availability: if mcp__context7__resolve-library-id and mcp__context7__query-docs are in your tool list, the Context7 MCP server is configured.
/context7:lookup works through either of two paths: the CLI (ctx7 via npm) or the
Context7 MCP server (configured by the consuming project). CONTEXT7_API_KEY is optional for
both; what it changes is Context7 CLI § When is authentication required?.
check: run the check.apply: run the check, then the guidance-only remediations (auth, MCP).apply install-cli: also install or upgrade the global ctx7.Never prompt; the action given is the whole instruction. Every action is safe to rerun.
check (read-only)Report a PASS/FAIL/INFO table from the pre-computed context, with one remediation line per FAIL. Do not install, edit config, or write anything.
apply install-cli. Absent is INFO when the MCP path is live, otherwise
it counts against step 3.apply install-cli, or add the MCP server (routed in
apply).CONTEXT7_API_KEY is set ([ -n "$CONTEXT7_API_KEY" ]). Report
presence only; never print the value. Absence is never a FAIL: a key is optional (pointer in
Actions above).ctx7 docs /org/project "..." calls with
MSYS_NO_PATHCONV=1 (a no-op elsewhere, so always safe), or the ID gets path-mangled. Detail:
${CLAUDE_PLUGIN_ROOT}/skills/lookup/context/cli.md.applyRefuse first: never run ctx7 setup (any form, --mcp included) or ctx7 skills install,
directly or through npx, even when the user asks for them in the same message. This plugin keeps
lookup in one skill it owns, never fragmented across a second, parallel one; what each command
installs is in ${CLAUDE_PLUGIN_ROOT}/skills/lookup/context/cli.md, "Setup / install flags". Say
that you did not run them, and why, then continue with the steps below.
Run check, then resolve each finding. With both paths working, report "already configured" and
change nothing. State each change before making it, and re-detect before claiming it.
CLI, only with apply install-cli, and only when check found ctx7 missing or behind:
npm install -g ctx7@latest
Without a global install, npx ctx7@latest <command> works per call; version floor and flags:
${CLAUDE_PLUGIN_ROOT}/skills/lookup/context/cli.md. Re-read the CLI version afterwards and
report what it shows, never the install command's exit code alone.
Auth, guidance only. Tell the user to set the key in their own shell profile or secret
store, in preference to ctx7 login:
export CONTEXT7_API_KEY="<your-key>"
It takes effect in a fresh session; report presence only and leave verification to that
session. The ctx7 login caveat: ${CLAUDE_PLUGIN_ROOT}/skills/lookup/context/cli.md.
MCP, guidance only. If the user wants the MCP path, point them to add a context7 server
entry to their own MCP configuration; do not edit their .mcp.json for them. The JSON (anonymous and API-key forms) and the
unset-env-var caveat: ${CLAUDE_PLUGIN_ROOT}/skills/lookup/context/mcp.md.
Verify. Re-read the CLI version and your tool list; declare setup complete only when at least one path is live.
What was already in place, what changed, what was skipped, and which lookup paths now work (CLI,
MCP, or both). A refused ctx7 setup or ctx7 skills install is listed under skipped with its
reason in full: this plugin keeps lookup in one skill, never fragmented across a parallel one.
Report every command as it happened: if one ran, say so and give its result, even when it failed;
never claim a command did not run when it did.
ctx7 setup, in any form, and ctx7 skills install are refused; the rule is at the top of
apply..mcp.json without their consent: their MCP configuration is theirs.CONTEXT7_API_KEY into the repository, Claude Code settings or any config file, and
never print it.pluginConfigs: the cache is
replaced on the next plugin update, and machine-wide Claude Code state belongs to the user./context7:lookup.What SKILL.md sets; muted values are Claude Code's defaults
bashThree short reads, in order
context7, documentation-lookup, cli-configuration, mcp-server
2 skills in this plugin
npx claudepluginhub melodic-software/claude-code-plugins --plugin context7Other plugins' skills for the same job