VylayOpen Vylay
← Controller access

Claude Code setup

Use a controller key you created in Vylay. Keep your Worker tokens in Grok; this connection uses its own access.

  1. 1. Check Vylay

    In PowerShell in your Vylay project directory, run npm run preflight. The Vylay operator must set VYLAY_CONTROLLER_MCP_ENABLED=true; Grok MCP recording can stay off. The configured public service must be reachable.

  2. 2. Start Claude Code

    Open another PowerShell window in your Vylay project directory. Paste these commands, then enter your key at the hidden prompt. The key is passed through the process environment, not written into the configuration file or command history. Use a trusted local machine.

    $vylayControllerSecret = Read-Host 'Paste your Vylay controller key' -AsSecureString
    $env:VYLAY_CONTROLLER_TOKEN = [System.Net.NetworkCredential]::new('', $vylayControllerSecret).Password
    try {
      claude --mcp-config .\config\claude-controller.mcp.json
    } finally {
      Remove-Item Env:VYLAY_CONTROLLER_TOKEN -ErrorAction SilentlyContinue
      $vylayControllerSecret.Dispose()
    }

    The supplied configuration uses the literal local URL http://127.0.0.1:3000/mcp. For Claude Code on another computer, edit its url field to your current HTTPS Vylay origin followed by /mcp. Local Claude Code can keep using 127.0.0.1 when the bot-facing tunnel changes.

  3. 3. Inspect before dispatch

    Open /mcp in Claude Code. Confirm vylay-controller connects and lists list_connections, dispatch_job, get_receipt and list_receipts. A receipt-only key will omit dispatch_job. Accept the client's relevant trust/tool prompts; do not disable its permission checks.

    Ask it to list connections and receipts only first. Task dispatch requires separate webhook readiness on the current public origin. An HTTP-chat probe alone does not establish that.

  4. 4. Run one intentional task

    After webhook setup is ready, request one read-only task with a fresh request_id. Ask Claude to read that job's receipt, waiting between checks. Never generate another request_id merely because a result is missing. A task consumes your allowances; connection listing does not dispatch work.

No paid Vylay infrastructure is required for this local test. Your existing Claude Code and Grok access still apply. Quick tunnels can stop or change address; keep one origin alive for the complete job. JSON Streamable HTTP is used, with no standing SSE stream.

Official Claude Code MCP setup reference