hasura
Documentation and community resources for Hasura MCP Server - Model Context Protocol integration for Hasura GraphQL Engine
claude mcp add --transport stdio sanjay3290-hasura-mcp-server docker run -i --rm --network host sanjay3290/hasura-mcp:latest --endpoint http://localhost:8080 --admin-secret your-secret
How to use
This MCP server exposes Hasura GraphQL Engine capabilities to AI assistants by wrapping common Hasura operations into MCP tools. You can export and manage metadata, run SQL queries, introspect the schema, and check for inconsistencies, all through natural language prompts. The tools include export_metadata, apply_metadata, reload_metadata, clear_metadata (read-only in production modes), run_sql, get_version, get_schema, and debugging or setup prompts for migrations, permissions, and metadata analysis. To use it, run the MCP server with your Hasura endpoint and admin secret, then issue prompts like: “Export the current metadata and show me the JSON,” or “Run a query to count new users in the last 7 days.” The server translates these prompts into Hasura operations, returning structured results that you can feed into further conversational flows.
How to install
Prerequisites:
- Docker installed on your machine
- Access to a Hasura GraphQL Engine endpoint and admin secret
Step-by-step:
-
Pull the MCP server image (example uses Hasura MCP):
docker pull sanjay3290/hasura-mcp:latest
-
Run the MCP server connected to your Hasura instance:
docker run -i --rm
--network host
sanjay3290/hasura-mcp:latest
--endpoint http://localhost:8080
--admin-secret your-secretIf you are connecting to a remote Hasura instance, omit --network host and replace the endpoint:
docker run -i --rm
sanjay3290/hasura-mcp:latest
--endpoint https://your-hasura.com
--admin-secret your-secret -
Verify startup by checking logs or attempting a quick tool call like getting the Hasura version.
-
Optional: configure environment variables or flags as needed for read-only mode or specific endpoints.
Additional notes
Tips and caveats:
- Read-only mode blocks certain destructive operations (apply_metadata, clear_metadata, drop_inconsistent_metadata). Use --read-only when running in production.
- Environment variables like HASURA_GRAPHQL_ENDPOINT and HASURA_GRAPHQL_ADMIN_SECRET can be used instead of flags, but command-line flags take precedence.
- When using remote Hasura instances, prefer not to use --network host due to security and portability considerations.
- The Docker image is based on Alpine and is non-root by default; ensure your environment allows non-root container execution.
- For troubleshooting, consult the Documentation links in the repository (Quick Start, Claude Desktop, Examples, Troubleshooting).
Related MCP Servers
Pare
Dev tools, optimized for agents. Structured, token-efficient MCP servers for git, test runners, npm, Docker, and more.
python-notebook
Lightweight Python Notebook MCP - Enable AI assistants to create, edit, and view Jupyter notebooks via Model Context Protocol
local -gateway
Aggregate multiple MCP servers into a single endpoint with web UI, OAuth 2.1, and profile-based tool management
nmap
MCP server for AI-powered network scanning with Nmap. Port scanning, service detection, OS fingerprinting, and vulnerability scanning for AI agents. By Vorota AI.
gmail
A robust Model Context Protocol server for Gmail integration with intelligent authentication and comprehensive email operations
mcp-tidy
CLI tool to visualize and manage MCP server configurations in Claude Code. List servers, analyze usage statistics, and clean up unused servers