Set up Twitter in Metorial for Claude, ChatGPT and Cursor
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'll 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 with at least one access group
- An account with Twitter for each person who connects
- For the CLI steps: the Metorial 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.
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.
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.
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
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 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.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Twitter.
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:
Employee: connect Twitter
In the portal
Open Twitter in the catalog
Sign in to your portal and open Twitter. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. A Twitter sign-in tab opens. Sign in and approve the permissions listed.
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. 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.
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.
Check it worked
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. NeedsuserIdandtimelineType.get_post: Retrieve one or more posts by their IDs. NeedspostIds.get_user: Look up Twitter/X user profiles.search_posts: Search for recent posts on Twitter/X using a query. Needsquery.
Write tools (10)
send_direct_message: Send a direct message to a user or into an existing conversation. Needstext.manage_like: Like or unlike a post, retrieve a user's liked posts, or get users who liked a specific post. Needsaction.manage_reply_visibility: Hide or unhide a reply to one of your posts. NeedspostIdandhidden.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. Needstext.manage_retweet: Retweet or undo a retweet of a post, or retrieve users who retweeted a specific post. NeedsactionandpostId.manage_list: Create, update, delete Twitter/X lists, manage list members, or retrieve list details, members, and posts. Needsaction.manage_bookmark: Add, remove, or list bookmarked posts for the authenticated user. NeedsactionanduserId.manage_block_mute: Block, unblock, mute, or unmute a user, or list blocked/muted users. NeedsactionanduserId.manage_follow: Follow or unfollow a user, or retrieve a user's followers or following list. NeedsactionanduserId.
Destructive tools (2)
delete_direct_message: Delete a direct message event for the authenticated user. NeedseventId.delete_post: Delete an existing post (tweet) on Twitter/X. NeedspostId.
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_webhooknew_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, Cursor, Codex and ChatGPT: connect each client to your portal and use Twitter there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Twitter on metorial.com: the integration overview