> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Bitquery in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/bitquery
Last updated: 2026-11-24

Share Bitquery with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or API key sign-in, 8 tools, all read-only.

---

To give your team Bitquery in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Bitquery integration in a Metorial portal, and each person signs in to Bitquery with their own account. Agents can query real-time and historical blockchain data across 40+ networks including Ethereum, Bitcoin, Solana, and Polygon using a unified GraphQL API. The integration has 8 tools, all read-only, plus 3 triggers.

**What you will learn**

- How an admin shares Bitquery in a portal and how each person connects
- The 1 OAuth scope Bitquery can request, and what each one allows
- How to check the connection with `metorial call`

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with Bitquery for each person who connects
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in methods

| Method | Type | What a person provides |
| --- | --- | --- |
| **OAuth2 Client Credentials (V2)** (default) | OAuth | Signs in to Bitquery |
| **API Key (V1)** | API token | `apiKey` |
| **Bearer Token (V2)** | API token | `bearerToken` |

The portal and `metorial setup` use **OAuth2 Client Credentials (V2)** unless someone picks another method.

### OAuth2 Client Credentials (V2)

People sign in to Bitquery and approve the scopes you allow. The integration can request:

| Scope | Name | What it allows |
| --- | --- | --- |
| `api` | API Access | Full access to Bitquery streaming API |

### API Key (V1)

To connect, a person enters:

- `apiKey`: Your Bitquery V1 API key from the account dashboard

### Bearer Token (V2)

To connect, a person enters:

- `bearerToken`: Your Bitquery V2 OAuth Bearer token (starts with ory_...)

### Setup settings

Whichever method you pick, setup also asks for:

- `apiVersion` (optional): Bitquery API version to use. V1 uses graphql.bitquery.io, V2 uses streaming.bitquery.io/graphql. One of "v1", "v2".

## Use your own Bitquery OAuth app

With your own OAuth app, people see your company's name on the Bitquery consent screen, and the client ID and secret belong to you.

1. **Start the credentials in Metorial**

   In the dashboard, select **Settings**, then **Organization Settings**. Under **Integrations and MCP**, select **Provider Auth**, then **Create Auth Credentials**. Choose Bitquery and copy the **Redirect URI**.

2. **Register the app with Bitquery**

   Create an OAuth app or client in Bitquery and add the redirect URI from Metorial as its redirect or callback URL.

3. **Finish in Metorial**

   Copy the app's client ID and client secret. Back in Metorial, enter a **Name**, the **Client ID** and the **Client Secret**, review **Scopes**, and select **Create**. Then pick these credentials for the Bitquery integration.

## Admin: share Bitquery in a portal

### In the dashboard

1. **Open Shared Resources**

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

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Bitquery. Under **Auth Method**, keep **OAuth2 Client Credentials (V2)** or pick another. For how members connect, choose **Each person connects**, so everyone signs in to Bitquery as themselves.

3. **Choose who gets it**

   Add the access groups that should see Bitquery. 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 Bitquery integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search bitquery
```

## Employee: connect Bitquery

### In the portal

1. **Open Bitquery in the catalog**

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

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. A Bitquery sign-in tab opens. Sign in and approve the permissions listed.

3. **Confirm**

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

### With the CLI

```bash
metorial catalog search bitquery
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **OAuth2 Client Credentials (V2)**. To connect with **API Key (V1)** instead, find its ID with `metorial catalog get <catalog-item-id>` and add `--auth-method <auth-method-id>`.

### Add it to your AI client

`metorial install` adds your Bitquery 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.

```bash
metorial list bitquery
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

Every Bitquery tool only reads, so the connection is read-only as it is.

## Check it worked

```bash
metorial list bitquery
metorial tools <integration-id>
metorial call <integration-id> get_dex_trades -d '{"blockchain":"eth"}'
```

`metorial tools` lists the 8 tools, minus any you rejected. `get_dex_trades` needs `blockchain`, so replace the placeholders. It retrieves decentralized exchange (DEX) trade data from EVM blockchains or Solana.

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

## Tools

### Read-only tools (8)

- `get_token_transfers`: Retrieve token transfer data from EVM blockchains or Solana. Needs `blockchain`.
- `get_dex_trades`: Retrieve decentralized exchange (DEX) trade data from EVM blockchains or Solana. Needs `blockchain`.
- `get_token_holders`: Retrieve the top holders of a specific token on EVM blockchains or Solana. Needs `blockchain` and `tokenAddress`.
- `get_transactions`: Retrieve blockchain transactions from EVM chains or Solana. Needs `blockchain`.
- `get_smart_contract_events`: Retrieve decoded smart contract event logs from EVM blockchains. Needs `blockchain` and `contractAddress`.
- `get_token_balance`: Retrieve token balances for a wallet address on EVM blockchains or Solana. Needs `blockchain` and `walletAddress`.
- `get_token_price`: Retrieve token price and OHLC (Open, High, Low, Close) candle data from DEX trades. Needs `blockchain`, `baseCurrency`, `quoteCurrency`, `since` and `till`.
- `execute_query`: Execute a custom GraphQL query against the Bitquery API. Needs `query`.

## Triggers

Bitquery has 3 triggers, which fire on events in Bitquery:

- `inbound_webhook`
- `new_dex_trades`: Triggers when new DEX trades are detected on a specified blockchain.
- `new_token_transfers`: Triggers when new token transfers are detected on a specified blockchain.

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Bitquery there
- [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the Provider Auth screens in more detail
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Bitquery on metorial.com](https://metorial.com/integrations/bitquery): the integration overview