Skip to content

Work with AI

Use this page to connect Claude Code, Codex or OpenCode to your Reflex server.

  • Write Lua scripts against the typed libraries.
  • Run them on your local machine or on your project’s agents.
  • Read why a run failed, with logs, page evidence and the replay.
  • Debug a paused run and try a fix.
  • Propose a locator fix to the heal inbox.

A person stays in charge. Accepting a heal is a human decision, and your AI tool can only do what your project role and the token’s scopes allow.

Install the CLI first, then run this in your repository:

Terminal window
reflex setup ai --server https://<server> --project owner/project --tool claude

Use --tool codex, --tool opencode or --tool all. Without --tool, Reflex detects the tools you use. Setup signs in (you approve the login in a browser), links the project, installs the Reflex skills, writes the MCP configuration and runs reflex doctor.

Then sign in to the MCP server from your AI tool. Setup never stores a token in project files.

--tool claude installs the skills under .claude/skills/ and writes .mcp.json.

To connect by hand:

Terminal window
claude mcp add --transport http reflex https://<server>/mcp

Open /mcp in Claude Code and choose Authenticate.

Profile → API tokens on your server shows these commands with your server’s address filled in.

Your AI tool never sees a secret value. When it needs one, it gives you a link, and you type the value into a Reflex form yourself (how it works).