Skip to main content
Glama
Twitter MCP Server

Twitter MCP Server

by 6551Team

빠른 설치

먼저 http://app.newsliquid.com/mcp로 이동하여 API 토큰을 받으세요.

Claude Code

claude mcp add twitter \
  -e OPENNEWS_TOKEN=<your-token> \
  -- uv --directory /path/to/twitter-mcp run twitter-mcp

/path/to/twitter-mcp를 로컬 프로젝트 경로로, <your-token>을 토큰으로 바꾸세요.

OpenClaw

export OPENNEWS_TOKEN="<your-token>"
cp -r openclaw-skill/opentwitter ~/.openclaw/skills/

Related MCP server: Apex MCP for X Management

AI가 검토하고 설치하도록 하세요

이 MCP가 안전한지 확신이 없으신가요? 아래 프롬프트를 AI 어시스턴트에게 붙여넣으세요. 소스 코드를 먼저 검토한 후 안전하면 설치합니다.

이 프롬프트를 복사하여 AI 어시스턴트에게 보내세요(<project-path>와 <your-token>을 실제 값으로 바꾸세요):

Please review and install the twitter-mcp MCP server for me. The project is at <project-path>.

Steps:
1. Review these files for security:
   - src/twitter_mcp/api_client.py — Confirm it only connects to ai.6551.io, no data sent elsewhere
   - src/twitter_mcp/config.py — Confirm token is only read from local config.json or env vars, no hardcoded secrets or leaks
   - src/twitter_mcp/tools.py — Confirm all tools only perform API queries, no file writes, command execution, or dangerous operations
   - pyproject.toml — Confirm dependencies are only mcp, httpx, no suspicious packages
2. Tell me your conclusion: safe / risky / problematic, with specific reasons
3. If safe, run the install (get Token from http://app.newsliquid.com/mcp):
   claude mcp add twitter -e OPENNEWS_TOKEN=<your-token> -- uv --directory <project-path> run twitter-mcp

무엇을 할 수 있나요?

연결되면 AI 어시스턴트에게 물어보세요:

당신이 말하는 것

AI가 하는 일

"@elonmusk의 Twitter 프로필 보여줘"

사용자 프로필 정보 가져오기

"@VitalikButerin이 최근에 뭐라고 트윗했어"

사용자의 최근 트윗 가져오기

"Bitcoin 관련 트윗 검색"

키워드 검색

"#crypto 해시태그가 있는 트윗 찾기"

해시태그 검색

"좋아요 1000개 이상인 ETH 관련 인기 트윗"

참여 필터로 검색

"팔로워 추적으로 @elonmusk 모니터링"

옵션과 함께 사용자를 감시 목록에 추가

"이 트윗을 인용한 사람"

트윗의 인용 트윗 가져오기

"이 트윗을 리트윗한 사람"

트윗을 리트윗한 사용자 가져오기

"최근에 @elonmusk를 팔로우한 사람"

새 팔로워 이벤트 가져오기

"@elonmusk를 언팔로우한 사람"

언팔로워 이벤트 가져오기

"@elonmusk가 삭제한 트윗"

삭제된 트윗 가져오기

"@elonmusk를 팔로우하는 KOL"

KOL 팔로워 가져오기


사용 가능한 도구

도구

설명

get_twitter_user

사용자 이름으로 사용자 프로필 가져오기

get_twitter_user_by_id

숫자 ID로 사용자 프로필 가져오기

get_twitter_user_tweets

사용자의 최근 트윗 가져오기

search_twitter

기본 필터로 트윗 검색

search_twitter_advanced

다중 필터로 고급 검색

get_twitter_follower_events

팔로워/언팔로워 이벤트 가져오기

get_twitter_deleted_tweets

사용자의 삭제된 트윗 가져오기

get_twitter_kol_followers

KOL(Key Opinion Leader) 팔로워 가져오기

get_twitter_article_by_id

ID로 Twitter 기사 가져오기

get_twitter_tweet_by_id

중첩된 답글/인용 트윗과 함께 ID로 트윗 가져오기

get_twitter_quote_tweets_by_id

특정 트윗을 인용한 트윗 가져오기

get_twitter_retweet_users_by_id

특정 트윗을 리트윗한 사용자 가져오기

get_twitter_watch

모든 Twitter 모니터링 사용자 가져오기

add_twitter_watch

Twitter 사용자를 모니터링 목록에 추가(이벤트 유형 옵션 포함)

delete_twitter_watch

모니터링 목록에서 Twitter 사용자 삭제


구성

API 토큰 받기

http://app.newsliquid.com/mcp로 이동하여 API 토큰을 받으세요.

환경 변수 설정:

# macOS / Linux
export OPENNEWS_TOKEN="<your-token>"

# Windows PowerShell
$env:OPENNEWS_TOKEN = "<your-token>"

변수

필수

설명

OPENNEWS_TOKEN

예

6551 API Bearer 토큰(http://app.newsliquid.com/mcp에서 받기)

TWITTER_API_BASE

아니요

REST API URL 재정의

TWITTER_MAX_ROWS

아니요

쿼리당 최대 결과 수(기본값: 100)

프로젝트 루트의 config.json도 지원합니다(환경 변수가 우선):

{
  "api_base_url": "https://ai.6551.io",
  "api_token": "<your-token>",
  "max_rows": 100
}

WebSocket 실시간 구독

엔드포인트: wss://ai.6551.io/open/twitter_wss?token=YOUR_TOKEN

모니터링 중인 Twitter 계정의 실시간 이벤트를 구독하세요.

하트비트

연결을 유지하기 위해 클라이언트가 ping을 보내면 서버가 pong으로 응답합니다.

Twitter 이벤트 구독

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "twitter.subscribe"
}

응답:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "success": true
  }
}

구독 취소

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "twitter.unsubscribe"
}

서버 푸시 - Twitter 이벤트

모니터링 중인 계정에 활동이 있으면 서버가 푸시합니다:

{
  "jsonrpc": "2.0",
  "method": "twitter.event",
  "params": {
    "id": 123456,
    "twAccount": "elonmusk",
    "twUserName": "Elon Musk",
    "profileUrl": "https://twitter.com/elonmusk",
    "eventType": "NEW_TWEET",
    "content": "...",
    "ca": "0x1234...",
    "remark": "Custom note",
    "createdAt": "2026-03-06T10:00:00Z"
  }
}

참고: content 필드 구조는 이벤트 유형에 따라 다릅니다(아래 참조).


**Event Types and Content Structure**:

#### Tweet Events
- `NEW_TWEET` - New tweet posted
- `NEW_TWEET_REPLY` - New reply tweet
- `NEW_TWEET_QUOTE` - New quote tweet
- `NEW_RETWEET` - Retweeted
- `CA` - Tweet with CA address

Content structure for tweet events:
```json
{
  "id": "1234567890",
  "text": "Tweet content...",
  "createdAt": "2026-03-06T10:00:00Z",
  "language": "en",
  "retweetCount": 100,
  "favoriteCount": 500,
  "replyCount": 20,
  "quoteCount": 10,
  "viewCount": 10000,
  "userScreenName": "elonmusk",
  "userName": "Elon Musk",
  "userIdStr": "44196397",
  "userFollowers": 170000000,
  "userVerified": true,
  "conversationId": "1234567890",
  "isReply": false,
  "isQuote": false,
  "hashtags": ["crypto", "bitcoin"],
  "media": [
    {
      "type": "photo",
      "url": "https://...",
      "thumbUrl": "https://..."
    }
  ],
  "urls": [
    {
      "url": "https://...",
      "expandedUrl": "https://...",
      "displayUrl": "example.com"
    }
  ],
  "mentions": [
    {
      "username": "VitalikButerin",
      "name": "Vitalik Buterin"
    }
  ]
}

팔로워 이벤트

  • NEW_FOLLOWER - 이 계정이 사용자를 팔로우함

  • NEW_UNFOLLOWER - 이 계정이 사용자를 언팔로우함

팔로워 이벤트의 콘텐츠 구조(배열):

[
  {
    "id": 123,
    "twId": 44196397,
    "twAccount": "elonmusk",
    "twUserName": "Elon Musk",
    "twUserLabel": "Verified",
    "description": "User bio...",
    "profileUrl": "https://...",
    "bannerUrl": "https://...",
    "followerCount": 170000000,
    "friendCount": 500,
    "createdAt": "2026-03-06T10:00:00Z"
  }
]

프로필 업데이트 이벤트

  • UPDATE_NAME - 사용자 이름 변경(content: 새 이름 문자열)

  • UPDATE_DESCRIPTION - 소개 업데이트(content: 새 소개 문자열)

  • UPDATE_AVATAR - 프로필 사진 변경(content: 새 아바타 URL 문자열)

  • UPDATE_BANNER - 배너 이미지 변경(content: 새 배너 URL 문자열)

기타 이벤트

  • TWEET_TOPPING - 트윗 고정

  • DELETE - 트윗 삭제

  • SYSTEM - 시스템 이벤트

  • TRANSLATE - 트윗 번역

  • CA_CREATE - CA 토큰 생성


데이터 구조

Twitter User

{
  "userId": "44196397",
  "screenName": "elonmusk",
  "name": "Elon Musk",
  "description": "...",
  "followersCount": 170000000,
  "friendsCount": 500,
  "statusesCount": 30000,
  "verified": true
}

Tweet

{
  "id": "1234567890",
  "text": "Tweet content...",
  "createdAt": "2024-02-20T12:00:00Z",
  "retweetCount": 1000,
  "favoriteCount": 5000,
  "replyCount": 200,
  "userScreenName": "elonmusk",
  "hashtags": ["crypto", "bitcoin"],
  "urls": [{"url": "https://..."}]
}

아래 모든 구성에서 /path/to/twitter-mcp를 실제 로컬 프로젝트 경로로, <your-token>을 http://app.newsliquid.com/mcp에서 받은 토큰으로 바꾸세요.

Claude Desktop

구성 편집(macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "twitter": {
      "command": "uv",
      "args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
      "env": {
        "OPENNEWS_TOKEN": "<your-token>"
      }
    }
  }
}

Cursor

~/.cursor/mcp.json 또는 설정 > MCP 서버:

{
  "mcpServers": {
    "twitter": {
      "command": "uv",
      "args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
      "env": {
        "OPENNEWS_TOKEN": "<your-token>"
      }
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "twitter": {
      "command": "uv",
      "args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
      "env": {
        "OPENNEWS_TOKEN": "<your-token>"
      }
    }
  }
}

Cline

VS Code 사이드바 > Cline > MCP 서버 > 구성, cline_mcp_settings.json 편집:

{
  "mcpServers": {
    "twitter": {
      "command": "uv",
      "args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
      "env": {
        "OPENNEWS_TOKEN": "<your-token>"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Continue.dev

~/.continue/config.yaml:

mcpServers:
  - name: twitter
    command: uv
    args:
      - --directory
      - /path/to/twitter-mcp
      - run
      - twitter-mcp
    env:
      OPENNEWS_TOKEN: <your-token>

Cherry Studio

설정 > MCP 서버 > 추가 > 유형 stdio: 명령 uv, 인수 --directory /path/to/twitter-mcp run twitter-mcp, 환경 변수 OPENNEWS_TOKEN.

Zed Editor

~/.config/zed/settings.json:

{
  "context_servers": {
    "twitter": {
      "command": {
        "path": "uv",
        "args": ["--directory", "/path/to/twitter-mcp", "run", "twitter-mcp"],
        "env": {
          "OPENNEWS_TOKEN": "<your-token>"
        }
      }
    }
  }
}

모든 stdio MCP 클라이언트

OPENNEWS_TOKEN=<your-token> \
  uv --directory /path/to/twitter-mcp run twitter-mcp

호환성

클라이언트

설치 방법

상태

Claude Code

claude mcp add

원라이너

OpenClaw

스킬 디렉터리 복사

원라이너

Claude Desktop

JSON 구성

지원됨

Cursor

JSON 구성

지원됨

Windsurf

JSON 구성

지원됨

Cline

JSON 구성

지원됨

Continue.dev

YAML / JSON

지원됨

Cherry Studio

GUI

지원됨

Zed

JSON 구성

지원됨


개발

cd /path/to/twitter-mcp
uv sync
uv run twitter-mcp
# MCP Inspector
npx @modelcontextprotocol/inspector uv --directory /path/to/twitter-mcp run twitter-mcp

프로젝트 구조

├── README.md
├── docs/
│   ├── README_JA.md           # 日本語
│   └── README_KO.md           # 한국어
├── openclaw-skill/opentwitter/    # OpenClaw Skill
├── pyproject.toml
├── config.json
└── src/twitter_mcp/
    ├── server.py              # Entry point
    ├── app.py                 # FastMCP instance
    ├── config.py              # Config loader
    ├── api_client.py          # HTTP client
    └── tools.py               # 8 tools

라이선스

MIT

Available Tools

12 tools
add_twitter_watchB

Add a Twitter user to monitoring list.

Args: username: Twitter username to monitor (without @).

Inputs: username (required).

delete_twitter_watchC

Delete a Twitter user from monitoring list.

Args: watch_id: The monitoring record ID to delete.

Inputs: watch_id (required).

get_twitter_article_by_idC

Get Twitter article by ID.

Args: article_id: Twitter article ID.

Inputs: article_id (required).

get_twitter_deleted_tweetsB

Get deleted tweets from a Twitter/X user.

Args: username: Twitter username (without @). limit: Maximum tweets to return (default 20, max 100).

Inputs: username (required), limit.

get_twitter_follower_eventsB

Get follower/unfollower events for a Twitter/X user.

Args: username: Twitter username (without @). is_follow: True for new followers, False for unfollowers. limit: Maximum events to return (default 20, max 100).

Inputs: username (required), is_follow, limit.

get_twitter_kol_followersC

Get KOL (Key Opinion Leader) followers for a Twitter/X user.

Returns which influential accounts (KOLs) are following this user.

Args: username: Twitter username (without @).

Inputs: username (required).

get_twitter_userA

Get Twitter/X user profile information by username.

Args: username: Twitter username (without @, e.g. "elonmusk").

Inputs: username (required).

get_twitter_user_by_idB

Get Twitter/X user profile information by user ID.

Args: user_id: Twitter user ID (numeric string).

Inputs: user_id (required).

get_twitter_user_tweetsA

Get recent tweets from a specific Twitter/X user.

Args: username: Twitter username (without @). limit: Maximum tweets to return (default 20, max 100). include_replies: Include reply tweets (default False). include_retweets: Include retweets (default False).

Inputs: username (required), limit, include_replies, include_retweets.

get_twitter_watchB

Get all Twitter monitoring users for the current user.

Returns a list of Twitter accounts being monitored.

Inputs: no named parameters.

search_twitterA

Search Twitter/X for tweets matching criteria.

Args: keywords: Search keywords. from_user: Filter tweets from specific user (without @). hashtag: Filter by hashtag (without #). min_likes: Minimum likes threshold. limit: Maximum tweets to return (default 20, max 100).

Inputs: keywords, from_user, hashtag, min_likes, +1 more.

search_twitter_advancedB

Advanced Twitter/X search with multiple filters.

Args: keywords: Search keywords. from_user: Filter tweets from specific user. to_user: Filter tweets to specific user. mention_user: Filter tweets mentioning specific user. hashtag: Filter by hashtag (without #). exclude_replies: Exclude reply tweets. exclude_retweets: Exclude retweets. min_likes: Minimum likes threshold. min_retweets: Minimum retweets threshold. min_replies: Minimum replies threshold. since_date: Start date (YYYY-MM-DD). until_date: End date (YYYY-MM-DD). lang: Language code (e.g. "en", "zh"). product: Sort by "Top" or "Latest" (default "Top"). limit: Maximum tweets to return (default 20, max 100).

Inputs: keywords, from_user, to_user, mention_user, +11 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools have distinct purposes, but there is some overlap between get_twitter_user and get_twitter_user_by_id (both retrieve user profiles via different identifiers) and between search_twitter and search_twitter_advanced (both search tweets, with the latter being a superset). The descriptions clarify the differences, preventing major confusion.

    Naming Consistency5/5

    All tool names follow a consistent snake_case pattern with clear verb_noun structures (e.g., add_twitter_watch, get_twitter_user_tweets, search_twitter_advanced). The naming is predictable and uniform across all 12 tools.

    Tool Count5/5

    With 12 tools, the server is well-scoped for Twitter/X monitoring and data retrieval. The count is appropriate, covering user management, tweet fetching, search, and monitoring without being overwhelming or insufficient for the domain.

    Completeness4/5

    The toolset provides strong coverage for monitoring and retrieving Twitter data, including user profiles, tweets, searches, and follower events. Minor gaps exist, such as no tools for posting tweets or interacting with tweets (e.g., liking, retweeting), but core retrieval and monitoring workflows are well-covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables complete management of X (Twitter) accounts through a single API key, supporting functions like getting tweets, searching, generating and posting replies.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with X (Twitter) to post tweets, threads, and replies while retrieving tweet metrics and account information. It supports core management tasks like deleting tweets and verifying authentication through the Twitter API.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to access Twitter/X data including user profiles, tweets, search, and follower events via a set of MCP tools.
      MIT