authenticate
Authenticate with WooCommerce.com Partner Developer account to enable managed testing of WordPress/WooCommerce plugins.
Instructions
Authenticate with WooCommerce.com Partner Developer account. Required before running managed tests.
⚠️ QIT CLI not detected. QIT CLI not found. Please install it using one of these methods:
Via Composer (recommended): composer require woocommerce/qit-cli --dev
Set QIT_CLI_PATH environment variable: export QIT_CLI_PATH=/path/to/qit
Ensure 'qit' is available in your system PATH
For more information, visit: https://github.com/woocommerce/qit-cli
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | WooCommerce.com username (will prompt if not provided) | |
| application_password | No | Application password (will prompt if not provided) |
Implementation Reference
- src/tools/auth.ts:19-33 (handler)The main handler function for the 'authenticate' tool. It builds the 'qit connect' command arguments based on input and executes it via executeAndFormat.handler: async (args: { user?: string; application_password?: string }) => { const cmdArgs = ["connect"]; if (args.user) { cmdArgs.push("--user", args.user); } if (args.application_password) { cmdArgs.push("--application_password", args.application_password); } // Add non-interactive flag to avoid prompts that would hang cmdArgs.push("--no-interaction"); return executeAndFormat(cmdArgs); },
- src/tools/auth.ts:9-18 (schema)Input schema (Zod) for the 'authenticate' tool, defining optional user and application_password fields.inputSchema: z.object({ user: z .string() .optional() .describe("WooCommerce.com username (will prompt if not provided)"), application_password: z .string() .optional() .describe("Application password (will prompt if not provided)"), }),
- src/tools/index.ts:11-11 (registration)Spreading authTools (containing 'authenticate') into the central allTools registry, which is used by the MCP server for tool listing and execution....authTools,
- src/tools/auth.ts:4-34 (registration)Export of authTools object defining the 'authenticate' tool, imported and registered in tools/index.ts.export const authTools = { authenticate: { name: "authenticate", description: "Authenticate with WooCommerce.com Partner Developer account. Required before running managed tests.", inputSchema: z.object({ user: z .string() .optional() .describe("WooCommerce.com username (will prompt if not provided)"), application_password: z .string() .optional() .describe("Application password (will prompt if not provided)"), }), handler: async (args: { user?: string; application_password?: string }) => { const cmdArgs = ["connect"]; if (args.user) { cmdArgs.push("--user", args.user); } if (args.application_password) { cmdArgs.push("--application_password", args.application_password); } // Add non-interactive flag to avoid prompts that would hang cmdArgs.push("--no-interaction"); return executeAndFormat(cmdArgs); }, },