Configuration File Location
The configuration file is located at.nhost/mcp-nhost.toml
in your project directory. You can specify a custom location using the --config-file
flag.
TOML
Example Configurations
Basic Configuration with Cloud Access
Local Development Configuration
Multiple Projects with Different Access Levels
Environment Variable Interpolation
You can use environment variables in your configuration:Configuration Options Reference
Cloud Section
Option | Type | Required | Description |
---|---|---|---|
enable_mutations | boolean | No | Enable mutations on Nhost Cloud. Defaults to false . Requires CLI credentials with PAT. |
Projects Section
Option | Type | Required | Description |
---|---|---|---|
subdomain | string | Yes | Project subdomain. Use "local" for local development projects. |
region | string | Yes | Project region. Use "local" for local development projects. |
description | string | No | Human-readable description of the project. |
admin_secret | string | No* | Admin secret for authentication. Either admin_secret or pat is required. |
pat | string | No* | Project-specific Personal Access Token. Either admin_secret or pat is required. |
manage_metadata | boolean | No | Enable metadata management (migrations, permissions, etc.). Requires admin_secret . Defaults to false . |
allow_queries | array | No | List of allowed query names. Use ["*"] for all, [] for none. Defaults to [] . |
allow_mutations | array | No | List of allowed mutation names. Use ["*"] for all, [] for none. Defaults to [] . |
graphql_url | string | No | Custom GraphQL endpoint URL. Auto-generated if not provided. |
auth_url | string | No | Custom Auth endpoint URL. Auto-generated if not provided. |
hasura_url | string | No | Custom Hasura endpoint URL. Auto-generated if not provided. Required for manage_metadata . |
admin_secret
or pat
must be provided for authentication.