Skip to main content
Glama

Twitter MCP Server

트위터 MCP 서버

Twitter API 통합을 위한 모델 컨텍스트 프로토콜 서버 구현.

설정

  1. 저장소를 복제합니다
  2. 종속성 설치: npm install
  3. .env.example``.env 로 복사하고 Twitter API 자격 증명을 입력하세요.
  4. 프로젝트 빌드: npm run build
  5. 서버를 시작합니다: npm start

환경 변수

.env 에 필요한 Twitter API 자격 증명:

지엑스피1

사용 가능한 도구

트윗 작업

  • postTweet : 새로운 트윗을 게시합니다
    { "text": "Your tweet text here" }
  • postTweetWithMedia : 미디어를 첨부하여 트윗 게시
    { "text": "Your tweet text", "mediaPath": "path/to/media/file", "mediaType": "image/jpeg|image/png|image/gif|video/mp4", "altText": "Optional alt text for accessibility" }
  • getTweetById : ID로 특정 트윗 가져오기
    { "tweetId": "tweet_id", "tweetFields": ["created_at", "public_metrics"] }
  • replyToTweet : 기존 트윗에 답글 달기
    { "tweetId": "tweet_id", "text": "Your reply text" }
  • deleteTweet : 트윗 삭제
    { "tweetId": "tweet_id" }

검색 및 분석

  • searchTweets : 트윗 검색
    { "query": "search query", "maxResults": 10, "tweetFields": ["created_at", "public_metrics"] }
  • getHashtagAnalytics : 해시태그에 대한 분석 가져오기
    { "hashtag": "hashtag", "startTime": "ISO-8601 date", "endTime": "ISO-8601 date" }

사용자 작업

  • getUserInfo : 사용자 정보 가져오기
    { "username": "twitter_username", "fields": ["description", "public_metrics"] }
  • getUserTimeline : 사용자의 트윗을 가져옵니다
    { "username": "twitter_username", "maxResults": 10, "tweetFields": ["created_at", "public_metrics"] }
  • getFollowers : 사용자의 팔로워를 가져옵니다
    { "username": "twitter_username", "maxResults": 100, "userFields": ["description", "public_metrics"] }
  • getFollowing : 사용자가 팔로우하는 계정을 가져옵니다.
    { "username": "twitter_username", "maxResults": 100, "userFields": ["description", "public_metrics"] }

약혼

  • likeTweet : 트윗에 좋아요를 누르세요
    { "tweetId": "tweet_id" }
  • unlikeTweet : 트윗을 싫어함
    { "tweetId": "tweet_id" }
  • retweet : 트윗을 리트윗하다
    { "tweetId": "tweet_id" }
  • undoRetweet : 리트윗 취소
    { "tweetId": "tweet_id" }
  • getRetweets : 트윗을 리트윗한 사용자를 가져옵니다.
    { "tweetId": "tweet_id", "maxResults": 100, "userFields": ["description", "public_metrics"] }
  • getLikedTweets : 사용자가 좋아요를 누른 트윗을 가져옵니다.
    { "userId": "user_id", "maxResults": 100, "tweetFields": ["created_at", "public_metrics"] }

목록 관리

  • createList : 새로운 목록을 만듭니다
    { "name": "List name", "description": "List description", "isPrivate": false }
  • addUserToList : 목록에 사용자 추가
    { "listId": "list_id", "username": "twitter_username" }
  • removeUserFromList : 목록에서 사용자를 제거합니다.
    { "listId": "list_id", "username": "twitter_username" }
  • getListMembers : 목록의 멤버를 가져옵니다
    { "listId": "list_id", "maxResults": 100, "userFields": ["description", "public_metrics"] }

오류 처리

모든 도구는 표준화된 오류 응답을 반환합니다.

  • 매개변수가 없습니다. Missing required parameter: parameter_name
  • API 오류: Twitter API의 오류 메시지
  • 찾을 수 없음 오류: 리소스에 대한 적절한 "찾을 수 없음" 메시지

응답 형식

모든 성공적인 응답은 다음 형식을 따릅니다.

{ "content": [ { "type": "text", "text": "Operation result message" } ] }

개발

  • 빌드: npm run build
  • 시작: npm start
  • 시청 모드: npm run dev
Here's a comprehensive status report of all Twitter tools: ## Working Tools (✓) 1. postTweet

상태: 완벽하게 작동 응답: 트윗 ID 반환 최신 테스트: 성공

2. getTweetById

상태: 완벽하게 작동 응답: 전체 트윗 데이터 반환 최신 테스트: 성공

3. likeTweet & unlikeTweet

상태: 완벽하게 작동 응답: 작업 확인 최신 테스트: 성공

4. retweet & undoRetweet

상태: 완벽하게 작동 응답: 작업 확인 최신 테스트: 성공

5. replyToTweet

상태: 완벽하게 작동 응답: 답장 트윗 ID 반환 최신 테스트: 성공

6. getUserInfo

상태: 완벽하게 작동 중 응답: 사용자 프로필 데이터 완료 최신 테스트: 성공

7. followUser & unfollowUser

상태: 완벽하게 작동 응답: 작업 확인 최신 테스트: 성공

8. createList

상태: 완벽하게 작동 응답: 목록 생성 확인 최신 테스트: 성공

9. getUserLists

상태: 완벽하게 작동 응답: 소유 목록과 멤버 목록 모두 반환 최신 테스트: 성공

## Tools with Issues (⚠️) 1. getUserTimeline

상태: 오류 400 오류: 잘못된 요청 매개변수 수정 필요: 매개변수 유효성 검사

2. searchTweets

상태: 오류 400 오류: 잘못된 요청 매개변수 수정 필요: 쿼리 매개변수 형식 지정

3. getLikedTweets

상태: 오류 400 오류: 잘못된 요청 매개변수 수정 필요: 매개변수 유효성 검사

## Missing Tools (❌) - getHomeTimeline (not found in available tools) - getFollowers (not available) - getFollowing (not available) - getHashtagAnalytics (not available) ## Priority Fixes Needed 1. Parameter Validation: ```typescript // Implement for getUserTimeline, searchTweets, getLikedTweets interface TwitterParamValidator { validateTimelineParams(params: any): boolean; validateSearchParams(params: any): boolean; validateLikedTweetsParams(params: any): boolean; }
  1. 오류 처리:
// Enhance error handling for 400 errors interface TwitterErrorHandler { handle400Error(endpoint: string, params: any): void; logErrorDetails(error: any): void; suggestParameterFixes(params: any): string[]; }
-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

모델 컨텍스트 프로토콜을 통해 Twitter와의 상호작용을 지원하여 대규모 언어 모델이 트윗을 게시하고, 트윗을 검색하고, 트윗에 답장할 수 있습니다.

  1. 설정
    1. 환경 변수
      1. 사용 가능한 도구
        1. 트윗 작업
        2. 검색 및 분석
        3. 사용자 작업
        4. 약혼
        5. 목록 관리
      2. 오류 처리
        1. 응답 형식
          1. 개발

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              Provides AI agents with comprehensive Twitter functionality through the Model Context Protocol standard, enabling reading tweets, posting content, managing interactions, and accessing timeline data with robust error handling.
              Last updated -
              4
              1
              JavaScript
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that enables AI to interact with Twitter, allowing functions like searching tweets, comparing sentiments across accounts, and retrieving timeline content.
              Last updated -
              MIT License
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that enables AI models and applications to interact directly with Twitter/X, providing capabilities to create posts, reply to tweets, retrieve user data, and manage account actions.
              Last updated -
              87
              4
              TypeScript
              MIT License
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that enables large language models to access the latest trending news headlines and detailed content across various categories including recommended, domestic, technology, and sports news.
              Last updated -
              Python
              • Apple

            View all related MCP servers

            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/crazyrabbitLTC/mcp-twitter-server'

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