Nhost MCP

The Nhost MCP service opens a project GraphQL API to an assistant: schema, queries and mutations run with user permissions.

  • 9,378 ★ on the repository
  • Last commit
  • MIT
MCP serverOfficial

Extended access

Why this level

  • The `graphql-mutation` tool creates, changes and deletes project data.
  • User data goes into the model context.
All reasons and checks

nhost/nhost

Install

Manual install

Text for your agent

Deploy the `nhost/mcp` image next to the project and set `MCP_GRAPHQL_ENDPOINT`, `MCP_AUTH_URL`, `MCP_REALM` and the role through `MCP_ENFORCE_ROLE`. In the client connect the published server address over OAuth and call mutations only with confirmation.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The `graphql-mutation` tool creates, changes and deletes project data.
  • User data goes into the model context.

This is third-party code. Review the repository files before installing.

What it does

The Nhost MCP service runs next to an Nhost project and opens its GraphQL API to Claude, Cursor and any MCP client. It sits between the assistant and GraphQL and exposes three tools: `get-schema` introspects the schema and shows a summary of operations or the full SDL, `graphql-query` runs read queries, `graphql-mutation` creates, changes and deletes data. At startup the server loads a schema summary into the MCP instructions, so the assistant knows the data model at once. Sign-in uses OAuth2: Nhost Auth acts as the authorization server per the MCP specification, and the assistant gets a JWT and sends it with every request. The GraphQL service itself applies row and column permissions, so the assistant sees only what the user may see. The `--enforce-role` flag accepts tokens of one role only, for example a dedicated `user_mcp` role with trimmed permissions.

Who it is for. Developers of Nhost apps who want to give users access to their data through an AI assistant without a custom integration.

Good fit when

  • An app user asks the assistant about their orders and it builds a query to your GraphQL.
  • A `user_mcp` role is created for the assistant with read-only access to chosen tables.
  • A developer explores the project schema with `get-schema` before writing queries.
  • The service is deployed in Nhost Run with a `run-mcp.toml` file next to the other project services.

Not a fit when

  • The project is not on Nhost or has no GraphQL API: the service relies on a GraphQL endpoint and Nhost Auth.
  • CIMD clients are not enabled in Nhost Auth: the documentation names this a required condition.
  • The assistant must not change data and the role cannot be restricted: mutations are open through `graphql-mutation`.

Example request

Show the project schema, then select my open orders for the week and total their amount.

MCP

Transport
http
Authentication
OAuth

Environment variables

MCP_GRAPHQL_ENDPOINT required
GraphQL endpoint of the Nhost project
MCP_AUTH_URL required
Nhost Auth URL used as the OAuth2 authorization server
MCP_ENFORCE_ROLE
Role whose tokens the service accepts, for example `user_mcp`

Limitations

The service relies on Nhost Auth as the OAuth2 server, and CIMD clients must be enabled in Nhost Auth. The `MCP_GRAPHQL_ENDPOINT` and `MCP_AUTH_URL` variables are required. The `nhost/mcp` image is marked as a beta in the MCP registry. The `graphql-mutation` tool creates, changes and deletes data, so limits come from role permissions in GraphQL, and `--enforce-role` lets through tokens of one role. The service runs next to the project: the documentation deploys it in Nhost Run or runs it locally.

How to disable. Stop the MCP service in the project and remove the entry from the client settings. The assistant role and its permissions stay in the project, remove them separately if no longer needed.

FAQ

Which tools exist?

`get-schema` for the schema, `graphql-query` for reads and `graphql-mutation` for creating, changing and deleting data.

How do I restrict the assistant?

Create a role such as `user_mcp` with trimmed GraphQL permissions and run the service with `--enforce-role=user_mcp`: tokens of other roles get a 403.

How does sign-in work?

The client reads requirements from `/.well-known/oauth-protected-resource`, sends the user to Nhost Auth with an authorization code and PKCE and receives a JWT. GraphQL applies row and column permissions.

How do I deploy the service?

With the one-click link from the README in Nhost Run or a `run-mcp.toml` file with the `nhost/mcp` image, port `3000` and the `MCP_AUTH_URL`, `MCP_REALM` and `MCP_GRAPHQL_ENDPOINT` variables.

What must be enabled?

CIMD clients are needed in Nhost Auth. Without them the MCP client sign-in will fail.

Discussion

No questions or reviews yet.

Official

Apollo's MCP server: turns chosen GraphQL operations into tools the agent uses to work with your API

MCP serverBroad access319Repository stars

Two GraphQL tools for MCP clients: the agent fetches your API schema and runs queries against a single endpoint

MCP serverExtended access407Repository stars

A Pingora gateway that turns existing HTTP services into MCP servers from an OpenAPI spec, with no changes to their code

MCP serverBroad access185Repository stars
Official

MCP server for the InsForge backend: the agent creates tables, buckets and edge functions and ships the app from the editor

MCP serverBroad access38Repository stars

An MCP server that loads a Swagger or OpenAPI spec and turns every API endpoint into a tool the agent can call.

MCP serverBroad access115Repository stars

A single Go binary turns a SQL database into a REST API with roles and an MCP server for Claude Code, Cursor and VS Code

MCP serverBroad access173Repository stars

README in short

The service README covers how it works, OAuth2, role enforcement, flags and environment variables and two ways to deploy.

README badge

Report a problem