• SUCCESS
  • FAILURE
  • LOGS
  • HUMAN

How to test authentication flows with your AI

Connect Nhost to your AI client once. From there, your agent handles the heavy lifting of running through user identity sequences.

Ask AI about this page

Short answer

Can I test my Nhost auth flows using an AI agent?

Yes. Your AI uses Nhost tools to execute email/password signups, OTP logins, and password resets. You get a clear view of the success or failure of each step.

Testing outcomes

What your tests produce

The agent executes the logic and reports the results.

SUCCESS

Verified user creation

The AI completes the signup process and confirms the user exists in Nhost. You get a clean confirmation of a successful identity creation.

FAILURE

Error state detection

If a login fails or a password reset is invalid, your AI catches the error. It reports exactly why the authentication failed.

LOGS

Flow verification

The agent tracks the sequence from signup to signin to ensure the logic holds up. You receive a summary of the entire lifecycle.

HUMAN

Manual intervention

If an OTP or email link requires manual retrieval from an inbox, the AI will pause. You step in to provide the code or link to keep the test moving.

The workflow

What your AI does when the test starts.

The agent acts as a headless user to walk through your identity logic.

  1. Create new users

    Your agent initiates the registration process using provided credentials to populate your user table.

    signup_email_password
  2. Verify credentials

    The AI attempts to log in with the newly created account to ensure the credentials work.

    signin_email_passwordsignin_otp_emailsignin_passwordless_email
  3. Test recovery

    The agent triggers a password reset request to check if your recovery flow is active.

    reset_password
  4. Clean up session

    Once the test is done, the AI logs out to ensure the session is properly terminated.

    signout

Try it

Copy these to start.

Use these prompts to kick off your testing immediately.

Starting points

Swap out the placeholder emails and passwords with the specific test data you want to use.

Nhost Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_MFFyb71fXEU1fDy4Y51JTMmYHnFDWoQWhoWKMoU6/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Nhost capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "nhost-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_MFFyb71fXEU1fDy4Y51JTMmYHnFDWoQWhoWKMoU6/mcp"
    }
  }
}
Copy into chat04
  • Sign up a new user with the email testuser@example.com and password Password123!

  • Try to sign in to Nhost using the email testuser@example.com and the password I just created.

  • Trigger a password reset for the account testuser@example.com and tell me if it works.

  • Sign out of the current session after you finish the login test.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Nhost once, then ask.

Just link your Nhost account. Your credentials stay encrypted on our side, and you can start testing right away in your preferred AI client.

Connect Nhost to your AI

FAQ

How the testing behaves

  • 01

    Can the AI create new database tables?

    No. The AI can only perform authentication actions like signup and signin using the provided tools.

  • 02

    Does the AI need a browser to run these tests?

    No. The AI interacts directly with the Nhost authentication API through the MCP tools.

  • 03

    Can the AI bypass MFA?

    No. If your flow requires an OTP, the AI will use the signin_otp_email tool, but you will still need to provide the actual code from your email.

  • 04

    Will the AI delete my existing users?

    No. There are no tools provided in this connector that allow for the deletion of user records.

  • 05

    Can I use this to test my custom frontend UI?

    No. This is for testing the backend authentication logic and API responses, not the visual elements of a website.

  • More questions about Nhost? See everything the Nhost Connector can do

Connect Nhost to Claude, Cursor, ChatGPT & more