# Grafbase — how to use (mcp.ai)

Connect your Grafbase account and use 28 tools for developer tools straight from your AI agent. Connect with your own API key. Grafbase is a platform that accelerates the development of GraphQL APIs, offering features like edge caching, unified data access, and seamless integration with popular authentication strategies.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_grafbase?ms=1787295780000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `grafbase_add_zitadel_redirect`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/grafbase`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/grafbase/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/grafbase/add/zitadel/redirect` — Add a redirect URI to Zitadel OAuth configuration in Grafbase. Use when you need to register a new redirect URI for OAuth flows with Zitadel identity provider.
- `POST https://api.mcp.ai/api/grafbase/assign/team/role` — Tool to assign a role to a team member in Grafbase. Use this when you need to change a team member's role between MEMBER and ADMIN. ADMIN role grants team management privileges including adding/removi
  - body: { role: string, team_id: string, member_id: string }
- `POST https://api.mcp.ai/api/grafbase/delete/api/key` — Delete an existing Grafbase API key (access token) by ID. Use after confirming the key ID via the List API Keys action. This action permanently revokes the API key's access.
  - body: { key_id: string }
- `POST https://api.mcp.ai/api/grafbase/delete/audit/log` — Tool to delete a specific Grafbase audit log entry. IMPORTANT: Grafbase does not expose a public API to delete audit logs. Audit logs are read-only compliance records retained for 90 days and can only
  - body: { log_id: string }
- `POST https://api.mcp.ai/api/grafbase/delete/extension` — Tool to delete a Grafbase extension configuration by its unique ID. Note: Grafbase extensions are primarily configured via grafbase.toml configuration file and WebAssembly modules, not through a REST 
  - body: { extension_id: string }
- `POST https://api.mcp.ai/api/grafbase/delete/mcp/server` — Tool to delete a Grafbase MCP server configuration by its unique ID. Note: Grafbase MCP is primarily configured via grafbase.toml configuration file, not through a REST API. This action attempts to de
  - body: { server_id: string }
- `POST https://api.mcp.ai/api/grafbase/delete/schema` — Tool to delete a subgraph from a Grafbase federated graph. Use this when you need to remove a subgraph from the schema registry. The operation can be run as a dry run first to check if deletion would 
  - body: { branch?: string, dry_run?: boolean, message?: string, graph_slug?: string, account_slug: string, subgraph_name: string }
- `POST https://api.mcp.ai/api/grafbase/delete/schema/check` — Attempt to delete a schema check from the Grafbase platform. IMPORTANT LIMITATION: The Grafbase Platform API does not support deleting schema checks. Schema checks are immutable audit records that pro
  - body: { check_id: string }
- `POST https://api.mcp.ai/api/grafbase/delete/team` — Tool to delete a team from the Grafbase organization. Use when removing a team that is no longer needed. This action permanently removes the team and its associated permissions.
  - body: { team_id: string }
- `POST https://api.mcp.ai/api/grafbase/disable/mcp` — Disable the Model Context Protocol (MCP) server for a Grafbase project. MCP enables AI agents to query your GraphQL APIs using natural language. Use this action when you need to turn off MCP access to
  - body: { reason?: string, dry_run?: boolean }
- `POST https://api.mcp.ai/api/grafbase/enable/mcp` — Enable the Model Context Protocol (MCP) server on a Grafbase gateway. MCP allows AI tools (like Cursor, Windsurf, VS Code) to explore and query your GraphQL API using natural language. This tool attem
  - body: { reason?: string, dry_run?: boolean, enabled?: boolean, server_url?: string }
- `POST https://api.mcp.ai/api/grafbase/get/audit/log` — Tool to retrieve a specific Grafbase audit log entry by searching organization activity. Note: Grafbase does not expose a direct API to fetch individual audit log entries by ID. This action queries or
  - body: { log_id: string, organization_slug?: string }
- `POST https://api.mcp.ai/api/grafbase/get/extension/by/name` — Tool to retrieve a Grafbase extension by its name. Returns detailed information including the extension's ID, name, versions, and ownership details. Use this when you need to look up an extension by n
  - body: { name: string }
- `POST https://api.mcp.ai/api/grafbase/get/extension/version/by/name/and/version` — Tool to retrieve details of a specific Grafbase extension version by name and version. Use when you need to query information about a particular version of an extension, including its creation date an
  - body: { version: string, extension_name: string }
- `POST https://api.mcp.ai/api/grafbase/get/federated/schema` — Retrieves the composed federated graph schema from Grafbase in SDL format. Use this to inspect the unified schema after all subgraph schemas have been composed. Returns the full GraphQL SDL including 
  - body: { branch?: string, graph_slug?: string }
- `POST https://api.mcp.ai/api/grafbase/get/invitation` — Tool to retrieve details about a specific Grafbase invitation by ID. Use when you need to check the status, email, or creation date of an invitation.
  - body: { invitation_id: string }
- `POST https://api.mcp.ai/api/grafbase/get/notifications/inbox/messages` — Tool to retrieve notifications inbox messages for the authenticated Grafbase user. Returns all notification messages with counts of total and unread notifications. Use when you need to check for new n
- `POST https://api.mcp.ai/api/grafbase/get/schema/check` — Retrieve details of a specific schema check by its ID. This tool fetches comprehensive information about a schema validation check, including error details, git commit information, and approval status
  - body: { check_id: string, graph_slug: string, account_slug: string }
- `POST https://api.mcp.ai/api/grafbase/get/subgraph/schema` — Retrieves the GraphQL SDL schema for a specific subgraph by name. Use GRAFBASE_LIST_SUBGRAPHS first to discover available subgraph names. Returns the full schema definition including types, queries, m
  - body: { name: string }
- `POST https://api.mcp.ai/api/grafbase/list/api/keys` — List all API keys (access tokens) for the authenticated Grafbase user. Uses the Grafbase Management API to retrieve access tokens with pagination support.
  - body: { last?: integer, after?: string, first?: integer, before?: string }
- `POST https://api.mcp.ai/api/grafbase/list/audit/logs` — Tool to list audit logs for Grafbase organizations. Audit logs track organization member activity including graph management, team operations, access control changes, and configuration updates. Note: 
  - body: { after?: string, first?: integer, organization_slug?: string }
- `POST https://api.mcp.ai/api/grafbase/list/extensions` — Tool to list all extensions configured for a Grafbase project. Returns extensions from the project's configuration. Use to discover what extensions are installed in your Grafbase gateway.
- `POST https://api.mcp.ai/api/grafbase/list/mcp/servers` — Check MCP server configuration status for a Grafbase gateway. Grafbase MCP servers are configured via grafbase.toml files, not through a dynamic API. This tool checks if the MCP endpoint is accessible
  - body: { check_health?: boolean }
- `POST https://api.mcp.ai/api/grafbase/list/schema/checks` — List schema checks for a Grafbase graph. This tool retrieves the history of schema validation checks that have been run against a specific graph. Schema checks help detect breaking changes before depl
  - body: { last?: integer, after?: string, first?: integer, before?: string, branch?: string, graph_slug: string, account_slug: string }
- `POST https://api.mcp.ai/api/grafbase/list/schemas` — Tool to list all schemas in the Grafbase schema registry. In Grafbase, the schema registry tracks published subgraphs in federated graphs. Each schema entry represents a subgraph with its name, endpoi
  - body: { branch?: string }
- `POST https://api.mcp.ai/api/grafbase/list/subgraphs` — Tool to list published subgraphs in your Grafbase federated graphs. Use this to discover all subgraphs, their names, and endpoint URLs across your organizations. Optionally filter by branch name (e.g.
  - body: { branch?: string }
- `POST https://api.mcp.ai/api/grafbase/mark/notifications/as/read` — Tool to mark Grafbase notifications as read. Use when you need to update the read status of one or more notifications in your notification inbox.
  - body: { notification_ids: string[] }
- `POST https://api.mcp.ai/api/grafbase/remove/graph/owner` — Tool to remove an owner from a Grafbase graph. Use when you need to revoke ownership or access rights for a user or team on a specific graph.
  - body: { graph_id: string, owner_id: string }

## Example prompts
- "What can I do in Grafbase?"
- "Show me a summary of my Grafbase account"

## More
- Page: https://mcp.ai/grafbase
- Agent spec (llms.txt): https://mcp.ai/grafbase/llms.txt
- Postman collection: https://mcp.ai/grafbase/postman.json
