/cogni-workspace:install-mcpfrom cogni-workspace
Installs and configures MCP servers for the insight-wave ecosystem. Clones and builds git-based MCPs, writes server config to Claude Code or Claude Desktop without manual JSON editing.
Ships in cogni-workspace. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Plugins in insight-wave depend on MCP servers (Excalidraw for diagrams, Pencil for web rendering, etc.). No plugin declares a server itself. A checked-in declaration asserts machine state the repository cannot guarantee, so on a machine that never installed the server it is spawned at session start and fails visibly. The server is therefore installed on demand and written into the user's own config, which is the one place that can honestly say what is available. Git-based MCPs also need cloning and building, and users of either client used to have to edit that config by hand.
This skill handles the full lifecycle: detect what's needed, install it, configure it for the user's environment, and verify it works. No manual JSON editing required.
Determine the user's runtime environment — this affects what needs patching:
Locate the config to write. Claude Code reads a user-scope config; Claude Desktop reads its own. Check both:
~/.claude.json, top-level mcpServers~/Library/Application Support/Claude/claude_desktop_config.json${XDG_CONFIG_HOME:-~/.config}/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.jsonOnly the top-level mcpServers in ~/.claude.json is user scope. The per-project
projects.<path>.mcpServers objects in that same file are local scope — never write
there, or the server disappears the moment the user changes directory.
Classify environment:
--target cli write to ~/.claude.json.--target desktop write.--target both.Record the classification as MCP_TARGET, whose only legal values are cli, desktop
and both. The write step below sets and consumes it in a single shell — each invocation
gets a fresh environment, so an assignment made here would not survive to reach it.
Report which environment was detected before proceeding.
Read the MCP registry to understand what servers exist and which plugins need them:
REGISTRY="${CLAUDE_PLUGIN_ROOT}/references/mcp-git-registry.json"
cat "$REGISTRY"
Cross-reference against installed plugins, determined one of three ways in order of preference:
bash ${CLAUDE_PLUGIN_ROOT}/scripts/discover-plugins.sh
# Scan sibling plugin directories for a plugin manifest
for dir in $(dirname "${CLAUDE_PLUGIN_ROOT}")/cogni-*; do
if [ -f "$dir/.claude-plugin/plugin.json" ]; then
basename "$dir"
fi
done
This catches the common case where plugins are installed but the cache index is stale.
Key it on the manifest, the same file discover-plugins.sh globs — no plugin ships a
.mcp.json any more, so a scan keyed on that would silently find nothing and report
success.For each server in the registry, check if any installed plugin appears in its required_by
list. Only install servers that have at least one requiring plugin present.
Present the installation plan to the user before executing:
Name the config that will actually be written, taken from the environment detected
above — one line per target, so a both run shows both. The block below is illustrative;
each server's requiring plugins come from its required_by in the registry, never from
this example:
MCP Installation Plan:
mcp_excalidraw git clone + build needed by: cogni-portfolio
pencil native app check needed by: cogni-website
Config write: ~/.claude.json (Claude Code user scope)
Config write: claude_desktop_config.json (Claude Desktop)
For each server with "type": "git" that's needed:
WRAPPER_REL=$(python3 -c "
import json
reg = json.load(open('${CLAUDE_PLUGIN_ROOT}/references/mcp-git-registry.json'))
print(reg['servers']['SERVER_NAME'].get('wrapper', ''))
")
WRAPPER_ARG=""
if [ -n "$WRAPPER_REL" ]; then
WRAPPER_ARG="--wrapper ${CLAUDE_PLUGIN_ROOT}/${WRAPPER_REL}"
fi
bash "${CLAUDE_PLUGIN_ROOT}/scripts/install-mcp.sh" \
--name "SERVER_NAME" \
--repo "REPO_URL" \
--build "BUILD_CMD" \
$WRAPPER_ARG
--name becomes the directory the server is installed into, under $CLAUDE_MCP_DIR.
Which registry key belongs here, how it differs from the one naming the host config
entry, and what base $CLAUDE_MCP_DIR falls back to, are all stated once in
${CLAUDE_PLUGIN_ROOT}/skills/workspace-status/references/mcp-registry.md under
"## Diagnosing a not-loaded install-mcp server".
The script outputs JSON. On success, data.action is installed (fresh clone),
updated (a --force refetch), rebuilt (already cloned but unbuilt, so the build
reran) or skipped (already built). A failure carries no action at all — it reports
success: false with the cause in data.error — so branch on success before reaching
for action. If any server fails, continue with the rest but flag the failure clearly.
To force-update an already-installed server (e.g. after upstream changes), add --force.
For each server with "type": "native", check whether the binary exists at its
platform-specific path. Don't try to install it — just report:
Run this after the git install succeeds — the writer resolves each server's installed
wrapper, and reports skipped: not installed rather than writing an entry that points at
a path which does not exist yet.
With MCP_TARGET set to the environment classified above:
--target "${MCP_TARGET}".desktop in the file name it writes
either config, selected by --target, so a --target cli run writing
~/.claude.json is correct and not a copy-paste slip.--server once per server (--server mcp_excalidraw --server pencil). The
flag appends rather than splitting a comma-separated value, so a CSV is read as one
server name, matches no registry entry, and the run exits non-zero with
Unknown server(s) in registry: ... having written nothing.Dry-run first:
MCP_TARGET="<cli|desktop|both, as classified above>"
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/patch-desktop-config.py" \
--registry "${CLAUDE_PLUGIN_ROOT}/references/mcp-git-registry.json" \
--target "${MCP_TARGET}" --server mcp_excalidraw \
--dry-run
Substitute the classified value for the placeholder; carried through as written, argparse
rejects it rather than silently writing the wrong host's config. Keep the assignment in the
same invocation as the command — a separate one starts a fresh shell and ${MCP_TARGET}
expands empty.
Show the user what would change. If they confirm (or if running non-interactively from
manage-workspace), run again without --dry-run.
The same command covers every environment, because MCP_TARGET carries the detection:
cli writes the user-scope entry in ~/.claude.json, desktop writes
claude_desktop_config.json, and both writes each in turn.
Branch on the target before reading the result, then build the Summary rows below from
the per-server actions[]. The envelope's full shape — the single-target vs --target both
split, the actions[] entry fields, the target-level verbs, and the shapes that yield
no rows at all — is in
${CLAUDE_PLUGIN_ROOT}/skills/install-mcp/references/result-envelope.md.
The script:
backup: null are in
${CLAUDE_PLUGIN_ROOT}/skills/install-mcp/references/result-envelope.md under "## Backups"~/.claude.json holds unrelated user state--force to overwrite)After writing, remind the user to restart: Claude Desktop for a desktop write, or the Claude Code session for a CLI write. Newly written servers do not appear in the session that wrote them.
After installation and patching, verify that MCP servers are available in the current session. For each server just installed, use ToolSearch to probe for its tool prefix:
| Server | Probe Tool |
|---|---|
| excalidraw | mcp__excalidraw__describe_scene |
| pencil | mcp__pencil__get_editor_state |
Report status:
A "not loaded" result on a server just written is expected, and clears with the restart described above.
Present a compact result:
Name the config actually written, and follow the target for the restart line — a CLI
write needs a new Claude Code session, not a Claude Desktop restart. The Action cell is
the action verb taken verbatim from that target's actions[], never a label composed
here:
MCP Installation Complete:
Server Action Config Written Status
──────────────── ────────────── ──────────────── ──────────
mcp_excalidraw added ~/.claude.json not loaded
pencil added ~/.claude.json not loaded
Backup: ~/.claude.backup-20260409T...json
Next: start a new Claude Code session if any servers show "not loaded"
Under --target both, give each config its own row per server (reading each entry of
data.targets[]), and list a backup line per config written:
Server Action Config Written Status
──────────────── ────────────── ─────────────────────────── ──────────
mcp_excalidraw added ~/.claude.json loaded
mcp_excalidraw added claude_desktop_config.json not loaded
Backup: ~/.claude.backup-20260409T...json
Backup: claude_desktop_config.backup-20260409T...json
Next: start a new Claude Code session, and restart Claude Desktop, for any
server showing "not loaded"
manage-workspace delegates its MCP step (Init and Update mode step 5) to this skill. When invoked that way:
install-mcp.sh fails for a server, report the error from data.error and continue
with remaining serverspatch-desktop-config.py fails, show the error and suggest manual patching as fallback~/.claude.json as much as to claude_desktop_config.json.patch-desktop-config.py does not always return per-server rows. The shapes that produce
that, and the recovery each one calls for, are in
${CLAUDE_PLUGIN_ROOT}/skills/install-mcp/references/result-envelope.md.evals/evals.json holds this skill's trigger and behaviour prompts — reference material for verifying the skill still fires on the phrasings it claims, not loaded at runtime.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
mcp-installation, mcp-configuration, claude-config, excalidraw, pencil
npx claudepluginhub cogni-work/insight-wave --plugin cogni-workspace10 skills in this plugin
/claimsThis skill should be used to manage the claim lifecycle: submit, verify, dashboard, inspect,
resolve, and cobrowse. It applies to "claims", fact-checking, source verification, checking whether
statements match cited sources, reviewing deviations, tracking sourced-statement accuracy, or
receiving claims from another plugin. It also applies to "which claims need attention", "what did
verification find", "let's look at those sources together", "help me check these links", "browse
the unavailable sources", "check what fields a ClaimRecord has", or "understand deviation types or
severity levels". Verification re-fetches cited URLs; cogni-knowledge:knowledge-verify provides
zero-network scoring against claims extracted at ingest time.
/cogni-issuesThis skill files and tracks GitHub issues (bugs, features, change requests,
questions) against insight-wave plugins via the GitHub CLI (`gh`). It consults
the user, resolves the plugin repository, drafts from templates, creates
atomically with labels, and tracks locally.
It should be used whenever the user wants to report a bug, request a feature, file a change
request, ask a plugin question, list filed issues, or check issue status. Also
trigger on "this plugin is broken", "open an issue", "set up GitHub issues",
"das Plugin funktioniert nicht", "Fehler in {plugin}", "ich kann kein Issue
erstellen", or any complaint about a specific plugin — even without the word
"issue".
Other plugins' skills for the same job