Skip to main content
Glama
wylu1037
by wylu1037

MCP X Server

What can you do with MCP X Server? Give it a sentence or a topic, and it will help you write and refine a tweet, then publish it to X.

How to run with STDIO

Local

Configure the MCP server in mcp.json.

{
    "mcpServices": {
        "x-mcp": {
            "command": "uv",
            "args": [
                "run",
                "--with",
                "fastmcp",
                "--with",
                "pydantic-ai",
                "--with",
                "pydantic-ai-slim[duckduckgo,openai]",
                "--with",
                "dotenv",
                "--with",
                "python-twitter-v2",
                "fastmcp",
                "run",
                "mcp_x_server/server.py"
            ],
            "env": {
                "CONSUMER_KEY": "*******************",
                "CONSUMER_SECRET": "*******************",
                "ACCESS_TOKEN": "*******************",
                "ACCESS_SECRET": "*******************",
                "DEEPSEEK_API_KEY": "*******************"
            }
        }
    }
}

Docker

Configure the MCP server in mcp.json.

{
    "mcpServices": {
        "x-mcp-docker": {
        "command": "docker",
        "args": [
          "run",
          "-i",
          "--rm",
          "--name",
          "mcp-x-server",
          "-e",
          "CONSUMER_KEY",
          "-e",
          "CONSUMER_SECRET",
          "-e",
          "ACCESS_TOKEN",
          "-e",
          "ACCESS_SECRET",
          "-e",
          "DEEPSEEK_API_KEY",
          "wylu1037/mcp-x-server:latest"
        ],
        "env": {
          "CONSUMER_KEY": "********************************",
          "CONSUMER_SECRET": "********************************",
          "ACCESS_TOKEN": "********************************",
          "ACCESS_SECRET": "********************************",
          "DEEPSEEK_API_KEY": "sk-********************************"
        }
      }
    }
}

UVX

Configure the MCP server in mcp.json.

{
    "mcpServices": {
        "mcp-x-server": {
        "command": "uvx",
        "args": [
          "mcp-x-server"
        ],
        "env": {
          "CONSUMER_KEY": "********************************",
          "CONSUMER_SECRET": "********************************",
          "ACCESS_TOKEN": "********************************",
          "ACCESS_SECRET": "********************************",
          "DEEPSEEK_API_KEY": "sk-********************************"
        }
      }
    }
}

Related MCP server: x-mcp-server

Run with SSE

Run MCP server

fastmcp run --transport sse mcp_x_server/server.py

Configure the MCP server in mcp.json.

{
    "mcpServices": {
        "mcp-x-server": {
            "url": "http://localhost:8000/sse"
        }
    }
}

Publish to PyPI(发布到 Python 包管理中心)

推荐使用 uv 一站式完成构建和发布,本项目已经包含 pyproject.tomluv.lock,适合这种方式。

1. 安装 uv(如尚未安装)

curl -LsSf https://astral.sh/uv/install.sh | sh

或根据官方文档选择适合你平台的安装方式。

2. 更新版本号

pyproject.toml[project] 部分更新 version 字段,避免与已发布版本重复。

你也可以使用 uv 自动修改版本号,例如:

uv version --bump patch

3. 清理旧的构建产物(可选)

rm -rf dist/ build/ *.egg-info

4. 使用 uv 构建发行包

uv build

构建完成后,发行包会生成在 dist/ 目录下(.whl.tar.gz)。

5. 配置 PyPI 凭据

推荐使用 PyPI 的 API Token(而不是用户名/密码),并通过环境变量提供给 uv:

export UV_PUBLISH_TOKEN="pypi-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

6. 使用 uv 发布到 PyPI

uv publish

如需发布到 TestPyPI,可在 pyproject.toml 中配置 [[tool.uv.index]],然后:

uv publish --index testpypi

说明:

  • 传统的 python -m build + twine upload 流程同样可用,只是这里更推荐使用 uv;

  • 本仓库还保留了 python setup.py upload 命令,会自动构建并通过 twine 上传包,同时推送 git tag,一般仅在你明确需要旧流程时使用。

Available Tools

1 tool
create_tweetC

Create a tweet

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes

TDQS

C2.4/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral transparency. 'Create a tweet' implies mutation but offers no details about rate limits, authentication requirements, or any constraints (e.g., character limits), leaving significant behavioral traits undisclosed.

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

Conciseness2/5

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

The description is extremely short (3 words), which is concise but at the expense of essential information. It is under-specified, lacking structure or any front-loading of key details, making it insufficient for effective tool selection.

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 simplicity of the tool (one parameter, no output schema, no annotations), a complete description should at least clarify the nature of the 'text' parameter (e.g., tweet content, character limits). The current description is incomplete, leaving the agent without necessary context to use the tool correctly.

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

Parameters1/5

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

The input schema has 0% description coverage for the 'text' parameter, and the tool description does not add any meaning beyond the schema. The agent has no information about what 'text' should contain (e.g., tweet content, formatting, length constraints), rendering the parameter semantics entirely dependent on inference.

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 'Create a tweet' clearly states the verb and resource, making the tool's purpose immediately understandable. However, it is minimal and does not differentiate from any potential siblings, but since no siblings exist, it is adequate.

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 or any alternatives. There are no sibling tools, but the lack of context (e.g., prerequisites, typical use cases) means the agent has no additional decision support.

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. 1 tool updatev0.1.5
    • First observedcreate_tweet

TDQS

C2.7/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no ambiguity or confusion with other tools.

Naming Consistency5/5

The single tool name 'create_tweet' follows a clear verb_noun pattern, consistent with itself.

Tool Count2/5

A single tool for a Twitter-oriented server is insufficient; typical interacton with tweets requires multiple operations (read, delete, etc.), making this feel thin.

Completeness2/5

Only creation is covered; essential operations like reading, deleting, or listing tweets are missing, leaving significant gaps for an agent.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables creating, managing, and publishing X/Twitter posts, threads, and replies directly through Claude chat. Supports draft management with the ability to create, list, publish, and delete tweet drafts.
    10
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to interact with X (Twitter) API v2 for posting tweets, searching, liking, retweeting, and more through natural language.
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Enables Twitter/X marketing automation, including tweet search, account analysis, trending topics, and optional AI-generated tweets and scheduling.
    6
    -