claude_code
Executes a prompt directly using the Claude Code CLI. Defaults to bypassed permissions for backwards compatibility; pass permissionMode to use Claude Code's native permission modes.
How to use it
claude_code is exposed by the Claude Code MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the claude_code tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Claude Code MCP
npm install -g @anthropic-ai/claude-codeOther tools in Claude Code MCP (6)
(array, optional): Conversation history to inject on the first call for a session.
(string, optional): Claude Code permission mode. Defaults to bypassPermissions for backwards compatibility; use default, acceptEdits, auto, dontAsk, or plan to avoid bypassing permission checks.
(string, required): The prompt to send to Claude Code.
(string, optional): Parent session ID. Repeated calls with the same ID resume the same Claude Code session.
(boolean, optional): Disable session continuity for this call.
(string, optional): Absolute working directory for file operations.