socials-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- socials_mcp-0.1.0/.gitignore +13 -0
- socials_mcp-0.1.0/LICENSE +5 -0
- socials_mcp-0.1.0/PKG-INFO +131 -0
- socials_mcp-0.1.0/README.md +98 -0
- socials_mcp-0.1.0/pyproject.toml +64 -0
- socials_mcp-0.1.0/src/socials_mcp/__init__.py +1 -0
- socials_mcp-0.1.0/src/socials_mcp/server.py +886 -0
- socials_mcp-0.1.0/src/twitter_cli/__init__.py +8 -0
- socials_mcp-0.1.0/src/twitter_cli/auth.py +634 -0
- socials_mcp-0.1.0/src/twitter_cli/cache.py +66 -0
- socials_mcp-0.1.0/src/twitter_cli/cli.py +1442 -0
- socials_mcp-0.1.0/src/twitter_cli/client.py +1172 -0
- socials_mcp-0.1.0/src/twitter_cli/commands/__init__.py +7 -0
- socials_mcp-0.1.0/src/twitter_cli/config.py +161 -0
- socials_mcp-0.1.0/src/twitter_cli/constants.py +121 -0
- socials_mcp-0.1.0/src/twitter_cli/exceptions.py +78 -0
- socials_mcp-0.1.0/src/twitter_cli/filter.py +95 -0
- socials_mcp-0.1.0/src/twitter_cli/formatter.py +325 -0
- socials_mcp-0.1.0/src/twitter_cli/graphql.py +227 -0
- socials_mcp-0.1.0/src/twitter_cli/models.py +79 -0
- socials_mcp-0.1.0/src/twitter_cli/output.py +150 -0
- socials_mcp-0.1.0/src/twitter_cli/parser.py +540 -0
- socials_mcp-0.1.0/src/twitter_cli/search.py +128 -0
- socials_mcp-0.1.0/src/twitter_cli/serialization.py +244 -0
- socials_mcp-0.1.0/src/twitter_cli/timeutil.py +82 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: socials-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP server unifié pour X/Twitter et Reddit — tout-en-un, pas de CLI externe
|
|
5
|
+
Project-URL: Homepage, https://github.com/nyrhe/socials-mcp
|
|
6
|
+
Project-URL: Repository, https://github.com/nyrhe/socials-mcp
|
|
7
|
+
Project-URL: Issues, https://github.com/nyrhe/socials-mcp/issues
|
|
8
|
+
Author: nyrhe
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: mcp,reddit,socials,twitter,x
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Requires-Dist: beautifulsoup4>=4.12
|
|
21
|
+
Requires-Dist: browser-cookie3>=0.19
|
|
22
|
+
Requires-Dist: click>=8.0
|
|
23
|
+
Requires-Dist: curl-cffi>=0.7
|
|
24
|
+
Requires-Dist: httpx
|
|
25
|
+
Requires-Dist: mcp>=1.0.0
|
|
26
|
+
Requires-Dist: pyyaml>=6.0
|
|
27
|
+
Requires-Dist: rdt-cli>=0.4.0
|
|
28
|
+
Requires-Dist: rich>=13.0
|
|
29
|
+
Requires-Dist: x-client-transaction>=0.4.1
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# socials-mcp
|
|
35
|
+
|
|
36
|
+
Unified MCP server for **X/Twitter** and **Reddit**.
|
|
37
|
+
|
|
38
|
+
> **MCP name:** `socials` — one server, two platforms.
|
|
39
|
+
|
|
40
|
+
## Install
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pip install git+https://github.com/nyrhe/socials-mcp
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Or with uvx:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
uvx --from git+https://github.com/nyrhe/socials-mcp socials-mcp
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Login once (this only writes the cookies the libraries read):
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
twitter login
|
|
56
|
+
rdt login
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Backend
|
|
60
|
+
|
|
61
|
+
100 % native: every tool imports `twitter_cli` / `rdt_cli` and calls
|
|
62
|
+
`TwitterClient` / `RedditClient` in-process. No subprocess, no CLI binary
|
|
63
|
+
invoked at runtime — `SOCIALS_X_COOKIES_FILE`, `TWITTER_AUTH_TOKEN` and
|
|
64
|
+
`TWITTER_CT0` are enough to run without any `twitter`/`rdt` executable.
|
|
65
|
+
|
|
66
|
+
## Config
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"socials": {
|
|
72
|
+
"command": "socials-mcp"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Tools
|
|
79
|
+
|
|
80
|
+
| Tool | Description |
|
|
81
|
+
|------|-------------|
|
|
82
|
+
| `reddit_search` | Search Reddit |
|
|
83
|
+
| `reddit_read` | Read post + comments |
|
|
84
|
+
| `reddit_sub` | Browse subreddit |
|
|
85
|
+
| `reddit_sub_info` | Subreddit info |
|
|
86
|
+
| `reddit_user` | User profile |
|
|
87
|
+
| `reddit_user_posts` | User posts |
|
|
88
|
+
| `reddit_user_comments` | User comments |
|
|
89
|
+
| `reddit_popular` | Popular posts (/r/popular) |
|
|
90
|
+
| `reddit_popular_all` | Browse r/all |
|
|
91
|
+
| `reddit_feed` | Home feed (requires login) |
|
|
92
|
+
| `reddit_saved` | Saved posts (requires login) |
|
|
93
|
+
| `reddit_upvoted` | Upvoted posts (requires login) |
|
|
94
|
+
| `reddit_whoami` | Current account (requires login) |
|
|
95
|
+
| `reddit_status` | Auth status (requires login) |
|
|
96
|
+
| `reddit_comment` | Post a comment (requires login) |
|
|
97
|
+
| `reddit_save` | Save a post (requires login) |
|
|
98
|
+
| `reddit_upvote` | Upvote a post (requires login) |
|
|
99
|
+
| `reddit_subscribe` | Subscribe to subreddit (requires login) |
|
|
100
|
+
| `x_user` | User profile |
|
|
101
|
+
| `x_tweet` | Tweet + replies |
|
|
102
|
+
| `x_user_posts` | User tweets |
|
|
103
|
+
| `x_article` | Fetch Article |
|
|
104
|
+
| `x_search` | Search tweets (requires login) |
|
|
105
|
+
| `x_feed` | Home timeline (requires login) |
|
|
106
|
+
| `x_bookmarks` | Bookmarks (requires login) |
|
|
107
|
+
| `x_whoami` | Current account (requires login) |
|
|
108
|
+
| `x_status` | Auth status (requires login) |
|
|
109
|
+
| `x_post` | Post a tweet (requires login) |
|
|
110
|
+
| `x_follow` | Follow user (requires login) |
|
|
111
|
+
| `x_unfollow` | Unfollow user (requires login) |
|
|
112
|
+
| `x_followers` | List followers (requires login) |
|
|
113
|
+
| `x_following` | List following (requires login) |
|
|
114
|
+
| `x_like` | Like tweet (requires login) |
|
|
115
|
+
| `x_unlike` | Unlike tweet (requires login) |
|
|
116
|
+
| `x_likes` | Liked tweets (requires login) |
|
|
117
|
+
| `x_retweet` | Retweet (requires login) |
|
|
118
|
+
| `x_unretweet` | Undo retweet (requires login) |
|
|
119
|
+
| `x_reply` | Reply to tweet (requires login) |
|
|
120
|
+
| `x_quote` | Quote tweet (requires login) |
|
|
121
|
+
| `x_bookmark` | Bookmark tweet (requires login) |
|
|
122
|
+
| `x_unbookmark` | Remove bookmark (requires login) |
|
|
123
|
+
| `x_delete` | Delete tweet (requires login) |
|
|
124
|
+
| `x_list` | Fetch List tweets (requires login) |
|
|
125
|
+
| `socials_status` | Auth status X + Reddit |
|
|
126
|
+
| `reddit_login_help` | Login help Reddit |
|
|
127
|
+
| `x_login_help` | Login help X |
|
|
128
|
+
|
|
129
|
+
## License
|
|
130
|
+
|
|
131
|
+
MIT
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# socials-mcp
|
|
2
|
+
|
|
3
|
+
Unified MCP server for **X/Twitter** and **Reddit**.
|
|
4
|
+
|
|
5
|
+
> **MCP name:** `socials` — one server, two platforms.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install git+https://github.com/nyrhe/socials-mcp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or with uvx:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
uvx --from git+https://github.com/nyrhe/socials-mcp socials-mcp
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Login once (this only writes the cookies the libraries read):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
twitter login
|
|
23
|
+
rdt login
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Backend
|
|
27
|
+
|
|
28
|
+
100 % native: every tool imports `twitter_cli` / `rdt_cli` and calls
|
|
29
|
+
`TwitterClient` / `RedditClient` in-process. No subprocess, no CLI binary
|
|
30
|
+
invoked at runtime — `SOCIALS_X_COOKIES_FILE`, `TWITTER_AUTH_TOKEN` and
|
|
31
|
+
`TWITTER_CT0` are enough to run without any `twitter`/`rdt` executable.
|
|
32
|
+
|
|
33
|
+
## Config
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"mcpServers": {
|
|
38
|
+
"socials": {
|
|
39
|
+
"command": "socials-mcp"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Tools
|
|
46
|
+
|
|
47
|
+
| Tool | Description |
|
|
48
|
+
|------|-------------|
|
|
49
|
+
| `reddit_search` | Search Reddit |
|
|
50
|
+
| `reddit_read` | Read post + comments |
|
|
51
|
+
| `reddit_sub` | Browse subreddit |
|
|
52
|
+
| `reddit_sub_info` | Subreddit info |
|
|
53
|
+
| `reddit_user` | User profile |
|
|
54
|
+
| `reddit_user_posts` | User posts |
|
|
55
|
+
| `reddit_user_comments` | User comments |
|
|
56
|
+
| `reddit_popular` | Popular posts (/r/popular) |
|
|
57
|
+
| `reddit_popular_all` | Browse r/all |
|
|
58
|
+
| `reddit_feed` | Home feed (requires login) |
|
|
59
|
+
| `reddit_saved` | Saved posts (requires login) |
|
|
60
|
+
| `reddit_upvoted` | Upvoted posts (requires login) |
|
|
61
|
+
| `reddit_whoami` | Current account (requires login) |
|
|
62
|
+
| `reddit_status` | Auth status (requires login) |
|
|
63
|
+
| `reddit_comment` | Post a comment (requires login) |
|
|
64
|
+
| `reddit_save` | Save a post (requires login) |
|
|
65
|
+
| `reddit_upvote` | Upvote a post (requires login) |
|
|
66
|
+
| `reddit_subscribe` | Subscribe to subreddit (requires login) |
|
|
67
|
+
| `x_user` | User profile |
|
|
68
|
+
| `x_tweet` | Tweet + replies |
|
|
69
|
+
| `x_user_posts` | User tweets |
|
|
70
|
+
| `x_article` | Fetch Article |
|
|
71
|
+
| `x_search` | Search tweets (requires login) |
|
|
72
|
+
| `x_feed` | Home timeline (requires login) |
|
|
73
|
+
| `x_bookmarks` | Bookmarks (requires login) |
|
|
74
|
+
| `x_whoami` | Current account (requires login) |
|
|
75
|
+
| `x_status` | Auth status (requires login) |
|
|
76
|
+
| `x_post` | Post a tweet (requires login) |
|
|
77
|
+
| `x_follow` | Follow user (requires login) |
|
|
78
|
+
| `x_unfollow` | Unfollow user (requires login) |
|
|
79
|
+
| `x_followers` | List followers (requires login) |
|
|
80
|
+
| `x_following` | List following (requires login) |
|
|
81
|
+
| `x_like` | Like tweet (requires login) |
|
|
82
|
+
| `x_unlike` | Unlike tweet (requires login) |
|
|
83
|
+
| `x_likes` | Liked tweets (requires login) |
|
|
84
|
+
| `x_retweet` | Retweet (requires login) |
|
|
85
|
+
| `x_unretweet` | Undo retweet (requires login) |
|
|
86
|
+
| `x_reply` | Reply to tweet (requires login) |
|
|
87
|
+
| `x_quote` | Quote tweet (requires login) |
|
|
88
|
+
| `x_bookmark` | Bookmark tweet (requires login) |
|
|
89
|
+
| `x_unbookmark` | Remove bookmark (requires login) |
|
|
90
|
+
| `x_delete` | Delete tweet (requires login) |
|
|
91
|
+
| `x_list` | Fetch List tweets (requires login) |
|
|
92
|
+
| `socials_status` | Auth status X + Reddit |
|
|
93
|
+
| `reddit_login_help` | Login help Reddit |
|
|
94
|
+
| `x_login_help` | Login help X |
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
MIT
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "socials-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "MCP server unifié pour X/Twitter et Reddit — tout-en-un, pas de CLI externe"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
authors = [{name = "nyrhe"}]
|
|
12
|
+
keywords = ["mcp", "twitter", "reddit", "x", "socials"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Programming Language :: Python :: 3.10",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
]
|
|
22
|
+
requires-python = ">=3.10"
|
|
23
|
+
dependencies = [
|
|
24
|
+
"mcp>=1.0.0",
|
|
25
|
+
"httpx",
|
|
26
|
+
"rdt-cli>=0.4.0",
|
|
27
|
+
"browser-cookie3>=0.19",
|
|
28
|
+
"click>=8.0",
|
|
29
|
+
"rich>=13.0",
|
|
30
|
+
"PyYAML>=6.0",
|
|
31
|
+
"curl-cffi>=0.7",
|
|
32
|
+
"x-client-transaction>=0.4.1",
|
|
33
|
+
"beautifulsoup4>=4.12",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.optional-dependencies]
|
|
37
|
+
dev = ["pytest>=8.0"]
|
|
38
|
+
|
|
39
|
+
[project.urls]
|
|
40
|
+
Homepage = "https://github.com/nyrhe/socials-mcp"
|
|
41
|
+
Repository = "https://github.com/nyrhe/socials-mcp"
|
|
42
|
+
Issues = "https://github.com/nyrhe/socials-mcp/issues"
|
|
43
|
+
|
|
44
|
+
[project.scripts]
|
|
45
|
+
socials-mcp = "socials_mcp.server:main"
|
|
46
|
+
|
|
47
|
+
[tool.hatch.metadata]
|
|
48
|
+
allow-direct-references = true
|
|
49
|
+
|
|
50
|
+
[tool.hatch.build.targets.wheel]
|
|
51
|
+
packages = ["src/socials_mcp", "src/twitter_cli"]
|
|
52
|
+
|
|
53
|
+
[tool.hatch.build.targets.sdist]
|
|
54
|
+
include = ["/src/socials_mcp", "/src/twitter_cli", "/README.md", "/LICENSE"]
|
|
55
|
+
|
|
56
|
+
[tool.ruff]
|
|
57
|
+
line-length = 100
|
|
58
|
+
|
|
59
|
+
[tool.pytest.ini_options]
|
|
60
|
+
testpaths = ["tests"]
|
|
61
|
+
addopts = "-ra"
|
|
62
|
+
markers = [
|
|
63
|
+
"live: hits the real X/Reddit CLIs (needs login cookies); run with SOCIALS_MCP_LIVE=1",
|
|
64
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|