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. While 'Create' implies a write/mutation operation, the description doesn't address important behavioral aspects like whether this requires authentication, what happens if the thread exceeds platform limits, whether drafts are saved automatically, or what the expected response format is. The description provides minimal behavioral context beyond the basic action.

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 at just three words ('Create a draft tweet thread'), making it front-loaded and efficient. Every word contributes meaning, with zero wasted text or unnecessary elaboration. This is an excellent example of minimal yet complete phrasing for the core purpose.

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 mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens after creation (e.g., does it return a draft ID?), what validation occurs on the contents, whether there are length/format constraints, or how this interacts with other draft management tools. The description provides only the most basic functional information without necessary operational context.

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 description doesn't provide any parameter information beyond what's already in the schema (which has 100% coverage). The schema clearly documents that 'contents' is a required array of strings for tweet contents. Since schema coverage is complete, the baseline score of 3 is appropriate - the description adds no additional parameter semantics but doesn't need to compensate for schema gaps.

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 ('Create') and resource ('draft tweet thread'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from its sibling 'create_draft_tweet' - both involve creating draft content, though 'thread' implies multiple tweets versus a single tweet.

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 about when to use this tool versus alternatives like 'create_draft_tweet' (for single tweets) or 'publish_draft' (for finalizing drafts). The description simply states what the tool does without any context about appropriate usage scenarios or prerequisites.

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. It states this creates a draft but doesn't mention whether this requires authentication, what happens on success/failure, if drafts are saved persistently, or any rate limits. The description is minimal and lacks essential behavioral context for a creation tool.

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 at just three words, with zero wasted language. It's front-loaded with the essential action and resource, making it efficient 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?

For a creation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after creation, what the draft object contains, how to reference it later, or any error conditions. The minimal description leaves too many questions unanswered.

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 input schema has 100% description coverage, with the 'content' parameter clearly documented in the schema. The description doesn't add any additional parameter information beyond what's already in the schema, so it meets the baseline score of 3 when schema coverage is high.

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 distinguish this tool from its sibling 'create_draft_thread' which creates a different type of draft. The purpose is understandable but lacks sibling differentiation.

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 'create_draft_thread' for threads or 'publish_draft' to publish existing drafts. There's no mention of prerequisites, constraints, or typical use cases.

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 tool deletes drafts, implying a destructive mutation, but lacks details on permissions required, whether deletion is permanent or reversible, error conditions, or rate limits. This is a significant gap for a destructive operation.

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 with zero wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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 destructive tool with no annotations and no output schema, the description is incomplete. It lacks critical context like behavioral traits (e.g., permanence, permissions), error handling, or output expectations, leaving significant gaps for an agent to understand the tool's full implications.

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 input schema has 100% description coverage, with the single parameter 'draft_id' documented as 'ID of the draft to delete'. The description adds no additional meaning beyond this, such as format examples or sourcing guidance. Given the high schema coverage, a baseline score of 3 is appropriate.

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 target resource ('a draft tweet or thread'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'list_drafts' or 'publish_draft', but the verb 'Delete' inherently distinguishes it from those operations.

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, or relationships with sibling tools like 'publish_draft' (which might be an alternative for handling drafts).

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.2/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 what the tool does but doesn't describe behavioral traits such as whether it returns all drafts at once, supports pagination, requires authentication, or has rate limits. This is inadequate for a 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 front-loads the core purpose without any wasted words. It's appropriately sized for a simple list operation with no parameters, making it easy for an agent to parse quickly.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on behavior, output format, or integration with siblings, leaving gaps that could hinder effective use by an agent.

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 the schema fully documents the absence of inputs. The description doesn't need to add parameter semantics, and it correctly implies no filtering or options are available, earning a baseline score of 4 for this context.

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 ('List') and resource ('all draft tweets and threads'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'delete_draft' or 'publish_draft' beyond the obvious list vs. action distinction, 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. It doesn't mention prerequisites, context for listing drafts, or how it relates to sibling tools like 'create_draft_tweet' or 'publish_draft', leaving the agent to infer usage.

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 tool publishes a draft, implying a write/mutation operation, but lacks critical details: it doesn't specify if this is irreversible, what permissions are required, whether it triggers notifications, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is a significant gap.

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 wasted words. It is front-loaded with the core action ('publish') and resource, making it immediately scannable and easy to understand. Every word earns its place.

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 with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like side effects, error conditions, or return values. While concise, it fails to provide the necessary context for safe and effective use by an AI agent.

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 input schema has 100% description coverage, with the single parameter 'draft_id' clearly documented. The description adds no additional parameter semantics beyond what the schema provides (e.g., it doesn't explain format or sourcing of the ID). With high schema coverage, the baseline score of 3 is appropriate as 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 resource ('draft tweet or thread'), making the purpose immediately understandable. It distinguishes from siblings like 'create_draft_thread' and 'delete_draft' by focusing on publishing rather than creation or deletion. However, it doesn't explicitly differentiate from all siblings (e.g., 'list_drafts' is clearly different).

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 a draft created first), conditions for use, or comparisons to sibling tools like 'create_draft_thread' or 'delete_draft'. The agent must infer usage from context alone.

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

TDQS

B3.4/5.0
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

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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
    348
    401
    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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vidhupv/x-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server