Skip to main content
Glama
Overseas Social MCP Server

Overseas Social MCP Server

by CubericW

Overseas Social MCP Server

An MCP (Model Context Protocol) server that unifies collection of public data from overseas social platforms behind one set of agent-callable tools, for Claude Code / Codex / Cursor and any MCP-compatible agent:

Platform

Backend

API type

Default

X / Twitter

twscrape

unofficial (multi-account rotation)

on

Reddit

PRAW

official API ✅

on (needs keys)

Telegram

Telethon

official MTProto ✅

on (needs keys)

LinkedIn

linkedin_scraper

unofficial (high-risk)

off

Graceful degradation: configure only the platforms you use. If a backend's dependency or credentials are missing, its tools return a structured {ok:false, error:"backend_unavailable", details:[...]} payload with setup instructions — the server never crashes.

⚠️ Personal, low-frequency, research use only. Prefer the official APIs (Reddit, Telegram). Unofficial scraping (X, LinkedIn) may violate ToS and get accounts restricted — use throwaway accounts and keep volumes tiny.


Tools

Tool

Platform

Purpose

x_search

X

Search recent tweets by query (supports X operators)

x_user_posts

X

Recent tweets from a user

reddit_search

Reddit

Search posts (optionally in one subreddit)

reddit_subreddit_hot

Reddit

Hot posts of a subreddit

reddit_post_comments

Reddit

Top comments of a post

telegram_channel_messages

Telegram

Recent messages of a public channel (optional keyword filter)

linkedin_profile

LinkedIn

One profile (high-risk)

linkedin_company

LinkedIn

One company page (high-risk)

list_platforms

–

Capability matrix

backend_status

–

Which backends are installed & configured

All content tools return the same normalised schema (identical to the mediacrawler-mcp wrapper), so the upstream skill treats every platform uniformly:

{
  "ok": true, "platform": "reddit", "count": 12,
  "items": [{
    "id": "...", "author": "...", "author_id": null,
    "content": "...", "like_count": 42, "comment_count": 7,
    "publish_time": 1784473477.0, "url": "https://...",
    "extra": { "...": "platform-specific fields" }, "raw": null
  }],
  "warnings": []
}

Related MCP server: linkfetch-mcp

Install

# core (always)
pip install --user "mcp>=1.2.0,<2"
# then only the backends you need:
pip install --user twscrape        # X
pip install --user praw            # Reddit
pip install --user telethon        # Telegram
pip install --user linkedin_scraper selenium   # LinkedIn (high-risk)
# or everything:  pip install --user -e ".[all]"

Per-platform setup

Reddit (official — easiest, lowest risk)

  1. Create a script app at https://www.reddit.com/prefs/apps .

  2. Set OSMCP_REDDIT_CLIENT_ID, OSMCP_REDDIT_CLIENT_SECRET, OSMCP_REDDIT_USER_AGENT.

Telegram (official)

  1. Get api_id / api_hash at https://my.telegram.org → API development tools.

  2. Log in once, yourself, in a terminal (it prompts for api_id / api_hash, phone number, login code and 2FA password):

    cd /path/to/overseas-social-mcp && python3 -m overseas_social_mcp.telegram_login

    This writes OSMCP_TG_API_ID / OSMCP_TG_API_HASH / OSMCP_TG_SESSION to ~/.config/overseas-social-mcp/.env (chmod 600) and creates ~/.config/overseas-social-mcp/telegram.session. Every server process loads that env file at startup, so no secrets go into the MCP client config.

  3. python3 -m overseas_social_mcp.telegram_login --check verifies the session without prompting; --reset starts over.

The session is shared by every server process (one per agent session); a file lock serialises Telegram calls so they don't collide on the SQLite session.

X / Twitter (twscrape)

  1. pip install --user twscrape.

  2. Add a logged-in account from browser cookies. Copy auth_token and ct0 from x.com -> DevTools -> Application -> Cookies, then paste them at the hidden prompt as auth_token=xxx; ct0=yyy:

    twscrape --db ~/.config/overseas-social-mcp/x_accounts.db add_cookie my_account
  3. Always pass --db: the CLI otherwise uses accounts.db in the current directory, which the server does not read. OSMCP_X_ACCOUNTS_DB overrides the path. Use throwaway accounts.

backend_status reports accounts_active. With no active account x_search and x_user_posts return backend_unavailable, not an empty result.

LinkedIn (high-risk — off by default)

Only enable with a throwaway account, at your own risk: OSMCP_LINKEDIN_ENABLED=true, OSMCP_LINKEDIN_EMAIL/PASSWORD, OSMCP_CHROMEDRIVER.

See .env.example for all variables.


Register with an MCP client

Claude Code

claude mcp add overseas-social \
  --env PYTHONPATH=/path/to/overseas-social-mcp \
  --env OSMCP_REDDIT_CLIENT_ID=... \
  --env OSMCP_REDDIT_CLIENT_SECRET=... \
  -- python -m overseas_social_mcp.server

Claude Desktop / Cursor

Paste examples/claude_desktop_config.snippet.json into your MCP config and fill in the paths/keys.

Run backend_status first to confirm what's ready.


Test

pip install --user pytest
PYTHONPATH=. pytest -q      # no network, no credentials required

Safety & compliance

  • Prefer official APIs (Reddit, Telegram); they are the compliant path.

  • X and LinkedIn backends are unofficial — throwaway accounts, tiny volumes, low frequency; you accept the ToS / account risk.

  • Do not collect private personal data. Respect platform ToS and local law.

  • Built-in guardrails: per-call hard cap, local sliding-window rate limit, configurable delays.


License

MIT — see LICENSE. Backends are optional third-party packages that you install yourself and are not bundled here: twscrape (MIT), PRAW (BSD-2-Clause), Telethon (MIT), linkedin_scraper (GPL-3.0 on GitHub). Each is governed by its own license.

Available Tools

10 tools
backend_status

Report which backends are configured & importable (without making calls).

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

linkedin_company

Fetch a single LinkedIn company page (industry, size, HQ, about).

HIGH RISK: see linkedin_profile. Disabled by default.

Args: company_url: full https://www.linkedin.com/company/... URL.

NameRequiredDescriptionDefault
company_urlYes

Output Schema

NameRequiredDescription

No output parameters

linkedin_profile

Fetch a single LinkedIn profile (name, headline, experience, education).

HIGH RISK: violates LinkedIn ToS and may restrict your account. Disabled by default; enable via OSMCP_LINKEDIN_ENABLED=true with a throwaway account.

Args: profile_url: full https://www.linkedin.com/in/... URL.

NameRequiredDescriptionDefault
profile_urlYes

Output Schema

NameRequiredDescription

No output parameters

list_platforms

List supported platforms and their tools.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription

No output parameters

reddit_post_comments

Fetch top-level comments of a Reddit post by its id.

Args: post_id: Reddit submission id (the base36 id, not the full URL). max_count: max comments (default from config, hard-capped).

NameRequiredDescriptionDefault
post_idYes
max_countNo

Output Schema

NameRequiredDescription

No output parameters

reddit_subreddit_hot

Fetch hot posts from a subreddit via the official API.

Args: subreddit: subreddit name (without r/). max_count: max posts (default from config, hard-capped).

NameRequiredDescriptionDefault
max_countNo
subredditYes

Output Schema

NameRequiredDescription

No output parameters

telegram_channel_messages

Fetch recent messages from a public Telegram channel or group (optionally filtered).

Args: channel: channel/group username (with or without @), a t.me link (t.me/name, t.me/s/name, t.me/name/123), or a numeric -100… id. query: optional keyword to filter messages server-side. max_count: max messages (default from config, hard-capped).

Items are newest first; publish_time is UTC. Requires telethon + api_id/api_hash + an authorized session (one-time interactive login: python3 -m overseas_social_mcp.telegram_login, run by the user).

NameRequiredDescriptionDefault
queryNo
channelYes
max_countNo

Output Schema

NameRequiredDescription

No output parameters

x_user_posts

Fetch recent public tweets from a specific X/Twitter user.

Args: username: handle with or without leading @. max_count: max tweets (default from config, hard-capped).

NameRequiredDescriptionDefault
usernameYes
max_countNo

Output Schema

NameRequiredDescription

No output parameters

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 10 tool updatesv0.1.0
    • First observedbackend_status
    • First observedlinkedin_company
    • First observedlinkedin_profile
    • First observedlist_platforms
    • First observedreddit_post_comments
    • First observedreddit_search
    • First observedreddit_subreddit_hot
    • First observedtelegram_channel_messages
    • First observedx_search
    • First observedx_user_posts

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Provides AI agents with unified access to 21 social media platforms and 105 endpoints for retrieving profiles, posts, comments, search results, trending content, and analytics without per-platform authentication.
    4
    147 npm
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    Enables AI agents to search and retrieve LinkedIn jobs, profiles, companies, people, posts, reactions, groups, and inbox conversations through typed MCP tools, with safety limits and no browser automation.
    24
    57 npm
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables agents to retrieve the contents of public social media posts — text, author, date, engagement counts, links, photos, and video frames — from X, Instagram, Threads, Facebook, LinkedIn, Bluesky, Mastodon, YouTube, Vimeo, Tumblr, Pinterest, and Reddit by simply passing a post URL. It works entirely without logins, cookies, or API keys, reading only what each site already exposes publicly.
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables unified access to X/Twitter and Reddit for searching and reading posts, profiles, feeds, and comments, plus authenticated actions such as posting, replying, liking, following, bookmarking, subscribing, and saving.
    MIT