CLI Reference
mcp-cli is a deliberately tiny companion to the MCP server. Everything an agent needs at runtime — instructions, skills, memory (via Serena), workspace reads — flows through the MCP stdio entrypoint (mcp-ai-agent-guidelines). The CLI exists only for the two things an agent cannot install on its own behalf:
- IDE lifecycle hooks (
SessionStart/PreToolUse) that nudge the agent back to the MCP surface when it drifts. - Per-IDE
SKILL.mdhook files so Copilot / Claude / Codex auto-discover the public instruction tools.
If you do not use those features you do not need mcp-cli at all.
# Run via npx (no install required)npx --yes --package mcp-ai-agent-guidelines@latest mcp-cli [command]
# Or after global installmcp-cli [command]Global Options
Section titled “Global Options”| Option | Description |
|---|---|
--version | Print version |
--help | Show help |
hooks — IDE lifecycle hooks
Section titled “hooks — IDE lifecycle hooks”hooks setup --client <client>
Section titled “hooks setup --client <client>”Write hook JSON to the appropriate directory for the specified IDE client. Currently supported: vscode, copilot-cli, claude-code.
mcp-cli hooks setup --client vscodemcp-cli hooks setup --client claude-codemcp-cli hooks setup --client copilot-cliEach hook script triggers mcp-cli hooks remind-session on a new chat session and mcp-cli hooks remind-drift before every tool call, so agents that have drifted away from MCP tools (multiple consecutive grep / read_file / bash calls) get a one-line nudge to re-orient.
Pair with --dry-run to print the JSON without writing to disk.
hooks print --client <client>
Section titled “hooks print --client <client>”Print the hook JSON to stdout. Same as setup --dry-run; useful for piping into custom installers.
hooks remind-session and hooks remind-drift
Section titled “hooks remind-session and hooks remind-drift”Invoked by the installed hook scripts at runtime — not user-facing. remind-drift accepts an optional --tool <name> argument so it can skip the reminder when the upcoming call is itself an MCP tool.
onboard — IDE-side onboarding helpers
Section titled “onboard — IDE-side onboarding helpers”onboard skills [--global] [--target <client>]
Section titled “onboard skills [--global] [--target <client>]”Generate one SKILL.md file per public instruction inside the requested clients’ skill-hook directories.
| Client | Local target | Global target |
|---|---|---|
copilot | .github/skills/ | ~/.copilot/skills/ |
claude | .claude/skills/ | ~/.claude/skills/ |
codex | .agents/skills/ | ~/.agents/skills/ |
# All three clients, workspace-localmcp-cli onboard skills
# Claude Code only, user-home installmcp-cli onboard skills --target claude --global--target accepts copilot, claude, codex, or all (default).