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
- A portal with at least one access group
- An access token from Grafbase for each person, or one for a shared connection
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in method
| Method | Type | What a person provides |
|---|---|---|
| Access Token | API token | token |
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:
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
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.
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 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. NeedsaccountSlugandgraphSlug.get_branch: Retrieves details about a specific branch of a federated graph, including its configuration and operation check settings. NeedsaccountSlug,graphSlugandbranchName.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. NeedsaccountSlugandgraphSlug.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. NeedsgraphId,subgraphNameandschema.create_branch: Creates a new branch on a federated graph. NeedsgraphIdandbranchName.execute_graphql: Executes an arbitrary GraphQL query or mutation against the Grafbase Management API. Needsquery.create_graph: Creates a new federated graph in a Grafbase account. NeedsaccountIdandslug.check_subgraph: Runs composition and breaking change checks against a subgraph schema without publishing it. NeedsgraphId,subgraphNameandschema.
Destructive tools (2)
delete_branch: Deletes a branch from a federated graph. NeedsaccountSlug,graphSlugandbranchName.delete_graph: Permanently deletes a federated graph and all its branches, subgraphs, and associated data. NeedsgraphId.
Triggers
Grafbase has 1 trigger, which fire on events in Grafbase:
inbound_webhook
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Grafbase there
- Tool permissions: tool filters and what employees see
- Grafbase on metorial.com: the integration overview