MetorialDocs

Set up Grafbase in Metorial for Claude, ChatGPT and Cursor

Share Grafbase with your team in Claude, ChatGPT and Cursor through Metorial: access token sign-in, 14 tools (7 read-only).

To give your team Grafbase in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Grafbase integration in a Metorial portal, and each person connects with an access token. Agents can discover Grafbase accounts and graphs, manage federated graphs and branches, publish subgraph schemas, run schema checks, retrieve schema SDL, and execute custom GraphQL operations. The integration has 14 tools, 7 read-only, 5 write and 2 destructive, plus 1 trigger.

What you'll learn

  • How an admin shares Grafbase in a portal and how each person connects
  • What Grafbase asks for when you connect, and where to find it
  • How to keep the 7 read-only tools and reject the other 7

Before you start

Sign-in method

MethodTypeWhat a person provides
Access TokenAPI tokentoken

Access Token

To connect, a person enters:

  • token: Grafbase personal access token or organization access token. Created from account settings > access tokens.

Setup settings

Setup also asks for:

  • apiUrl (optional): Grafbase API URL. Defaults to https://api.grafbase.com/graphql. Override for self-hosted Enterprise Platform instances.
  • accountSlug (optional): Default account slug (personal or organization) to use for operations.

Admin: share Grafbase in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose Grafbase. For how members connect, choose Each person connects so everyone enters their own access token, or Shared connection to enter one access token for everyone.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Grafbase.

Choose who gets it

Add the access groups that should see Grafbase. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user Grafbase integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search grafbase

Employee: connect Grafbase

In the portal

Open Grafbase in the catalog

Sign in to your portal and open Grafbase. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. In the setup window, enter your access token (token).

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search grafbase
metorial setup <catalog-item-id>

catalog search prints the catalog item ID.

Add it to your AI client

metorial install adds your Grafbase connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list grafbase
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 7 read-only tools, such as get_graph and get_branch, and lose the 5 write tools, such as create_graph or create_branch, and the 2 destructive tools, such as delete_graph or delete_branch.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list grafbase
metorial tools <integration-id>
metorial call <integration-id> get_viewer -d '{}'

metorial tools lists the 14 tools, minus any you rejected. get_viewer takes no input.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (7)

  • list_subgraphs: Lists all published subgraphs in a branch of a federated graph. Needs accountSlug and graphSlug.
  • get_branch: Retrieves details about a specific branch of a federated graph, including its configuration and operation check settings. Needs accountSlug, graphSlug and branchName.
  • get_graph: Retrieves details about a federated graph including its branches, account information, and configuration.
  • get_schema: Retrieves the GraphQL schema for a federated graph. Needs accountSlug and graphSlug.
  • get_viewer: Retrieves the authenticated user's profile and their organization memberships.
  • get_account: Retrieves an account by its slug and returns the account ID needed to create graphs.
  • list_graphs: Lists a page of graphs in an account and returns graph IDs for graph, branch, publishing, and schema-check operations.

Write tools (5)

  • publish_subgraph: Publishes a subgraph schema to the Grafbase schema registry. Needs graphId, subgraphName and schema.
  • create_branch: Creates a new branch on a federated graph. Needs graphId and branchName.
  • execute_graphql: Executes an arbitrary GraphQL query or mutation against the Grafbase Management API. Needs query.
  • create_graph: Creates a new federated graph in a Grafbase account. Needs accountId and slug.
  • check_subgraph: Runs composition and breaking change checks against a subgraph schema without publishing it. Needs graphId, subgraphName and schema.

Destructive tools (2)

  • delete_branch: Deletes a branch from a federated graph. Needs accountSlug, graphSlug and branchName.
  • delete_graph: Permanently deletes a federated graph and all its branches, subgraphs, and associated data. Needs graphId.

Triggers

Grafbase has 1 trigger, which fire on events in Grafbase:

  • inbound_webhook

Next steps