Skip to content
SupportDashboard

Deployment

Deploy the Backend MCP Server to Nhost Run with the one-click installer or a run-mcp.toml file, and run it locally with the Nhost CLI.

MCP deployment Nhost Run run-mcp.toml one-click install config-deploy Docker self-host

The Backend MCP Server is a container image (nhost/mcp) that you deploy alongside your project on Nhost Run. It connects to your project’s GraphQL and Storage APIs over the internal network.

Backend MCP relies on your Nhost Auth project being set up as an OAuth2 provider. Complete the authentication prerequisites — the OAuth2 provider, CIMD, and a consent page — before you deploy.

Open the installer and select your Nhost project:

Deploy MCP to Nhost Run

Review these environment variables before deploying:

  • MCP_AUTH_URL — set it to your project’s Auth URL, for example https://SUBDOMAIN.auth.REGION.nhost.run/v1.
  • MCP_REALM — set it to the public URL of your MCP service.
  • MCP_INSTRUCTIONS — replace the sample text with a description of your application.
  • MCP_ENFORCE_ROLE — set it to your dedicated MCP role, or remove it to use each signed-in user’s default role.

The installer preconfigures MCP_GRAPHQL_ENDPOINT and MCP_STORAGE_URL to use your project’s internal endpoints.

Both deployment options enable the storage-download tool. It can only read files allowed by the signed-in user’s Download permissions. If your assistant doesn’t need to download files, remove MCP_STORAGE_URL to disable the tool.

Once the service is running, connect your MCP client using the service’s public URL.

To run Backend MCP in your local Nhost stack, set MCP_AUTH_URL in run-mcp.toml to your local Auth URL, for example https://local.auth.local.nhost.run/v1. Keep the internal GraphQL and Storage URLs. Then start the stack:

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

Every setting can be supplied as a flag or an environment variable. MCP_GRAPHQL_ENDPOINT and MCP_AUTH_URL are required. See Configuration for the full list.