twitter_refresh_tokenLABSCO SUMMARY
Built for a server you do not want holding tokens.
Most Twitter servers read credentials from the environment, which means the machine running them is a place tokens live. Here the client completes OAuth and passes tokens down with each call, so the same container can serve different accounts and a compromise of the host yields nothing. The trade-off is that the calling side has to manage refresh, which is what the refresh tool exists for.
What it is
A Twitter server designed to hold no credentials of its own. Every call carries the tokens it needs as arguments, so the process can run headless in a container with no browser, no local files and nothing to leak if the host is shared.
What you get
- Search tweets by
query, withmax_resultsto bound the response - Recent tweets by a given
user_id, and recent replies by that user - Post a new tweet from
text - Reply to an existing tweet by
tweet_id twitter_refresh_tokenexchanges a refresh token for a new access token and its expiry- Refreshing works with just the refresh token, client ID and client secret once the access token has expired
Requirements
Python 3.10 or higher, or the published Docker image. Twitter API credentials from the Twitter Developer Portal — client ID, client secret, access token and refresh token — obtained by completing the OAuth flow yourself. Those values are passed as tool arguments rather than environment variables, which is the whole point of the design: the client keeps the credentials, the server never stores them.
Setup effort
One command plus credentials — docker run -i --rm buryhuang/mcp-twitter-noauth:latest, then supply credentials
USE CASES
Watching what is being said about a topic
Search with a query and a result limit, then read the tweets and their authors.
Posting from an assistant
Publish a tweet, or reply into an existing thread by its ID.
Running one container for several accounts
Keep tokens on the client side and pass them per call rather than baking one account into the environment.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation. The README describes searching tweets, reading a user's tweets and replies, posting and replying, but names only twitter_refresh_token.
Requires
- docker on PATH
- Python 3.10 or later
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
docker run -i --rm buryhuang/mcp-twitter-noauth:latestMCP Clients
Claude Desktop
{
"mcpServers": {
"twitter": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"buryhuang/mcp-twitter-noauth:latest"
]
}
}
}