mcp-nhost

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 9 Imported by: 0

README

mcp-nhost

A Model Context Protocol (MCP) server implementation for interacting with Nhost Cloud projects and services.

Overview

MCP-Nhost is designed to provide a unified interface for managing Nhost projects through the Model Context Protocol. It enables seamless interaction with Nhost Cloud services, offering a robust set of tools for project management and configuration.

Available Tools

The following tools are currently exposed through the MCP interface:

  1. cloud_get_graphql_schema

    • Provides the GraphQL schema for the Nhost Cloud
    • Provides information about queries, mutations, and type definitions
  2. cloud_graphql_query

    • Executes GraphQL queries and mutations against the Nhost Cloud
    • Enables project and organization management
    • Allows querying and updating project's configuration
  3. local_get_graphql_schema

    • Retrieves the GraphQL schema for local Nhost development projects
    • Provides access to project-specific queries and mutations
    • Helps understand available operations for local development helping generating code
    • Uses "user" role unless specified otherwise
  4. local_graphql_query

    • Executes GraphQL queries against local Nhost development projects
    • Enables testing and development of project-specific operations
    • Supports both queries and mutations for local development
    • Uses "user" role unless specified otherwise
  5. local_config_server_schema

    • Retrieves the GraphQL schema for the local config server
    • Helps understand available configuration options
  6. local_config_server_query

    • Executes GraphQL queries against the local config server
    • Enables querying and modifying local project configuration
    • Changes require running 'nhost up' to take effect
  7. project_get_graphql_schema

    • Retrieves the GraphQL schema for Nhost Cloud projects
    • Provides access to project-specific queries and mutations
    • Uses "user" role unless specified otherwise
  8. project_graphql_query

    • Executes GraphQL queries against Nhost Cloud projects
    • Enables interaction with live project data
    • Supports both queries and mutations (need to be allowed)
    • Uses "user" role unless specified otherwise

Screenshots and Examples

You can find screenshots and examples of the current features and tools in the screenshots file.

Installing

To install mcp-nhost, you can use the following command:

sudo curl -L https://raw.githubusercontent.com/nhost/mcp-nhost/main/get.sh | bash

Upgrading

To upgrade mcp-nhost, you can use the following command:

sudo mcp-nhost upgrade --confirm

Getting Started

After installing mcp-nhost, you will need to do two things to get things up and running:

  1. Create a Personal Access Token (PAT) in your Nhost account.
  2. Configure your mcp-nhost client (i.e. Cursor, etc.)
Create a PAT

In order to use mcp-nhost, you need to create a Personal Access Token (PAT) in your Nhost account. You can do this by following these steps:

  1. Go to https://app.nhost.io/account
  2. Scroll don to "Personal Access Tokens" and create a new token. Write down the token as you will need it later.
  3. Proceed to configure your mcp-nhost client (instructions for some below).
Configuring clients

The examples below enable all features which includes managing cloud projects, local projects, and executing queries and mutations. You can choose to enable only the features you need. Please, refer to the CLI usage section for more details on how to disable specific features or filter queries and mutations.

Cursor
  1. Go to "Cursor Settings"
  2. Click on "MCP"
  3. Click on "+ Add new global MCP server"
  4. Add the following object inside "mcpServers":
    "mcp-nhost": {
      "command": "/usr/local/bin/mcp-nhost",
      "args": [
        "start",
        "--with-cloud-mutations",
        "--project-subdomain=<your-project-subdomain>",
        "--project-region=<your-project-region>",
        "--project-admin-secret=<your-project-admin-secret>",
        "--project-allow-queries=*",
        "--project-allow-mutations=*"
      ],
      "env": {
        "NHOST_PAT": "<here-goes-your-pat>"
      }
    }

CLI Usage

For help on how to use the CLI, you can run:

mcp-nhost --help

Or check USAGE.md for more details.

Roadmap

  • ✅ Cloud platform: Basic project and organization management
  • ✅ Cloud projects: Configuration management
  • ✅ Local projects: Configuration management
  • ✅ Local projects: Graphql Schema awareness and query execution
  • ✅ Cloud projects: Schema awareness and query execution
  • 🔄 Local projects: Create migrations
  • 🔄 Local projects: Manage permissions
  • 🔄 Documentation: integrate or document use of mintlify's mcp server
  • 🔄 Local projects: Auth and Storage schema awareness (maybe via mintlify?)
  • 🔄 Cloud projects: Auth and Storage schema awareness (maybe via mintlify?)

If you have any suggestions or feature requests, please feel free to open an issue for discussion.

Contributing

We welcome contributions to mcp-nhost! If you have suggestions, bug reports, or feature requests, please open an issue or submit a pull request.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
gen
nhost
auth
Package auth provides primitives to interact with the openapi HTTP API.
Package auth provides primitives to interact with the openapi HTTP API.
tools

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL