Skip to main content

run

Function run 

Source
pub async fn run() -> Result<ExitCode>
Expand description

Runs the setup command.

Validates that the runtime environment is ready for MCP tool execution.

§Checks Performed

  1. Node.js version: Ensures Node.js 18.0.0 or higher is installed
  2. File permissions: Makes TypeScript files executable (Unix only)
  3. Configuration: Checks if ~/.claude/mcp.json exists

§Examples

# Run setup validation
mcp-execution-cli setup

# Output:
# ✓ Node.js v20.10.0 detected
# ✓ Runtime setup complete
# Claude Code can now execute MCP tools via:
#   node ~/.claude/servers/<server>/<tool>.ts '{"param":"value"}'

§Errors

Returns an error if:

  • Node.js is not installed
  • Node.js version is less than 18.0.0
  • Home directory cannot be determined