X API v2
Official X API v2 post-management profile. Create a developer project and app, use OAuth 2.0 user-context authorization for write operations, request tweet.read/tweet.write/users.read scopes, and send the access token as Authorization: Bearer TOKEN. X documents post creation, lookup, search, and deletion; it does not expose a general edit endpoint for existing posts, so no unsupported update operation is included.
Connect this API to an AI agent Browse all specs
What you can do with X API v2 via MCP
Every endpoint below becomes a governed tool your AI agent (Claude, ChatGPT, or a customer-facing VX agent) can call — with scoped permissions, sandbox testing, and audit logs.
| Method | Path | Operation | Description |
|---|---|---|---|
| GET | /tweets/{tweet-id} |
get_x_post | Read a post Method: GET Path: /tweets/{tweet-id} IMPORTANT: This function has 1 REQUIRED parameter(s) and 1 OPTIONAL parameter(s) REQUIRED parameters MUST be provided OPTIONAL parameters can be omitted if not needed Parameters: Path Parameters: REQUIRED: - tweet-id: X post ID Query Parameters: OPTIONAL: - tweet.fields: Comma-separated post fields |
| DELETE | /tweets/{tweet-id} |
delete_x_post | Delete a post Method: DELETE Path: /tweets/{tweet-id} IMPORTANT: This function has 1 REQUIRED parameter(s) and 0 OPTIONAL parameter(s) REQUIRED parameters MUST be provided OPTIONAL parameters can be omitted if not needed Parameters: Path Parameters: REQUIRED: - tweet-id: X post ID |
| POST | /tweets |
create_x_post | Create a post Method: POST Path: /tweets IMPORTANT: This function has 1 REQUIRED parameter(s) and 2 OPTIONAL parameter(s) REQUIRED parameters MUST be provided OPTIONAL parameters can be omitted if not needed Parameters: Request Body: REQUIRED: - text: Text content. OPTIONAL: - reply: reply parameter from application/json - media: media parameter from application/json |
| GET | /users/{user-id}/tweets |
list_x_user_posts | List user posts Method: GET Path: /users/{user-id}/tweets IMPORTANT: This function has 1 REQUIRED parameter(s) and 1 OPTIONAL parameter(s) REQUIRED parameters MUST be provided OPTIONAL parameters can be omitted if not needed Parameters: Path Parameters: REQUIRED: - user-id: X user ID Query Parameters: OPTIONAL: - max_results: Number of posts to return |
| GET | /tweets/search/recent |
search_x_recent_posts | Search recent posts Method: GET Path: /tweets/search/recent IMPORTANT: This function has 1 REQUIRED parameter(s) and 1 OPTIONAL parameter(s) REQUIRED parameters MUST be provided OPTIONAL parameters can be omitted if not needed Parameters: Query Parameters: REQUIRED: - query: X search query OPTIONAL: - max_results: Number of results |
Usage guide
## Authentication Official X API v2 post-management profile. Create a developer project and app, use OAuth 2.0 user-context authorization for write operations, request tweet.read/tweet.write/users.read scopes, and send the access token as Authorization: Bearer TOKEN. X documents post creation, lookup, search, and deletion; it does not expose a general edit endpoint for existing posts, so no unsupported update operation is included. ## Endpoint coverage This listing contains 4 documented path(s) and 5 operation(s). Review each operation's required OAuth scope or token type before use. ## Official documentation [X developer documentation](https://docs.x.com/x-api/posts/manage-tweets/introduction)
How to use this spec
- Create a free VX Agents account (sandbox tools included).
- Open the marketplace and connect “X API v2” to an agent.
- Expose it as an MCP server for Claude/ChatGPT, or chat with it directly.