Skip to main content
Glama
Steph-ux

x-mcp-playwright

by Steph-ux

x-mcp-playwright

Twitter/X MCP 서버로, patchright(스텔스 Playwright 포크)와 영구 Chrome 사용자 프로필을 기반으로 합니다.

9개의 그룹화된 도구 — 33개 액션 보존, 기능 손실 없음.


1. 설치

git clone <this-repo> x-mcp-playwright
cd x-mcp-playwright

python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate

pip install -e .
patchright install chromium

일회성 로그인

x-mcp-login
# or: python login.py

실제 브라우저 창이 열립니다. X에 정상적으로 로그인한 후 창을 닫으세요. 세션은 ~/.x-mcp-playwright/profile/에 저장됩니다.


2. MCP 클라이언트에 등록

Claude Code

claude mcp add --scope user x-twitter x-mcp-server

Claude Desktop

{
  "mcpServers": {
    "x-twitter": {
      "command": "x-mcp-server",
      "env": { "X_MCP_HEADLESS": "1" }
    }
  }
}

x-mcp-server가 PATH에 없으면 다음을 사용하세요:

{
  "mcpServers": {
    "x-twitter": {
      "command": "/absolute/path/to/.venv/bin/python",
      "args": ["-m", "x_mcp_server"]
    }
  }
}

Docker(헤드리스 VPS)

docker build -t x-mcp-playwright .
docker run -i --rm \
  -v ~/.x-mcp-playwright/profile:/root/.x-mcp-playwright/profile \
  x-mcp-playwright

3. 도구 카탈로그(9개 도구, 33개 액션)

x_post — 트윗 게시(6개 액션)

action

필수 인자

설명

post

text

단일 트윗 게시

thread

tweets(줄바꿈으로 구분)

연결된 스레드 게시

post_media

text, media_paths(쉼표로 구분)

최대 4개 이미지 또는 1개 동영상

reply

tweet_url, reply_text

트윗에 답글

quote

tweet_url, comment

댓글과 함께 인용 트윗

delete

tweet_url

내 트윗 삭제

x_engage — 트윗 상호작용(4개 액션)

action

필수 인자

on param

like

tweet_url

on=True 좋아요, False 좋아요 취소

retweet

tweet_url

on=True 리트윗, False 취소

bookmark

tweet_url

on=True 저장, False 제거

pin

tweet_url

on=True 고정, False 고정 해제

x_user — 사용자 작업(6개 액션)

action

필수 인자

선택

profile

handle

timeline

handle

tab="tweets"|"likes"|"media", limit

connections

handle

kind="followers"|"following", limit

follow

handle

on=True 팔로우, False 언팔로우

block

handle

mute

handle

인자

기본값

설명

query

검색할 키워드

filter

"top"

"latest", "people", "media"

from_user

작성자로 필터링

to_user

답글 대상으로 필터링

since / until

날짜 범위(YYYY-MM-DD)

min_likes

0

최소 좋아요 수

min_retweets

0

최소 리트윗 수

lang

언어 코드

limit

10

최대 결과 수

x_feed — 피드 탐색(4개 액션)

action

설명

home

내 홈 타임라인. 선택: tab="for_you"|"following"

bookmarks

내 저장된 북마크

notifications

멘션, 좋아요, 팔로우

trending

무슨 일이 일어나고 있는지

x_tweet — 트윗 상세(4개 액션)

action

필수 인자

설명

details

tweet_url

지표가 포함된 전체 트윗

replies

tweet_url

트윗 아래의 답글들

analytics

tweet_url

노출/참여(내 트윗)

engagers

tweet_url

좋아요/리트윗한 사용자(kind="likes"|"retweets")

x_list — 리스트

시나리오

인자

내 리스트

인자 없음

사용자의 리스트

handle

리스트 트윗

list_id

x_dm — 다이렉트 메시지(3개 액션)

action

필수 인자

설명

send

handle, message

DM 보내기

conversations

최근 DM 스레드 목록

messages

handle

사용자와의 메시지 읽기

x_session — 세션 관리(2개 액션)

action

설명

check

{logged_in, current_url, user_handle} 반환

screenshot

모든 X 페이지 캡처. 선택: url, full_page


4. 환경 변수

변수

기본값

설명

X_MCP_HEADLESS

1

0이면 브라우저 창 표시

X_MCP_TIMEOUT_MS

20000

기본 Playwright 타임아웃(ms)

X_MCP_SCREENSHOT_DIR

~/.x-mcp-playwright/screenshots

디버그 스크린샷

X_MCP_USE_SYSTEM_CHROME

0

1이면 시스템 Chrome 사용


5. 안전

  • 속도 제한: 쓰기 작업(게시, 삭제, DM, 답글)은 분당 1회로 제한됩니다. 참여 작업(좋아요, 리트윗, 팔로우)은 분당 2회로 제한됩니다. 읽기 작업은 무제한입니다.

  • 세션 유지: 백그라운드 작업이 30분마다 X에 ping을 보냅니다. 세션이 만료되면 경고를 기록합니다.

  • 실제 계정에 고정됩니다. LLM이 수행하는 모든 작업은 사용자가 한 것입니다.


6. MCP 리소스

  • x://session/status — 로그인 상태

  • x://version — 서버 버전

  • x://tools/list — 모든 도구

  • x://tools/categories — 그룹화된 분류

7. MCP 프롬프트

  • analyze_tweet(tweet_url) — 트윗 가져오기 및 분석(감정, 참여도, 응답 톤)

  • draft_reply(tweet_url, intent) — 280자 이내의 답변 변형 3개 작성


7. 개발

make install     # deps + chromium
make login       # interactive X login
make test        # unit tests (no browser)
make smoke       # live search test
make server      # run MCP server
make lint        # compile-check
make clean       # remove pycache, screenshots

8. 안전

  • 실제 계정에 고정됩니다. LLM이 수행하는 모든 작업은 사용자가 한 것입니다.

  • 제한: 분당 게시/답글 작업 1-2회 이하.

  • VPS에서는 파괴적 도구(delete, block, send_dm) 사용 시 사람의 승인을 요구하세요.


라이선스

MIT

-
license - not tested
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

  • FastMCP server for posting formatted content to X (Twitter) — Tollbooth-monetized, DPYC-native

  • Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.

  • Remote MCP server for The Colony — a social network for AI agents (posts, DMs, search, marketplace).

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Steph-ux/x-mcp-playwright'

If you have feedback or need assistance with the MCP directory API, please join our Discord server