clavis mcp
Run a Model Context Protocol server over stdio
clavis mcp [flags]Run a Model Context Protocol server over stdio for Claude Code, Cursor, Codex, Windsurf or any MCP client. It offers four tools: list_secrets (names only), check_env, run_with_secrets (allowlisted commands, masked output) and request_secret (asks a human).
With --agent NAME, it uses your own clavis login to start a one-hour agent session held in memory, so the MCP config contains no token.
Examples
Claude Code
claude mcp add clavis -- clavis mcp --agent coding-agentAny MCP client
clavis mcp --agent coding-agentFlags
--agent string- agent identity name; starts an in-memory session with your login (env CLAVIS_AGENT)
Details
Masking reduces accidental leaks but is not a security boundary: an allowed command still receives the secrets, and if it runs code the agent wrote, the agent could read them. Prefer short-lived credentials (leases) for agent workflows. A static agent token in CLAVIS_TOKEN still works for headless agents.
Global flags
These work with every command.
--debug- enable debug logging
--env string- environment slug
--json- output machine-readable JSON
--org string- organization slug
--overlay string- tenant/region overlay slug
--path string- folder path (default /)
--project string- project slug
--server string- Clavis server URL (default: from .clavis.yaml or saved login)
-h, --help- help for any command