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

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

Share Twitter with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or bearer token sign-in, 17 tools (5 read-only).

---

To give your team Twitter in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Twitter integration in a Metorial portal, and each person signs in to Twitter with their own account. Agents can create, read, delete, and search posts (tweets) on Twitter/X. The integration has 17 tools, 5 read-only, 10 write and 2 destructive, plus 5 triggers.

**What you will learn**

- How an admin shares Twitter in a portal and how each person connects
- The 22 OAuth scopes Twitter can request, and what each one allows
- How to keep the 5 read-only tools and reject the other 12

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with Twitter 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 |
| --- | --- | --- |
| **Bearer Token** | API token | `token` |
| **OAuth 2.0** (default) | OAuth | Signs in to Twitter |

The portal and `metorial setup` use **OAuth 2.0** unless someone picks another method.

### Bearer Token

To connect, a person enters:

- `token`: App-only Bearer Token from the Twitter Developer Portal

### OAuth 2.0

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

| Scope | Name | What it allows |
| --- | --- | --- |
| `tweet.read` | Read Posts | Read posts and timelines |
| `tweet.write` | Write Posts | Create and delete posts |
| `tweet.moderate.write` | Moderate Posts | Hide and unhide replies |
| `users.read` | Read Users | Read user profile information |
| `users.email` | Read Email | Read user email address |
| `follows.read` | Read Follows | Read follow relationships |
| `follows.write` | Write Follows | Follow and unfollow users |
| `like.read` | Read Likes | Read liked posts |
| `like.write` | Write Likes | Like and unlike posts |
| `dm.read` | Read DMs | Read direct messages |
| `dm.write` | Write DMs | Send direct messages |
| `list.read` | Read Lists | Read lists |
| `list.write` | Write Lists | Create and manage lists |
| `media.write` | Upload Media | Upload images, videos, and GIFs |
| `offline.access` | Offline Access | Obtain a refresh token for long-lived access |
| `space.read` | Read Spaces | Read Spaces information |
| `bookmark.read` | Read Bookmarks | Read bookmarked posts |
| `bookmark.write` | Write Bookmarks | Manage bookmarks |
| `block.read` | Read Blocks | Read blocked users |
| `block.write` | Write Blocks | Block and unblock users |
| `mute.read` | Read Mutes | Read muted users |
| `mute.write` | Write Mutes | Mute and unmute users |

## Use your own Twitter OAuth app

With your own OAuth app, people see your company's name on the Twitter 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 Twitter and copy the **Redirect URI**.

2. **Register the app with Twitter**

   Create an OAuth app or client in Twitter and add the redirect URI from Metorial as its redirect or callback URL. The vendor documents this in [OAuth documentation](https://docs.x.com/resources/fundamentals/authentication/oauth-2-0/authorization-code).

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 Twitter integration.

## Admin: share Twitter 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 Twitter. Under **Auth Method**, keep **OAuth 2.0** or pick another. For how members connect, choose **Each person connects**, so everyone signs in to Twitter as themselves.

3. **Limit the tools**

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

4. **Choose who gets it**

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

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

## Employee: connect Twitter

### In the portal

1. **Open Twitter in the catalog**

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

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. A Twitter 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 twitter
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **OAuth 2.0**. To connect with **Bearer Token** 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 Twitter 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 twitter
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 5 read-only tools, such as `get_post` and `get_user`, and lose the 10 write tools, such as `create_post` or `manage_like`, and the 2 destructive tools, such as `delete_post` or `delete_direct_message`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list twitter
metorial tools <integration-id>
metorial call <integration-id> get_user -d '{}'
```

`metorial tools` lists the 17 tools, minus any you rejected. `get_user` takes no input. It looks up Twitter/X user profiles.

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

## Tools

### Read-only tools (5)

- `get_direct_messages`: Retrieve direct message events.
- `get_timeline`: Retrieve a user's timeline, mentions, or home timeline. Needs `userId` and `timelineType`.
- `get_post`: Retrieve one or more posts by their IDs. Needs `postIds`.
- `get_user`: Look up Twitter/X user profiles.
- `search_posts`: Search for recent posts on Twitter/X using a query. Needs `query`.

### Write tools (10)

- `send_direct_message`: Send a direct message to a user or into an existing conversation. Needs `text`.
- `manage_like`: Like or unlike a post, retrieve a user's liked posts, or get users who liked a specific post. Needs `action`.
- `manage_reply_visibility`: Hide or unhide a reply to one of your posts. Needs `postId` and `hidden`.
- `upload_media`: Upload image or subtitle media to X for use in posts and direct messages, or check processing status for an uploaded media item.
- `create_post`: Create a new post (tweet) on Twitter/X. Needs `text`.
- `manage_retweet`: Retweet or undo a retweet of a post, or retrieve users who retweeted a specific post. Needs `action` and `postId`.
- `manage_list`: Create, update, delete Twitter/X lists, manage list members, or retrieve list details, members, and posts. Needs `action`.
- `manage_bookmark`: Add, remove, or list bookmarked posts for the authenticated user. Needs `action` and `userId`.
- `manage_block_mute`: Block, unblock, mute, or unmute a user, or list blocked/muted users. Needs `action` and `userId`.
- `manage_follow`: Follow or unfollow a user, or retrieve a user's followers or following list. Needs `action` and `userId`.

### Destructive tools (2)

- `delete_direct_message`: Delete a direct message event for the authenticated user. Needs `eventId`.
- `delete_post`: Delete an existing post (tweet) on Twitter/X. Needs `postId`.

## Triggers

Twitter has 5 triggers, which fire on events in Twitter:

- `new_direct_message`: Triggers when the authenticated user receives a new direct message.
- `inbound_webhook`
- `new_post_from_search`: Triggers when a new post matches a search query.
- `new_follower`: Triggers when a new user follows the authenticated user.
- `new_mention`: Triggers when the authenticated user is mentioned in a post.

## 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 Twitter 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
- [Twitter on metorial.com](https://metorial.com/integrations/twitter): the integration overview