Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words

Nhost

by nhostversion 0.4.0-beta2i★ 9,388 (Stars for the whole repo)iRuns on your computer
Registry nameio.github.nhost/mcp

How to install

What it does

Let your users work with their own data through an AI assistant, limited to what they can see.

  • Connects Runs on your computer
  • Account or key No key needed · 2 settings to fill in (MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL)
  • Category Other

Install

Pick the AI app you use, then copy the settings.

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 13, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

2 setting(s) to fill in (MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL) · Install Docker on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Nhost for Claude on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "nhost": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "MCP_GRAPHQL_ENDPOINT", "-e", "MCP_AUTH_URL", "docker.io/nhost/mcp:0.4.0-beta2" ], "env": { "MCP_GRAPHQL_ENDPOINT": "your-value", "MCP_AUTH_URL": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Nhost tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Fill in 2 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • MCP_GRAPHQL_ENDPOINT GraphQL endpoint of the Nhost project the server exposes, e.g. http://hasura-service:8080/v1/graphql
    • MCP_AUTH_URL Nhost Auth URL used as the OAuth2 authorization server, e.g. https://SUBDOMAIN.auth.REGION.nhost.run/v1

    Descriptions are as written by the maker.

  3. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  4. Paste these settings and save the file

    {
      "mcpServers": {
        "nhost": {
          "command": "docker",
          "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "MCP_GRAPHQL_ENDPOINT",
            "-e",
            "MCP_AUTH_URL",
            "docker.io/nhost/mcp:0.4.0-beta2"
          ],
          "env": {
            "MCP_GRAPHQL_ENDPOINT": "your-value",
            "MCP_AUTH_URL": "your-value"
          }
        }
      }
    }
  5. Quit Claude and open it again

  6. Try it

    Use Nhost and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using Nhost or shows a Nhost tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect Nhost yet

Nhost runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect Nhost

  • 2 setting(s) to fill in (MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL) · Install Docker on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • 2 setting(s) to fill in (MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL) · Install Docker on your computer first (one time)
  • 2 setting(s) to fill in (MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL) · Install Docker on your computer first (one time)
  • 2 setting(s) to fill in (MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL) · Install Docker on your computer first (one time)

B · Others in Other that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

2 setting(s) to fill in (MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL) · Install Docker on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Nhost for Claude Code on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user nhost --env MCP_GRAPHQL_ENDPOINT=your-value --env MCP_AUTH_URL=your-value -- docker run -i --rm -e MCP_GRAPHQL_ENDPOINT -e MCP_AUTH_URL docker.io/nhost/mcp:0.4.0-beta2 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Nhost tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Fill in 2 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • MCP_GRAPHQL_ENDPOINT GraphQL endpoint of the Nhost project the server exposes, e.g. http://hasura-service:8080/v1/graphql
    • MCP_AUTH_URL Nhost Auth URL used as the OAuth2 authorization server, e.g. https://SUBDOMAIN.auth.REGION.nhost.run/v1

    Descriptions are as written by the maker.

  3. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  4. Paste this command and press Enter

    claude mcp add --scope user nhost --env MCP_GRAPHQL_ENDPOINT=your-value --env MCP_AUTH_URL=your-value -- docker run -i --rm -e MCP_GRAPHQL_ENDPOINT -e MCP_AUTH_URL docker.io/nhost/mcp:0.4.0-beta2
  5. Type /mcp in Claude Code

    You should see Nhost listed as connected

  6. Try it

    Use Nhost and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using Nhost or shows a Nhost tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

2 setting(s) to fill in (MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL) · Install Docker on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Nhost for Cursor on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "nhost": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "MCP_GRAPHQL_ENDPOINT", "-e", "MCP_AUTH_URL", "docker.io/nhost/mcp:0.4.0-beta2" ], "env": { "MCP_GRAPHQL_ENDPOINT": "your-value", "MCP_AUTH_URL": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Nhost tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Fill in 2 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • MCP_GRAPHQL_ENDPOINT GraphQL endpoint of the Nhost project the server exposes, e.g. http://hasura-service:8080/v1/graphql
    • MCP_AUTH_URL Nhost Auth URL used as the OAuth2 authorization server, e.g. https://SUBDOMAIN.auth.REGION.nhost.run/v1

    Descriptions are as written by the maker.

  3. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  4. Fill in your key

    In the Nhost settings, MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL is empty; add your key and save

  5. Open the AI chat in Cursor in Agent mode

  6. Try it

    Use Nhost and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using Nhost or shows a Nhost tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

2 setting(s) to fill in (MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL) · Install Docker on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server Nhost for VS Code on this computer, in this order: 1) Check Docker with docker --version. If it is missing, tell me to install it from https://www.docker.com/products/docker-desktop/; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "nhost": { "type": "stdio", "command": "docker", "args": [ "run", "-i", "--rm", "-e", "MCP_GRAPHQL_ENDPOINT", "-e", "MCP_AUTH_URL", "docker.io/nhost/mcp:0.4.0-beta2" ], "env": { "MCP_GRAPHQL_ENDPOINT": "your-value", "MCP_AUTH_URL": "your-value" } } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) For MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL, leave "your-value" in place and tell me to paste the real value myself into the file or the app’s field. Never ask me to type a key in chat. 5) Do what we agreed, then check that the Nhost tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Docker (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    docker --version
    • A version number such as Docker version … = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Install Docker Desktop: on Mac open Docker.dmg and drag the icon to Applications (pick Apple silicon or Intel to match your Mac) · on Windows double-click Docker Desktop Installer.exe · then open the Docker Desktop app and leave it running. No curl command needed

    Open the Docker download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: docker --version

    Install once; it works for everything that needs Docker

  2. Fill in 2 setting(s)

    These are program settings, not keys. No sign-up needed; fill them in as the maker describes.

    • MCP_GRAPHQL_ENDPOINT GraphQL endpoint of the Nhost project the server exposes, e.g. http://hasura-service:8080/v1/graphql
    • MCP_AUTH_URL Nhost Auth URL used as the OAuth2 authorization server, e.g. https://SUBDOMAIN.auth.REGION.nhost.run/v1

    Descriptions are as written by the maker.

  3. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  4. Fill in your key

    In the Nhost settings, MCP_GRAPHQL_ENDPOINT, MCP_AUTH_URL is empty; add your key and save

  5. Open the AI chat in VS Code in Agent mode

  6. Try it

    Use Nhost and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using Nhost or shows a Nhost tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use Nhost💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user nhost --env MCP_GRAPHQL_ENDPOINT=your-value --env MCP_AUTH_URL=your-value -- docker run -i --rm -e MCP_GRAPHQL_ENDPOINT -e MCP_AUTH_URL docker.io/nhost/mcp:0.4.0-beta2

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "nhost": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MCP_GRAPHQL_ENDPOINT",
        "-e",
        "MCP_AUTH_URL",
        "docker.io/nhost/mcp:0.4.0-beta2"
      ],
      "env": {
        "MCP_GRAPHQL_ENDPOINT": "your-value",
        "MCP_AUTH_URL": "your-value"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "nhost": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MCP_GRAPHQL_ENDPOINT",
        "-e",
        "MCP_AUTH_URL",
        "docker.io/nhost/mcp:0.4.0-beta2"
      ],
      "env": {
        "MCP_GRAPHQL_ENDPOINT": "your-value",
        "MCP_AUTH_URL": "your-value"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "nhost": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MCP_GRAPHQL_ENDPOINT",
        "-e",
        "MCP_AUTH_URL",
        "docker.io/nhost/mcp:0.4.0-beta2"
      ],
      "env": {
        "MCP_GRAPHQL_ENDPOINT": "your-value",
        "MCP_AUTH_URL": "your-value"
      }
    }
  }
}

Values you fill in

  • MCP_GRAPHQL_ENDPOINT required env
    GraphQL endpoint of the Nhost project the server exposes, e.g. http://hasura-service:8080/v1/graphql
  • MCP_AUTH_URL required env
    Nhost Auth URL used as the OAuth2 authorization server, e.g. https://SUBDOMAIN.auth.REGION.nhost.run/v1

Descriptions are as written by the maker.

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

GitHub starsi
9,388 (Stars for the whole repo)
This repo holds several MCP listings; its stars count once in rankings
Downloads per weeki
Not on npm/PyPI
Connection
Runs on your computer
Transport
streamable-http
Latest versioni
0.4.0-beta2
Categoryi
Other
Published to registryi
Nov 3, 2026
Code last changedi
Nov 14, 2026
Maker
nhost
Packages
oci: docker.io/nhost/mcp:0.4.0-beta2
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 15, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account nhost, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed yesterday

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

Not checked: only npm and PyPI packages with a version can be checked

What we check → · JSON

Makers: ask for a re-check or report wrong info

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Otheri

  • More stars than 99% of the other 19870 servers in this category
  • Published to the registry more recently than 79% of the other 19870 servers in this category
  • Basic checks equal to or better than 100% of the other 19870 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is Nhost safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed yesterday, and the latest version (0.4.0-beta2) reached the registry 12 days ago.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Docker on your computer.

What can I use instead?

In the same category: World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 97 tools.

by koala73Widely used★ 90.6KUpdated yesterday

Runs in the cloud✓ service owner · worldmonitor.app

openstatus

Manage monitors, status pages, incidents and maintenances in your openstatus workspace.

by openstatusHQWidely used★ 9.3KUpdated 2 months ago

Runs in the cloud✓ service owner · openstatus.dev

Oh My Posh Validator

Validate oh-my-posh configurations and segment snippets against the official schema.

by JanDeDobbeleerWidely used★ 23.8K Stars for the whole repoUpdated 26 days ago

Runs in the cloud✓ service owner · ohmyposh.dev

Strata

MCP server for progressive tool usage at any scale (see https://klavis.ai)

by Klavis-AIGrowing★ 5.8KUpdated 14 months ago

Runs in the cloudRepo archived✓ klavis.ai

Jitsu

Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.

by jitsucomWidely used★ 5.1KUpdated 4 months ago

Runs in the cloud✓ service owner · jitsu.com
  • World Monitor — Runs in the cloud, nothing to install · No key needed
  • openstatus — Runs in the cloud, nothing to install · No key needed
  • Oh My Posh Validator — Runs in the cloud, nothing to install · No key needed
  • Strata — Runs in the cloud, nothing to install · No key needed
  • Jitsu — Runs in the cloud, nothing to install · No key needed

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

Nhost MCP Service

The Nhost MCP service adds an agentic interface to any Nhost project. It exposes your project's GraphQL API as an MCP (Model Context Protocol) server, allowing AI assistants like Claude, Cursor, or any MCP-compatible client to query and mutate your data.

If you're building on Nhost, this service lets your users interact with their project data through AI assistants — no custom integration code required. Deploy it alongside your project and any MCP-compatible client can connect, authenticate on behalf of your users via your existing Nhost Auth setup, and work with your data within the permissions defined.

How It Works

The MCP server sits between your AI assistant and your Nhost project's GraphQL API. It provides three tools that the assistant can call:

  • `get-schema` - Introspects the GraphQL schema so the assistant understands your data model. Returns either a summary of available operations or the full SDL for specific queries/mutations.
  • `graphql-query` - Executes read-only GraphQL queries against your project.
  • `graphql-mutation` - Executes GraphQL mutations to create, update, or delete data.

On startup, the server fetches a schema summary from your GraphQL endpoint and includes it in the MCP instructions, giving the AI assistant immediate context about your data model without any additional configuration.

Authentication with OAuth2

The MCP service integrates with Nhost Auth as an OAuth2 authorization server, following the MCP Authorization specification. This means any MCP client that supports OAuth2 can authenticate with your Nhost project automatically.

The flow works as follows:

  1. The MCP client discovers authentication requirements by fetching /.well-known/oauth-protected-resource from the MCP server.
  2. The client redirects the user to the Nhost Auth authorization endpoint for login (authorization code flow with PKCE).
  3. After authentication, the client exchanges the authorization code for a JWT access token.
  4. All subsequent MCP requests include the JWT as a Bearer token.
  5. The MCP server validates the JWT signature via JWKS, checks the issuer and expiration, then forwards the token on every GraphQL request.
  6. The GraphQL service enforces row-level and column-level permissions based on the JWT's claims, so the AI assistant can only access data the authenticated user is allowed to see.

IMPORTANT! CIMD needs to be enabled.

Enforcing a Specific Role

The --enforce-role flag restricts the MCP server to accept only tokens whose x-hasura-default-role claim matches the specified role. Requests with a different default role receive a 403 Forbidden response.

For example, setting --enforce-role=user_mcp means only tokens issued with user_mcp as the default role will be accepted. If you've configured permissions for that role with limited access (e.g., read-only on certain tables), the AI assistant will be restricted to those permissions.

This lets you:

  • Create a dedicated role (e.g., user_mcp) with restricted permissions for AI access.
  • Allow AI assistants to read data but not modify it.
  • Limit which tables or columns are visible to the assistant.
  • Run multiple MCP instances with different role configurations for different use cases.

Configuration

All flags can be set via environment variables.

FlagEnv VarDescription
--listen-addrMCP_LISTEN_ADDRHTTP listen address (default: :3000)
--debugMCP_DEBUGEnable debug logging
--log-format-textMCP_LOG_FORMAT_TEXTFormat logs in plain text instead of JSON
--graphql-endpointMCP_GRAPHQL_ENDPOINTGraphQL endpoint URL (required)
--mcp-instructionsMCP_INSTRUCTIONSServer-level MCP instructions
--query-instructionsMCP_QUERY_INSTRUCTIONSInstructions for the graphql-query tool
--mutation-instructionsMCP_MUTATION_INSTRUCTIONSInstructions for the graphql-mutation tool
--schema-instructionsMCP_SCHEMA_INSTRUCTIONSInstructions for the get-schema tool
--auth-urlMCP_AUTH_URLOAuth2 authorization server URL (required)
--realmMCP_REALMRealm for WWW-Authenticate header
--enforce-roleMCP_ENFORCE_ROLEEnforce that the JWT's default Hasura role matches this value
--browser-htmlMCP_BROWSER_HTMLHTML content to serve when a browser visits the service URL

Deploying to Nhost

To deploy to Nhost Run you can use the one-click install link below:

https://app.nhost.io/run-one-click-install?config=eyJuYW1lIjoibWNwIiwiaW1hZ2UiOnsiaW1hZ2UiOiJuaG9zdC9tY3A6MC4xLjAiLCJwdWxsQ3JlZGVudGlhbHMiOm51bGx9LCJjb21tYW5kIjpbIm1jcCJdLCJyZXNvdXJjZXMiOnsiY29tcHV0ZSI6eyJjcHUiOjEyNSwibWVtb3J5IjoyNTZ9LCJzdG9yYWdlIjpbXSwicmVwbGljYXMiOjEsImF1dG9zY2FsZXIiOm51bGx9LCJlbnZpcm9ubWVudCI6W3sibmFtZSI6Ik1DUF9BVVRIX1VSTCIsInZhbHVlIjoiaHR0cHM6Ly9TVUJET01BSU4uYXV0aC5SRUdJT04ubmhvc3QucnVuL3YxIn0seyJuYW1lIjoiTUNQX1JFQUxNIiwidmFsdWUiOiJodHRwczovL21jcC5hY21lLmNvbSJ9LHsibmFtZSI6Ik1DUF9HUkFQSFFMX0VORFBPSU5UIiwidmFsdWUiOiJodHRwOi8vaGFzdXJhLXNlcnZpY2U6ODA4MC92MS9ncmFwaHFsIn0seyJuYW1lIjoiTUNQX0lOU1RSVUNUSU9OUyIsInZhbHVlIjoiVGhlc2UgYXJlIHNvbWUgaW5zdHJ1Y3Rpb25zIGZvciB5b3VyIE1DUCBzZXJ2ZXIuIn0seyJuYW1lIjoiTUNQX0VORk9SQ0VfUk9MRSIsInZhbHVlIjoidXNlcl9tY3AifV0sInBvcnRzIjpbeyJwb3J0IjozMDAwLCJ0eXBlIjoiaHR0cCIsInB1Ymxpc2giOnRydWV9XSwiaGVhbHRoQ2hlY2siOm51bGx9

And edit as needed. Make sure to set the correct subdomain and region in the MCP_AUTH_URL (or your custom domain if you using one), set the MCP_REALM to the URL you will use for your MCP service, change the MCP_INSTRUCTIONS as needed and change or remove MCP_ENFORCE_ROLE

NOTE: Check the releases page and make sure you are using the most recent version of the service.

Alternatively, add a run-mcp.toml to your project directory:

name = 'mcp'

command = ['mcp']

[image] image = 'nhost/mcp:0.1.0'

[[environment]] name = 'MCP_AUTH_URL' value = 'https://local.auth.local.nhost.run/v1'

[[environment]] name = 'MCP_REALM' value = 'https://myapp.example.com'

[[environment]] name = 'MCP_GRAPHQL_ENDPOINT' value = 'http://hasura-service:8080/v1/graphql'

[[environment]] name = 'MCP_INSTRUCTIONS' value = 'This MCP server interacts with my application'

[[environment]] name = 'MCP_ENFORCE_ROLE' value = 'user_mcp'

[[ports]] port = 3000 type = 'http' publish = true

[resources] replicas = 1

[resources.compute] cpu = 125 memory = 256

Then deploy your project as usual. The MCP server will be available at the published port and any MCP-compatible client can connect to it.

You can also try locally with:

nhost up --run-service run-mcp.toml

Connecting an MCP Client

Point your MCP client to the server URL. For example, in Claude Desktop's configuration:

  1. Go to customize -> Connectors
  2. Click on + and enter any name you want and the url where your MCP server resides, for instance https://mcp.acme.com
  3. Click "Add"
  4. Once connected you will be redirected to your Oauth2's consent page to authorize the Oauth2 client.