Metadata-Version: 2.4
Name: mcp-x-server
Version: 0.1.2
Summary: A mcp x server to post tweets
Home-page: https://github.com/wylu1037/mcp_x_server
Author: wylu1037
Author-email: wylu1037@gmail.com
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastmcp>=2.2.0
Requires-Dist: python-twitter-v2>=0.9.2
Requires-Dist: dotenv>=0.9.9
Requires-Dist: pydantic-ai>=0.1.2
Requires-Dist: pydantic-ai-slim[duckduckgo,openai]>=0.1.2
Dynamic: author
Dynamic: author-email
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# 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.

## Build image
```shell
docker build -t mcp-x-server:latest .
```

## How to run with STDIO

### Local
```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",
                "/Users/wenyanglu/Workspace/ai/mcp_x_server/server.py"
            ],
            "env": {
                "CONSUMER_KEY": "*******************",,
                "CONSUMER_SECRET": "*******************",
                "ACCESS_TOKEN": "*******************",
                "ACCESS_SECRET": "*******************",
                "DEEPSEEK_API_KEY": "*******************"
            }
        }
    }
}
```

### Docker
```shell
docker run -i \
  -e CONSUMER_KEY="your-consumer-key" \
  -e CONSUMER_SECRET="your-consumer-secret" \
  -e ACCESS_TOKEN="your-access-token" \
  -e ACCESS_SECRET="your-access-secret" \
  -e DEEPSEEK_API_KEY="your-deepseek-key" \
  mcp-x-server:latest
```

## Run with SSE
```shell
fastmcp run --transport sse server.py
```
---
Upload

First step: Generating distribution archives
```shell
python3 -m pip install --upgrade build
```
> uv pip install --upgrade build

```shell
python3 -m build
```

Second step: Uploading the distribution archives
```shell
python3 -m pip install --upgrade twine
```
> uv pip install --upgrade twine

Once installed, run Twine to upload all of the archives under dist:
```shell
twine upload --repository testpypi dist/*
```
Once uploaded, your package should be viewable on TestPyPI; for example: https://test.pypi.org/project/example_package_YOUR_USERNAME_HERE.


Use `twine upload dist/*` to upload your package and enter your credentials for the account you registered on the real PyPI. 

---
[setup.py template](https://github.com/kennethreitz/setup.py)
