# Nhost MCP for AI Agents AI Agent Connect

> Nhost MCP lets you manage your Nhost authentication and storage directly from your AI agent. Handle user sign-ins, registrations, profile updates, and file uploads without leaving your IDE or chat interface. It connects your backend services to your daily workflow, making it easy to test auth flows and manage cloud files through simple conversation.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_MFFyb71fXEU1fDy4Y51JTMmYHnFDWoQWhoWKMoU6/ai-agent-connect
- **Tags:** authentication, backend-as-a-service, cloud-storage, user-management, serverless

## Description

Managing backend services usually means jumping between tabs, copy-pasting IDs, and refreshing dashboards to see if a registration worked. This Connector changes that by bringing Nhost's Auth and Storage right into your AI client. You can tell your agent to create a new user, verify a login, or dump a file into a specific bucket without ever opening a browser. It's a way to treat your backend like a conversation. If you're building a full-stack app, you'll find it's a huge time saver for testing edge cases in authentication or checking file metadata on the fly. It's one of the many ways Vinkius makes it easy to connect your existing stack to the tools you already use every day. Instead of manual clicks, you just describe the action you need and the agent handles the heavy lifting.

## Tools

### get_file_presigned_url
Get a temporary URL to access a specific file. This is useful for private file delivery.

### signin_otp_email
Start an email-based one-time password login. Use this to test multi-factor or OTP flows.

### signin_passwordless_email
Send a magic link for passwordless authentication. This initiates the magic link flow.

### signout
End the current session and invalidate refresh tokens. Use this to clear user sessions.

### signup_email_password
Register a new user account with an email and password. This handles standard registration.

### signup_otp_email
Create a new account using an email OTP. Use this to test secure registration flows.

### upload_file
Save a file to your Nhost bucket and get the metadata back. This supports text and base64 content.

### get_file
Download the complete content of a file. It also supports optional image transformation parameters.

### get_user
Pull profile info for the currently authenticated user. This requires your NHOST_JWT credential.

### refresh_token
Generate a new JWT access token using a valid refresh token. This helps keep sessions active.

### reset_password
Request a password reset email for a specific user. Use this to trigger account recovery flows.

### signin_anonymous
Create an anonymous user session for guest access. This is great for testing public areas.

### signin_email_password
Authenticate a user using their email and password. This handles standard login flows.

### change_email
Request a change to the authenticated user's email address. This requires elevated credentials.

### delete_file
Permanently remove a file from your storage. Use this to clean up your buckets.

## Prompt Examples

**Prompt:** 
```
Create a new user with the email test@example.com and a random password.
```

**Response:** 
```
I've registered a new account for test@example.com. The registration was successful, and the account is ready for use.
```

**Prompt:** 
```
What's the current user's email and status?
```

**Response:** 
```
Checking the profile... The currently authenticated user is **dev_user_99**. 
- **Email**: dev_user_99@example.com
- **Status**: Active
- **Account Type**: Standard
```

**Prompt:** 
```
Upload the 'logo.png' file to my bucket and give me the link.
```

**Response:** 
```
I've uploaded 'logo.png' to your storage bucket. 
**File Details:**
- **ID**: file_88291
- **Size**: 240KB
- **Status**: Success

I've also generated a temporary link for you to view it.
```

## Capabilities

### Create new user accounts
Register new users with email, password, or OTP flows through natural language.

### Authenticate users
Handle sign-ins for email, password, magic links, and anonymous sessions.

### Manage user sessions
Refresh access tokens or sign out users from all devices instantly.

### Handle cloud storage
Upload, download, and delete files from your Nhost buckets.

### Retrieve user profiles
Get detailed account information for any authenticated user.

### Generate file links
Create presigned URLs for secure, temporary file access.

## Use Cases

### Testing Auth: A dev needs to see if magic links work.
A developer asks the agent to use `signin_passwordless_email` for a test account to verify that the magic link arrives in the inbox.

### Data Migration: An engineer needs to move files.
An engineer uses `upload_file` to move assets into a specific bucket, checking the returned metadata to ensure the upload finished.

### Customer Support: A support rep needs to check a user's email.
A support rep uses `get_user` to see the profile details of a customer who's having trouble logging in.

### Session Debugging: A dev wants to see if a token expired.
A developer uses `refresh_token` to generate a new JWT and verify that the session stays active during a long-running task.

## Benefits

- Stop switching tabs by using `signin_email_password` and `signin_passwordless_email` directly in your chat.
- Test auth flows faster with `signup_otp_email` and `signin_otp_email` without manual form filling.
- Manage cloud assets easily by using `upload_file` and `delete_file` to handle your storage buckets.
- Verify account details instantly with `get_user` to check profile statuses during debugging.
- Handle session security quickly by using `refresh_token` and `signout` to manage user access.
- Get instant file access by using `get_file_presigned_url` to generate temporary links on demand.

## How It Works

The bottom line is you get a natural language interface for your Nhost backend.

1. Subscribe to the Nhost MCP on Vinkius.
2. Paste your Nhost Auth and Storage URLs from your project dashboard into the configuration.
3. Start asking your AI agent to manage users or files.

## Frequently Asked Questions

**What can I do with the Nhost MCP?**
You can manage your entire Nhost backend through natural language. This includes creating users, handling logins, and managing cloud storage files directly from your AI client.

**How do I manage users with the Nhost MCP?**
You can ask your agent to register new accounts, retrieve profile details, or initiate password resets without ever opening the Nhost dashboard.

**Can I handle file uploads using the Nhost MCP?**
Yes, you can ask your agent to upload files to your buckets, delete old assets, or generate temporary presigned URLs for sharing.

**Is the Nhost MCP good for testing magic links?**
It's perfect for that. You can tell your agent to initiate passwordless authentication and then verify that the magic link was sent correctly.

**How do I use the Nhost MCP to sign out users?**
Just tell your agent to sign out the current user. It will invalidate the refresh tokens and end the session for you.

**Can I get presigned URLs with the Nhost MCP?**
Yes, the Connector can generate a temporary presigned URL for any file in your storage, which is great for secure file delivery.

**How can I retrieve the profile of the currently logged-in user?**
Use the `get_user` tool. It fetches the authenticated user's profile information, including their ID and metadata, provided a valid JWT is configured.

**Is it possible to store documents or images using this server?**
Yes. The `upload_file` action allows you to send raw text or base64 content along with a filename directly to your Nhost Storage bucket.

**Can I initiate a login without requiring a password?**
Absolutely. Use the `signin_passwordless_email` tool to send a magic link to a user's email address for a seamless passwordless authentication experience.