MCP.so
Sign In
T

Twitter Mcp Js

@yolleygit

About Twitter Mcp Js

A complete Twitter API MCP server implementation based on the API endpoints provided by twitterapi.io.

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "twitter-mcp-server": {
      "command": "npx",
      "args": [
        "twitter-mcp-js"
      ],
      "env": {
        "TWITTER_API_KEY": "your_api_key_here"
      },
      "description": "Twitter MCP Server - Complete Twitter API integration with 32 tools for social media automation and analytics"
    }
  }
}

Tools

34

Get user profile information by username (获取用户资料信息)

Batch get user info by user IDs (批量获取用户信息)

Get user's recent tweets (获取用户最近推文)

Get user's followers (获取用户粉丝)

Get user's followings (获取用户关注列表)

Get tweets mentioning the user (获取提及用户的推文)

Check if one user follows another (检查关注关系)

Search users by keyword (按关键字搜索用户)

Get tweets by IDs (按ID获取推文)

Get replies to a tweet (获取推文回复)

Get quote tweets of a tweet (获取引用推文)

Get users who retweeted a tweet (获取转推用户)

Get tweet thread context (获取推文线程上下文)

Get long-form tweet/article (获取长推文/文章)

Advanced search for tweets (高级搜索推文)

Get community information (获取社区信息)

Get community members (获取社区成员)

Get community moderators (获取社区管理员)

Get community tweets (获取社区推文)

Get trending topics for a location (获取地区热门趋势)

Get my account information (获取我的账户信息)

Login to Twitter account (登录Twitter账户)

Create a new tweet (创建新推文)

Send direct message (发送私信)

Retweet a tweet (转发推文)

Delete a tweet (删除推文)

Follow a user (关注用户)

Unfollow a user (取消关注用户)

Like a tweet (点赞推文)

Unlike a tweet (取消点赞推文)

Create a new community (创建社区)

Delete a community (删除社区)

Join a community (加入社区)

Leave a community (退出社区)

Overview

What is Twitter Mcp Js?

A complete Model Context Protocol (MCP) server for the Twitter API, built on endpoints provided by twitterapi.io. It offers 32 tools for reading user data, tweets, communities, trends, and performing actions like posting, liking, following, and messaging.

How to use Twitter Mcp Js?

After cloning the repository and installing dependencies, configure your TWITTER_API_KEY in a .env file. Start the server with npm run dev (development) or npm start (production). Integrate the server with an MCP client using either a local Node.js command or the npx command, both requiring the API key as an environment variable.

Key features of Twitter Mcp Js

  • 32 tools covering user, tweet, community, trend, and action endpoints
  • Get user info, tweets, followers, followings, and mentions
  • Batch retrieve user data and check follow relationships
  • Search tweets with advanced queries
  • Create, delete, retweet, like, and unlike tweets
  • Send direct messages and manage follows
  • Community management: create, delete, join, leave, get info/members
  • Fetch trending topics and account info

Use cases of Twitter Mcp Js

  • Automate Twitter content posting and engagement (like, retweet, follow)
  • Monitor user activity, tweets, and mentions for social listening
  • Manage community membership and retrieve community data
  • Analyze trends and perform advanced tweet searches
  • Build AI agents that interact with Twitter through MCP

FAQ from Twitter Mcp Js

What API key does Twitter Mcp Js require?

It requires a TWITTER_API_KEY obtained from twitterapi.io.

How do I run the server locally?

Install dependencies, configure the .env file with your API key, then run npm run dev for development or npm start for production.

How do I configure an MCP client to use this server?

Use the provided JSON configurations: for local development set command to node with the path to src/index.js; for remote use set command to npx with twitter-mcp-js. Both require the TWITTER_API_KEY environment variable.

What actions can the server perform besides reading data?

It supports creating and deleting tweets, retweeting, liking/unliking, following/unfollowing, sending DMs, and creating/deleting/joining/leaving communities.

Does the server include error handling?

Yes, it has comprehensive error handling for API request errors, parameter validation errors, network connection errors, and authentication errors.

Frequently asked questions

What API key does Twitter Mcp Js require?

It requires a `TWITTER_API_KEY` obtained from twitterapi.io.

How do I run the server locally?

Install dependencies, configure the `.env` file with your API key, then run `npm run dev` for development or `npm start` for production.

How do I configure an MCP client to use this server?

Use the provided JSON configurations: for local development set `command` to `node` with the path to `src/index.js`; for remote use set `command` to `npx` with `twitter-mcp-js`. Both require the `TWITTER_API_KEY` environment variable.

What actions can the server perform besides reading data?

It supports creating and deleting tweets, retweeting, liking/unliking, following/unfollowing, sending DMs, and creating/deleting/joining/leaving communities.

Does the server include error handling?

Yes, it has comprehensive error handling for API request errors, parameter validation errors, network connection errors, and authentication errors.

Comments

More Other MCP servers