cli-setup

A setup command that adds startup notes and hooks for Codex or Claude, either for one repository or for your whole computer. Hooks are automatic actions that run when an agent session starts.

In plain words
What is it for?
Use it to install 1MCP startup files for Codex or Claude at global or repository scope.
Why use it?
It prepares the coding agent to follow the 1MCP command workflow without requiring you to set up the same files by hand.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/1mcp-app/agent/cli-setup
Clone the repo
git clone --depth 1 https://github.com/1mcp-app/agent
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,049 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00027 $0.01049
Opus 5 $0.00014 $0.00524
Sonnet 5 $0.00005 $0.00210
Haiku 4.5 $0.00003 $0.00105

Measured yesterday against content hash c59ea6823b9d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

cli-setup scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Global hooks: `~/.claude/settings.json`
docs/en/commands/cli-setup.md · 118 lines

How it starts

The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLI Setup Command

Install 1MCP CLI hooks and reference files for Codex or Claude.

Synopsis

npx -y @1mcp/agent cli-setup (--codex | --claude) [options]

Description

The cli-setup command installs lightweight bootstrap files that point Codex or Claude at the 1MCP CLI workflow. It writes:

  • A managed 1MCP.md bootstrap document
  • Hook configuration so the startup doc is injected on session start
  • A startup file reference from AGENTS.md or CLAUDE.md

cli-setup does not replace instructions. It makes sure the session is prepared to use instructions, inspect, and run in the right order.

Think of cli-setup as the bridge from an existing agent workflow to 1MCP CLI mode. It teaches the client how to start, but the live discovery and execution flow still happens through instructions, inspect, and run.

Required Client Selection

Choose exactly one target:

  • --codex - Install setup files for Codex only
  • --claude - Install setup files for Claude only

Passing neither or both returns an error.

Options

  • --scope <global|repo|all> - Setup scope (default: global)
  • --repo-root <path> - Repository root used for repo-scoped setup

Scope Behavior

  • global - Writes into the user's home-level Codex or Claude directories
  • repo - Writes repo-local setup files under the selected repository root
  • all - Writes both global and repo-scoped setup files

Files Written

Codex

  • Global managed doc: ~/.codex/1MCP.md
  • Global hooks: ~/.codex/hooks.json
  • Global startup reference: ~/.codex/AGENTS.md
  • Repo managed doc: <repo>/.codex/1MCP.md
  • Repo hooks: <repo>/.codex/hooks.json
  • Repo startup reference: <repo>/AGENTS.md

Claude

  • Global managed doc: ~/.claude/1MCP.md
  • Global hooks: ~/.claude/settings.json
  • Global startup reference: ~/.claude/CLAUDE.md
  • Repo managed doc: <repo>/.claude/1MCP.md
  • Repo hooks: <repo>/.claude/settings.json
  • Repo startup reference: <repo>/CLAUDE.md

Read the full file on GitHub · 118 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 118 lines · 27 tokens per session scan B c59ea6823b9d

Subscribe to this mod's changes

cli-setup is a command published in the GitHub repository 1mcp-app/agent (494 stars, last pushed 3d ago), licensed Apache-2.0. It adds 27 tokens to every session and 1,049 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.