X
Connect the hosted X MCP server for read-only public-data access using an app-only Bearer Token.
Before you begin, obtain:
- An X account that can enroll in the X Developer Platform and accept the Developer Agreement and Policy.
- Authority to create an X developer app.
- Organization-approved wording for the app name, description, and API use case.
- Access to your organization’s password manager or secure vault.
- API credits available through the billing and credits area of the Developer Console. X API usage is pay-per-usage and is charged through the developer account that owns the app. API requests are blocked when the credit balance is zero or negative.
This setup provides read-only access to public data. It cannot act as a user or perform writes.
Enroll in the X Developer Platform
- Go to console.x.com.
- Sign in with the X account that will own the developer app.
- If prompted, review the Developer Agreement and Policy.
- If prompted, accept the Developer Agreement and Policy.
- Provide the requested information about how your organization will use the API. Obtain the wording from the application or cloud security owner if needed.
- Complete the remaining enrollment steps shown in the console.
Successful enrollment opens the Developer Console dashboard. Confirm that New App is visible.
Create an X app
- On the Developer Console dashboard, select New App.
- Enter the organization-approved app name, description, and use case.
Before you submit the form, open your organization’s password manager or secure vault. X displays generated credentials once.
- Submit the form using the create control shown in the console.
X creates the app and displays its credentials, including the Bearer Token.
Copy the Bearer Token
Copy Bearer Token from the generated credential view into your organization’s password manager or secure vault before leaving the page.
If you closed the credential view before saving the token:
- Reopen the app from the Developer Console dashboard.
- Open Keys and tokens.
Regenerate replaces the existing Bearer Token. Have your organization’s password manager or secure vault ready before continuing.
- Select Regenerate for the Bearer Token.
- Save the newly displayed token before leaving the view.
Add the server in Speakeasy
- In the Speakeasy AI Control Plane sidebar, under MCP Gateway, select MCP.
- Click Add new to open Add MCP server.
- Choose From the catalog.
- On the MCP Catalog page, enter
Xin Search MCP servers…. - Open the X catalog entry and click Add. This opens the Add to Project dialog.
- Under Identity, select Service Account.
- Select Bearer.
- In Token, paste the Bearer Token you saved. Paste the token only, without
Bearerin front of it. Speakeasy adds the prefix and sends the value as theAuthorizationheader. - Click Add to Project.
- If the dialog shows a Guardrails step, finish it or click Skip for now.
- After Server added successfully, click Configure MCP settings to open the server.
Connect your credentials
The Bearer Token you entered in the Add to Project dialog is already the server’s credential. To confirm it, or to add it to an X server created without it:
- Open the server’s Settings and find the Identity section.
- Select Service Account.
- Under Service Account credential, select Bearer.
- In Token, paste the Bearer Token, without
Bearerin front of it. - Click Save.
Do not add the token under Custom Headers.
This guide covers setup only. For anything beyond it — billing, tool behavior, limits — see X’s MCP documentation.