All integrations
Get an API key
X (Twitter)
Post, read and search on X.
Social
How an agent reaches it
MCPREST APICLI
How you authenticate
OAuth
API key
- Create a project and app in the X developer portal.
- Meaningful write access needs a paid tier. The free tier is post-only with a very low cap.
- Copy either an OAuth 2.0 client id and secret for user context, or a bearer token for app-only reads.
Connection details
- Base URL
- https://api.x.com/2
- Pagination
- cursor
- Rate limit
- Tier-dependent and low. Free is roughly 500 posts/month.
Common endpoints
| who am I | GET /users/me |
| post | POST /tweets |
| read a user timeline | GET /users/{id}/tweets |
| search recent | GET /tweets/search/recent?query={q} |
Worth knowing
- Access is paid for anything beyond trivial posting; the free tier will 403 most reads.
- Some endpoints still require OAuth 1.0a signing, which the generic HTTP lane cannot do. Use the CLI lane or an aggregator for those.
- Fields are opt-in: without `tweet.fields` you get only id and text.