delete_tweet
Delete a tweet by its ID
Post to X with media or as a reply, search tweets, and delete one by its ID.
LABSCO SUMMARY
Post, search and delete is the whole surface — no timeline read, no direct messages, no likes or follows — so it fits an agent that writes to X rather than one that monitors it. Replies go through the same posting tool by passing the tweet being answered, which means a search result can be replied to on the next call.
A small X client: post, search and delete, acting as the account whose API credentials it holds.
X API credentials for the posting account in four environment variables: API_KEY, API_SECRET_KEY, ACCESS_TOKEN and ACCESS_TOKEN_SECRET.
One command plus a key — npx -y @mbelinky/x-mcp-server, then supply credentials
USE CASES
Search for the post you want to answer, then publish the reply against its ID, with media attached if the answer needs it.
Find the post to get its ID, then delete it.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
delete_tweetDelete a tweet by its ID
post_tweetPost a new tweet to X with optional media attachments
search_tweetsSearch for tweets on X
BEFORE YOU INSTALL
3 tools when we connected. delete_tweet relies on a v1.1 fallback that only OAuth 1.0a can use, and the v2 delete endpoint currently returns 500 errors. Base64 images do not work from Claude.
CONTEXT COST
Rated by the size of the 3 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y @mbelinky/x-mcp-server{
"mcpServers": {
"twitter-mcp": {
"command": "npx",
"args": [
"-y",
"@mbelinky/x-mcp-server"
],
"env": {
"API_KEY": "<YOUR_API_KEY>",
"API_SECRET_KEY": "<YOUR_API_SECRET_KEY>",
"ACCESS_TOKEN": "<YOUR_ACCESS_TOKEN>",
"ACCESS_TOKEN_SECRET": "<YOUR_ACCESS_TOKEN_SECRET>"
}
}
}
}Windows %APPDATA%\Claude\claude_desktop_config.json · macOS ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"twitter-mcp": {
"command": "npx",
"args": [
"-y",
"@mbelinky/x-mcp-server"
],
"env": {
"AUTH_TYPE": "oauth2",
"OAUTH2_CLIENT_ID": "<YOUR_OAUTH2_CLIENT_ID>",
"OAUTH2_CLIENT_SECRET": "<YOUR_OAUTH2_CLIENT_SECRET>",
"OAUTH2_ACCESS_TOKEN": "<YOUR_OAUTH2_ACCESS_TOKEN>",
"OAUTH2_REFRESH_TOKEN": "<YOUR_OAUTH2_REFRESH_TOKEN>"
}
}
}
}claude mcp add twitter-mcp --scope user \
--env "API_KEY=<YOUR_API_KEY>" \
--env "API_SECRET_KEY=<YOUR_API_SECRET_KEY>" \
--env "ACCESS_TOKEN=<YOUR_ACCESS_TOKEN>" \
--env "ACCESS_TOKEN_SECRET=<YOUR_ACCESS_TOKEN_SECRET>" \
-- npx -y @mbelinky/x-mcp-serverclaude mcp add twitter-mcp --scope user \
--env "AUTH_TYPE=oauth2" \
--env "OAUTH2_CLIENT_ID=<YOUR_OAUTH2_CLIENT_ID>" \
--env "OAUTH2_CLIENT_SECRET=<YOUR_OAUTH2_CLIENT_SECRET>" \
--env "OAUTH2_ACCESS_TOKEN=<YOUR_OAUTH2_ACCESS_TOKEN>" \
--env "OAUTH2_REFRESH_TOKEN=<YOUR_OAUTH2_REFRESH_TOKEN>" \
-- npx -y @mbelinky/x-mcp-server