Skip to main content
Glama
vidhupv

X(Twitter) MCP Server

by vidhupv

X(Twitter) MCP server

An MCP server to create, manage and publish X/Twitter posts directly through Claude chat.

Quick Setup

Installing via Smithery

To install X(Twitter) MCP Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install x-mcp --client claude

Manual Installation

  1. Clone the repository:

git clone https://github.com/yourusername/x-mcp.git
  1. Install UV globally using Homebrew in Terminal:

brew install uv
  1. Create claude_desktop_config.json:

    • For MacOS: Open directory ~/Library/Application Support/Claude/ and create the file inside it

    • For Windows: Open directory %APPDATA%/Claude/ and create the file inside it

  2. Add this configuration to claude_desktop_config.json:

{
  "mcpServers": {
    "x_mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/x-mcp",
        "run",
        "x-mcp"
      ],
      "env": {
        "TWITTER_API_KEY": "your_api_key",
        "TWITTER_API_SECRET": "your_api_secret",
        "TWITTER_ACCESS_TOKEN": "your_access_token",
        "TWITTER_ACCESS_TOKEN_SECRET": "your_access_token_secret"
      }
    }
  }
}
  1. Get your X/Twitter API credentials:

    • Go to X API Developer Portal

    • Create a project

    • In User Authentication Settings: Set up with Read and Write permissions, Web App type

    • Set Callback URL to http://localhost/ and Website URL to http://example.com/

    • Generate and copy all keys and tokens from Keys and Tokens section

  2. Update the config file:

    • Replace /path/to/x-mcp with your actual repository path

    • Add your X/Twitter API credentials

  3. Quit Claude completely and reopen it

Related MCP server: thread-storm

Usage Examples

  • "Tweet 'Just learned how to tweet through AI - mind blown! 🤖✨'"

  • "Create a thread about the history of pizza"

  • "Show me my draft tweets"

  • "Publish this draft!"

  • "Delete that draft"

Troubleshooting

If not working:

  • Make sure UV is installed globally (if not, uninstall with pip uninstall uv and reinstall with brew install uv)

  • Or find UV path with which uv and replace "command": "uv" with the full path

  • Verify all X/Twitter credentials are correct

  • Check if the x-mcp path in config matches your actual repository location

Available Tools

5 tools
create_draft_threadC

Create a draft tweet thread

ParametersJSON Schema
NameRequiredDescriptionDefault
contentsYesAn array of tweet contents for the thread

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Create a draft tweet thread') but does not explain what 'draft' entails (e.g., saved locally vs. on a server), permissions required, or any side effects like rate limits or data persistence, leaving significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with no wasted words, clearly stating the tool's purpose. It is appropriately sized and front-loaded, making it efficient and easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that creates a draft. It does not cover what a 'draft' means in this context, how it interacts with other tools like 'publish_draft', or what the expected outcome is, leaving the agent with insufficient information for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the 'contents' parameter well-documented in the schema as an array of tweet contents. The description does not add any additional meaning or context beyond this, such as formatting rules or constraints, so it meets the baseline for adequate but not enhanced parameter explanation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Create') and resource ('draft tweet thread'), making the purpose evident. However, it does not explicitly differentiate from siblings like 'create_draft_tweet' or 'create_draft_reply', which might involve similar actions but for different tweet types, leaving some ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as 'create_draft_tweet' or 'create_draft_reply'. The description lacks context about prerequisites, exclusions, or specific scenarios for creating a draft thread, offering minimal usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_draft_tweetC

Create a draft tweet

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesThe content of the tweet

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. 'Create a draft tweet' implies a write operation but doesn't specify permissions needed, whether drafts are saved locally or to a service, what happens if content exceeds length limits, or any other behavioral aspects. It's minimally informative about the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words that directly state the tool's purpose. There's zero waste or unnecessary elaboration, making it maximally efficient while still communicating the core function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a write operation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what constitutes a successful creation, whether there are character limits or content restrictions, how the draft is stored or accessed, or what the tool returns. The context demands more information than provided.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100% with one parameter 'content' fully documented as 'The content of the tweet'. The description adds no additional parameter information beyond what the schema provides, so it meets the baseline of 3 for adequate but not additive parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create a draft tweet' clearly states the action (create) and resource (draft tweet), but it doesn't differentiate from sibling tools like create_draft_quote_tweet, create_draft_reply, or create_draft_thread. It's a basic statement of purpose without specifying what makes this tool distinct from other draft creation tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With multiple draft creation tools available (create_draft_quote_tweet, create_draft_reply, create_draft_thread), there's no indication of when this basic draft creation is appropriate versus those specialized alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete_draftC

Delete a draft tweet or thread

ParametersJSON Schema
NameRequiredDescriptionDefault
draft_idYesID of the draft to delete

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the destructive action ('Delete') but lacks critical details: whether deletion is permanent or reversible, if it requires specific permissions, what happens on success/failure, or any rate limits. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It's front-loaded with the core action and resource, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's destructive nature, lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permanence, permissions, or response format, nor does it relate to sibling tools. For a delete operation with such sparse structured data, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'draft_id' clearly documented in the schema. The description adds no additional parameter semantics beyond implying the parameter identifies the draft to delete, so it meets the baseline for high schema coverage without compensating value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and the resource ('a draft tweet or thread'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential sibling operations like 'publish_draft' or 'list_drafts' beyond the obvious verb difference, which keeps it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing draft), exclusions (e.g., not for published tweets), or comparisons to siblings like 'publish_draft' or 'list_drafts', leaving usage context entirely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_draftsB

List all draft tweets and threads

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as whether listing is paginated, if it requires authentication, what format the output returns, or any rate limits. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and avoids any redundant or verbose phrasing, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't address what the output looks like (e.g., list format, fields included), behavioral aspects like pagination, or error conditions. For a tool that likely returns data, this leaves the agent under-informed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description appropriately doesn't mention parameters, earning a baseline score of 4 for not adding unnecessary information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and target resources ('all draft tweets and threads'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'create_draft_tweet' or 'delete_draft' beyond the listing action, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'publish_draft' or 'delete_draft'. It lacks context about prerequisites, timing, or exclusions, leaving the agent with minimal usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

publish_draftC

Publish a draft tweet or thread

ParametersJSON Schema
NameRequiredDescriptionDefault
draft_idYesID of the draft to publish

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Publish') which implies a write/mutation operation, but doesn't disclose any behavioral traits such as whether this is destructive (e.g., does publishing remove the draft?), what permissions are required, error conditions, or what happens after publishing. This leaves significant gaps for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately clear what the tool does without any unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool (publishing implies writing/changing state) with no annotations and no output schema, the description is incomplete. It doesn't explain what happens after publishing, what gets returned, error scenarios, or how this differs from other publishing tools in the sibling list. For a tool that changes system state, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'draft_id' clearly documented in the schema. The description doesn't add any additional semantic context about the parameter beyond what's in the schema (e.g., format examples, where to find draft IDs, or validation rules). This meets the baseline of 3 when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Publish') and the resource ('a draft tweet or thread'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its siblings like 'quote_tweet' or 'reply_to_tweet' which also involve publishing content, leaving some ambiguity about when this specific tool should be used versus those alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'quote_tweet' or 'reply_to_tweet'. It doesn't mention prerequisites (e.g., needing an existing draft), exclusions, or contextual factors that would help an agent choose correctly among the publishing-related tools in the sibling list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv1.0.0
    • First observedcreate_draft_thread
    • First observedcreate_draft_tweet
    • First observeddelete_draft
    • First observedlist_drafts
    • First observedpublish_draft

TDQS

B3.4/5.0

Scored across 5 tools

Disambiguation5/5

Every tool has a clearly distinct purpose with no ambiguity. Tools are clearly separated by action (create, delete, list, publish) and target (draft tweet vs. draft thread where specified), making misselection unlikely.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (e.g., create_draft_thread, list_drafts). The naming is predictable and readable throughout the set, with no deviations in style.

Tool Count5/5

With 5 tools, the count is well-scoped for managing draft tweets and threads. Each tool earns its place, covering essential operations without bloat or thinness for this focused domain.

Completeness4/5

The toolset provides complete CRUD/lifecycle coverage for drafts (create, list, delete, publish), with minor gaps such as the inability to edit or update existing drafts, but agents can work around this by recreating drafts.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    An MCP server that enables Claude to interact with Twitter, allowing for posting tweets and searching Twitter content.
    2
    213
    403
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for publishing threads to Threads and Twitter/X simultaneously from Claude Code. Journal your thoughts, convert them to viral threads, and post everywhere at once.
    13
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    A local MCP server that lets Claude post to social media via upload-post.com — text, photos, and videos across 13 platforms.
    17
    MIT