MCP X Server

MCP X Server

Enables you to write, refine, and publish tweets to X (Twitter) using AI assistance.

Category
Visit Server

README

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-********************************"
        }
      }
    }
}

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,一般仅在你明确需要旧流程时使用。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured