Skip to main content
Glama

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:

  1. Via Composer (recommended): composer require woocommerce/qit-cli --dev

  2. Set QIT_CLI_PATH environment variable: export QIT_CLI_PATH=/path/to/qit

  3. Ensure 'qit' is available in your system PATH

For more information, visit: https://github.com/woocommerce/qit-cli

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNoWooCommerce.com username (will prompt if not provided)
application_passwordNoApplication password (will prompt if not provided)

Implementation Reference

  • 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);
    },
  • 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)"),
    }),
  • 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);
        },
      },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/woocommerce/qit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server