Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"x": {
"env": {
"TWITTER_API_KEY": "your-api-key",
"TWITTER_API_SECRET": "your-api-secret",
"TWITTER_ACCESS_TOKEN": "your-access-token",
"TWITTER_ACCESS_SECRET": "your-access-secret",
"TWITTER_OAUTH2_ACCESS_TOKEN": "your-oauth2-token"
},
"args": [
"C:/path/to/x-mcp-server/build/index.js"
],
"command": "node"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol (MCP) server for X (Twitter) integration. Provides 16 tools for reading timelines, posting, searching, engagement (likes, retweets, bookmarks), and user lookup. Designed for use with Claude desktop and other MCP-compatible clients.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y 'npm' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
Packing does not respect root-level ignore files in workspaces
### Impact `npm pack` ignores root-level `.gitignore` & `.npmignore` file exclusion directives when run in a workspace or with a workspace flag (ie. `--workspaces`, `--workspace=<name>`). Anyone who has run `npm pack` or `npm publish` with workspaces, as of [v7.9.0](https://github.com/npm/cli/releases/tag/v7.9.0) & [v7.13.0](https://github.com/npm/cli/releases/tag/v7.13.0) respectively, may be affected and have published files into the npm registry they did not intend to include. ### Patch - Up
Incorrect Permission Assignment for Critical Resource in NPM
An issue was discovered in an npm 5.7.0 2018-02-21 pre-release (marked as "next: 5.7.0" and therefore automatically installed by an "npm upgrade -g npm" command, and also announced in the vendor's blog without mention of pre-release status). It might allow local users to bypass intended filesystem access restrictions because ownerships of /etc and /usr directories are being changed unexpectedly, related to a "correctMkdir" issue.
Local Privilege Escalation in npm
Affected versions of `npm` use predictable temporary file names during archive unpacking. If an attacker can create a symbolic link at the location of one of these temporary file names, the attacker can arbitrarily write to any file that the user which owns the `npm` process has permission to write to, potentially resulting in local privilege escalation. ## Recommendation Update to version 1.3.3 or later.
npm CLI exposing sensitive information through logs
Versions of the npm CLI prior to 6.14.6 are vulnerable to an information exposure vulnerability through log files. The CLI supports URLs like `<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>`. The password value is not redacted and is printed to stdout and also to any generated log files.
npm Vulnerable to Global node_modules Binary Overwrite
Versions of the npm CLI prior to 6.13.4 are vulnerable to a Global node_modules Binary Overwrite. It fails to prevent existing globally-installed binaries to be overwritten by other package installations. For example, if a package was installed globally and created a `serve` binary, any subsequent installs of packages that also create a `serve` binary would overwrite the first binary. This will not overwrite system binaries but only binaries put into the global node_modules directory. This b
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in communication
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
An MCP server that securely interfaces with your iMessage database via the Model Context Protocol (MCP), allowing LLMs to query and analyze iMessage conversations. It includes robust phone number validation, attachment processing, contact management, group chat handling, and full support for sending and receiving messages.
Email & SMS infrastructure for AI agents — send and receive real email and text messages programmatically
A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API
MCP Security Weekly
Get CVE alerts and security updates for X Mcp Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol (MCP) server for X (Twitter) integration. Provides 16 tools for reading timelines, posting, searching, engagement (likes, retweets, bookmarks), and user lookup. Designed for use with Claude desktop and other MCP-compatible clients.
| Tier | Cost | Post Reads | Post Writes | Notes |
|---|---|---|---|---|
| Free | $0 | ~100/month | ~500/month | No likes/follows; media upload requires OAuth 2.0 |
| Basic | $200/month | 10,000/month | 3,000/month | Search, limited read access |
| Pro | $5,000/month | 1,000,000/month | 300,000/month | Full search, filtered stream |
| Pay-Per-Use | Credit-based | ~$0.005/read | Varies | Launched Feb 2026, 2M reads cap |
Like and Follow endpoints were removed from the Free tier in August 2025. Follows/Blocks endpoints are Enterprise-only as of 2025.
git clone https://github.com/DataWhisker/x-mcp-server.git
cd x-mcp-server
npm install
npm run build
The server supports two authentication methods. You need at least one configured.
Works for all post/engagement/search/user operations.
| Environment Variable | Description |
|---|---|
TWITTER_API_KEY | Consumer Key (API Key) |
TWITTER_API_SECRET | Consumer Secret (API Key Secret) |
TWITTER_ACCESS_TOKEN | User Access Token |
TWITTER_ACCESS_SECRET | User Access Token Secret |
Setup: In the X Developer Portal:
The v1.1 media upload endpoint was sunset in June 2025. Media upload now requires OAuth 2.0 via the v2 upload API.
Option A — Direct access token:
| Variable | Description |
|---|---|
TWITTER_OAUTH2_ACCESS_TOKEN | OAuth 2.0 user access token (expires in 2 hours) |
Option B — Auto-refresh (recommended for long-running servers):
| Variable | Description |
|---|---|
TWITTER_CLIENT_ID | OAuth 2.0 Client ID |
TWITTER_CLIENT_SECRET | OAuth 2.0 Client Secret (optional for public clients) |
TWITTER_OAUTH2_REFRESH_TOKEN | OAuth 2.0 Refresh Token |
Tokens are auto-refreshed and persisted to ~/.x-mcp-tokens.json.
Setup: In the X Developer Portal:
tweet.read, tweet.write, users.read, media.write, offline.access, like.read, like.write, bookmark.read, bookmark.writeAdd to %APPDATA%/Claude/claude_desktop_config.json:
{
"mcpServers": {
"x": {
"command": "node",
"args": ["C:/path/t
... [View full README on GitHub](https://github.com/DataWhisker/x-mcp-server#readme)