Skip to content

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:

  1. IDE lifecycle hooks (SessionStart / PreToolUse) that nudge the agent back to the MCP surface when it drifts.
  2. Per-IDE SKILL.md hook 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.

Terminal window
# Run via npx (no install required)
npx --yes --package mcp-ai-agent-guidelines@latest mcp-cli [command]
# Or after global install
mcp-cli [command]

OptionDescription
--versionPrint version
--helpShow help

Write hook JSON to the appropriate directory for the specified IDE client. Currently supported: vscode, copilot-cli, claude-code.

Terminal window
mcp-cli hooks setup --client vscode
mcp-cli hooks setup --client claude-code
mcp-cli hooks setup --client copilot-cli

Each 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.

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

ClientLocal targetGlobal target
copilot.github/skills/~/.copilot/skills/
claude.claude/skills/~/.claude/skills/
codex.agents/skills/~/.agents/skills/
Terminal window
# All three clients, workspace-local
mcp-cli onboard skills
# Claude Code only, user-home install
mcp-cli onboard skills --target claude --global

--target accepts copilot, claude, codex, or all (default).