Init MCP
One-shot plugin setup: install dependency marketplaces → install Python deps → write .mcp.json → register hooks → regenerate skill.json metadata → verify each server → report optional secrets.
Step 1: Install dependency marketplaces
This plugin depends on skills from 5 third-party marketplaces. If they are not added, plugin dependencies will stay unresolved (skills from those sources will be missing). The superpowers dependency uses Claude Code's built-in claude-plugins-official marketplace.
Check whether each marketplace is already added by looking at the user's installed plugins. For each missing marketplace, instruct the user to run:
/plugin marketplace add Imbad0202/academic-research-skills
/plugin marketplace add Lylll9436/Paper-Polish-Workflow-skill
/plugin marketplace add multica-ai/andrej-karpathy-skills
/plugin marketplace add anthropics/skills
/plugin marketplace add Orchestra-Research/AI-Research-SKILLs
These are /plugin commands that must be typed by the user in the Claude Code prompt — they cannot be run via Bash. After the user adds all marketplaces, proceed to Step 2.
If all marketplaces are already present, skip this step.
Step 2: Run the installer script
self/install.py is a cross-platform Python script that handles MCP and hook setup.
python self/install.py
Supported flags:
--target /pathinstall to a non-default workspace--dry-runprint plan without writing files--skip-depsskip pip install--skip-verifyskip the MCP startup handshake
What the script does
- Report dependency marketplaces — print the prerequisite
plugin marketplace addcommands. - Install Python deps — read
self/mcp/requirements.txt, runpip install(default:pdfplumber). - Write
.mcp.json— scanself/mcp/servers/for everyserver.py, generate a Claude-Code-style.mcp.jsonwith absolute paths to avoid${workspaceFolder}-expansion failures. - Register hooks — inject SessionStart, PreToolUse, UserPromptSubmit, and PostToolUse hooks into
.claude/settings.json. Idempotent; no duplicates. - Register conductor agent — set
agent: copilot-conductorin.claude/settings.json. - Regenerate skill.json metadata — required by Claude Code 2.1.142+. Calls
self/scripts/generate-skill-json.pyto walk every skill and write a siblingskill.jsonfrom its SKILL.md frontmatter. - Verify MCP startup — send
initializeJSON-RPC to each server and confirm a response. - Report optional secrets — check
ARXIVSUB_SKILL_KEY; if unset, warn but do not block install.
Trigger scenarios
- First-time use after a fresh clone →
/init-mcp - An MCP server is unresponsive →
/init-mcp(the script rewrites config and re-verifies) - After adding a new dependency marketplace →
/init-mcpto re-verify everything
Servers currently under self/mcp/servers/
The repo-root .mcp.json is generated by scanning self/mcp/servers/ — there is no static self/mcp/mcp.json.
| Server | Deps | Description |
|---|---|---|
ai-scientist |
stdlib only | runtime check, experiment directory browsing (non-model) |
arxiv-search |
stdlib only | arXiv search, 3-second rate-limit + 429 retry |
arxivsub-search |
stdlib + ARXIVSUB_SKILL_KEY |
arXiv + top-venue joint search |
dblp-bib |
stdlib only | DBLP BibTeX query, 1.5-second rate-limit |
google-scholar |
stdlib only | Scholar metadata / citation formats |
pdf-text |
pdfplumber (preferred) / PyPDF2 (fallback) |
Local PDF text extraction |
After installation
- Restart Claude Code (or run
/clear) so the new MCP config takes effect. - In a fresh session, verify: call
arxiv-search.search_arxivordblp-bib.search_dblp_bibtexto confirm tool registration. - If
ARXIVSUB_SKILL_KEYis unset,arxivsub-searchreturnsmissing_api_key; configure via env var or.envas the warning suggests.
Notes
- Idempotent: the script can run multiple times; existing hooks are not duplicated; existing
.mcp.jsonis overwritten to stay in sync withself/mcp/servers/. - Does not touch global settings: writes only project-level
.claude/settings.json; never touches~/.claude/settings.json. - Other MCP entries: the current implementation overwrites
.mcp.json; if the user has non-self/MCP entries there, they must be merged manually. Usepython self/install.py --dry-runto inspect the planned write.