Agent Twitter Client MCP
代理-Twitter-客户端-MCP
使用agent-twitter-client包与 Twitter 集成的模型上下文协议 (MCP) 服务器,允许 AI 模型无需直接 API 访问即可与 Twitter 交互。
特征
身份验证选项:
基于 Cookie 的身份验证(推荐)
用户名/密码认证
Twitter API v2 凭证
推文操作:
获取用户的推文
通过 ID 获取特定推文
搜索推文
发送带有文本和媒体的推文
创建投票
点赞、转发和引用推文
用户操作:
获取用户个人资料
关注用户
获取关注者和关注列表
Grok 集成:
通过 Twitter 界面与 Grok 聊天
使用对话 ID 继续对话
获取网络搜索结果和引用
通过 Grok 访问 Twitter 的实时数据
注意:Grok 功能需要agent-twitter-client v0.0.19或更高版本
Related MCP server: MCP Twitter
文档
开发者指南——面向开发者的综合指南
测试指南- MCP 测试说明
代理指南- 人工智能代理如何使用 Twitter MCP 的指南
贡献指南——为该项目做出贡献的指南
变更日志——该项目变更的历史记录
演示自述文件- 运行演示脚本的指南
Grok 示例- Grok AI 集成示例的文档
快速入门
安装
# Install globally
npm install -g agent-twitter-client-mcp
# Or install locally
npm install agent-twitter-client-mcp基本用法
使用您的 Twitter 凭证创建一个
.env文件(请参阅身份验证方法)运行 MCP 服务器:
# If installed globally
agent-twitter-client-mcp
# If installed locally
npx agent-twitter-client-mcp演示脚本
该软件包包括一个demo目录,其中有演示各种功能的示例脚本:
# Clone the repository to access the demo scripts
git clone https://github.com/ryanmac/agent-twitter-client-mcp.git
cd agent-twitter-client-mcp/demo
# Run the interactive demo menu
./run-demo.sh
# Run a specific demo script
./run-demo.sh --script tweet-search.js
# Run Grok AI examples (requires agent-twitter-client v0.0.19)
./run-demo.sh --script simple-grok.js --use-local-agent-twitter-client
./run-demo.sh --script grok-chat.js --use-local-agent-twitter-client请参阅演示自述文件以了解更多详细信息。
端口配置
默认情况下,MCP 服务器在端口 3000 上运行。如果您需要更改此设置(例如,如果您已经在端口 3000 上运行应用程序),您有以下几种选择:
选项 1:使用环境变量
设置PORT环境变量:
PORT=3001 npx agent-twitter-client-mcp选项 2:使用 Docker Compose
如果使用 Docker Compose,您可以在.env文件中配置主机和容器端口:
# .env file
MCP_HOST_PORT=3001 # The port on your host machine
MCP_CONTAINER_PORT=3000 # The port inside the container然后运行:
docker-compose up -d这会将主机上的端口 3001 映射到容器中的端口 3000,从而允许您通过http://localhost:3001访问 MCP,同时您的其他应用程序继续使用端口 3000。
使用 Claude Desktop 进行设置
通过向配置文件中添加以下内容来配置 Claude Desktop 以使用此 MCP:
Windows : %APPDATA%\Claude\claude_desktop_config.json macOS : ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"agent-twitter-client-mcp": {
"command": "npx",
"args": ["-y", "agent-twitter-client-mcp"],
"env": {
"AUTH_METHOD": "cookies",
"TWITTER_COOKIES": "[\"auth_token=YOUR_AUTH_TOKEN; Domain=.twitter.com\", \"ct0=YOUR_CT0_VALUE; Domain=.twitter.com\", \"twid=u%3DYOUR_USER_ID; Domain=.twitter.com\"]"
}
}
}
}重启Claude桌面
身份验证方法
Cookie 认证(推荐)
{
"AUTH_METHOD": "cookies",
"TWITTER_COOKIES": "[\"auth_token=YOUR_AUTH_TOKEN; Domain=.twitter.com\", \"ct0=YOUR_CT0_VALUE; Domain=.twitter.com\", \"twid=u%3DYOUR_USER_ID; Domain=.twitter.com\"]"
}获取 cookies:
在浏览器中登录 Twitter
打开开发者工具(F12)
转到“应用程序”选项卡 >“Cookie”
复制
auth_token、ct0和twidcookie 的值确保每个 cookie 都包含
Domain=.twitter.com部分
用户名/密码验证
{
"AUTH_METHOD": "credentials",
"TWITTER_USERNAME": "your_username",
"TWITTER_PASSWORD": "your_password",
"TWITTER_EMAIL": "your_email@example.com", // Optional
"TWITTER_2FA_SECRET": "your_2fa_secret" // Optional, required if 2FA is enabled
}Twitter API 身份验证
{
"AUTH_METHOD": "api",
"TWITTER_API_KEY": "your_api_key",
"TWITTER_API_SECRET_KEY": "your_api_secret_key",
"TWITTER_ACCESS_TOKEN": "your_access_token",
"TWITTER_ACCESS_TOKEN_SECRET": "your_access_token_secret"
}可用工具
get_user_tweets:获取特定用户的推文get_tweet_by_id:通过 ID 获取特定推文search_tweets:搜索推文send_tweet:发布一条新推文send_tweet_with_poll:发布带有投票的推文like_tweet:喜欢一条推文retweet:转发一条推文quote_tweet:引用一条推文get_user_profile:获取用户的个人资料follow_user:关注用户get_followers:获取用户的关注者get_following:获取用户关注的用户grok_chat:通过 Twitter 与 Grok 聊天health_check:检查 Twitter MCP 服务器的健康状况
测试接口
MCP 包含一个用于测试的交互式命令行界面:
npx agent-twitter-client-mcp-test
# or if installed locally
npm run test:interface这将启动一个 REPL,您可以在其中测试各种 MCP 功能:
agent-twitter-client-mcp> help
Available commands:
health Run a health check
profile <username> Get a user profile
tweets <username> [count] Get tweets from a user
tweet <id> Get a specific tweet by ID
search <query> [count] Search for tweets
post <text> Post a new tweet
like <id> Like a tweet
retweet <id> Retweet a tweet
quote <id> <text> Quote a tweet
follow <username> Follow a user
followers <userId> [count] Get a user's followers
following <userId> [count] Get users a user is following
grok <message> Chat with Grok
help Show available commands
exit Exit the test interface示例测试命令
# Run a health check
agent-twitter-client-mcp> health
# Search for tweets
agent-twitter-client-mcp> search mcp 2
# Get a user's profile
agent-twitter-client-mcp> profile elonmusk
# Get tweets from a user
agent-twitter-client-mcp> tweets openai 5
# Chat with Grok
agent-twitter-client-mcp> grok Explain quantum computing in simple terms示例用法
要求克劳德:
“在 Twitter 上搜索有关 AI 的推文”
“发布一条推文说‘克劳德向你问好!’”
“获取来自@OpenAI的最新推文”
“与 Grok 聊聊量子计算”
高级用法
与媒体合作
要发布带有图片的推文:
I want to post a tweet with an image. The tweet should say "Beautiful sunset today!" and include this image.要发布带有视频的推文:
I want to post a tweet with a video. The tweet should say "Check out this amazing video!" and include the video file.创建投票
要创建投票:
Create a Twitter poll asking "What's your favorite programming language?" with options: Python, JavaScript, Rust, and Go. The poll should run for 24 hours.与 Grok 交互
与 Grok 对话:
Use Grok to explain quantum computing to me. Ask it to include some real-world applications.要继续与 Grok 对话:
Continue the Grok conversation and ask it to elaborate on quantum entanglement.Grok 的独特功能
Twitter 上的 Grok 可以访问实时 Twitter 数据,而独立的 Grok API 则无法访问这些数据。这意味着你可以向 Grok 询问以下信息:
Twitter 上当前的热门话题
分析最近关于特定主题的推文
有关 Twitter 用户及其内容的信息
平台上正在讨论的实时事件
示例查询:
“现在 Twitter 上的热门话题是什么?”
“分析 Twitter 上有关人工智能的情绪”
“人们对最新的苹果发布会有何评价?”
“显示有关今天正在讨论的热门 memecoin 的信息”
Grok 身份验证要求
Grok 功能需要正确的身份验证。MCP 支持两种身份验证方式:
Cookie 身份验证(推荐):
Cookies 必须是 JSON 数组格式
例如:
TWITTER_COOKIES=["auth_token=YOUR_AUTH_TOKEN; Domain=.twitter.com", "ct0=YOUR_CT0_VALUE; Domain=.twitter.com", "twid=u%3DYOUR_USER_ID; Domain=.twitter.com"]必需的 cookies 是
auth_token、ct0和twid
用户名/密码验证:
在您的环境中设置
TWITTER_USERNAME和TWITTER_PASSWORD在某些情况下可能会受到 Cloudflare 保护
Grok 速率限制
Grok 具有可能影响使用的速率限制:
非高级帐户:每 2 小时 25 条消息
高级帐户:更高的限额
当达到限制时,MCP 将在响应中返回速率限制信息。
有关使用 Grok 的更多详细信息,请参阅Grok 示例文档。
故障排除
身份验证问题
Cookie 身份验证问题
如果您遇到 Cookie 身份验证问题:
Cookie 过期:Twitter 的 Cookie 通常会在一段时间后过期。请尝试注销并重新登录 Twitter 来刷新您的 Cookie。
Cookie 格式:确保您的 cookie 正确格式化为具有正确域的 JSON 字符串数组。
必需的 Cookies :确保已包含必要的 cookies:
auth_token、ct0和twid。
正确格式的 cookie 示例:
"TWITTER_COOKIES": "[\"auth_token=1234567890abcdef; Domain=.twitter.com\", \"ct0=abcdef1234567890; Domain=.twitter.com\", \"twid=u%3D1234567890; Domain=.twitter.com\"]"凭证认证问题
如果您在用户名/密码验证方面遇到问题:
双因素身份验证:如果您的帐户启用了 2FA,则需要提供
TWITTER_2FA_SECRET。账户锁定:登录失败次数过多可能会导致您的账户被锁定。请查看您的电子邮件,查看是否有账户验证请求。
验证码挑战:Twitter 可能会提出客户端无法自动处理的验证码挑战。
API 身份验证问题
对于 API 身份验证问题:
API 密钥权限:确保您的 API 密钥具有您尝试执行的操作所需的权限。
速率限制:Twitter API 具有速率限制,如果超出可能会导致失败。
API 更改:Twitter 偶尔会更改其 API,这可能会导致兼容性问题。
操作错误
推文发布失败
如果您无法发布推文:
内容限制:Twitter 可能会阻止违反其内容政策的推文。
媒体格式问题:确保媒体格式和编码正确。
频率限制:Twitter 限制您发帖的频率。
搜索问题
如果搜索不起作用:
查询语法:确保您的搜索查询遵循 Twitter 的搜索语法。
搜索限制:某些搜索模式可能有限制或需要特定权限。
Grok 问题
如果 Grok 功能不起作用:
版本要求:
Grok 需要agent-twitter-client v0.0.19或更高版本
当前软件包使用 v0.0.18 实现基本功能
对于演示脚本,使用
--use-local-agent-twitter-client标志临时安装 v0.0.19
身份验证问题:
Cookie 格式:确保 Cookie 采用正确的 JSON 数组格式
Cookie 有效性:Twitter Cookie 会在一定期限后过期
Cloudflare 保护:用户名/密码验证可能会被 Cloudflare 阻止
高级要求:访问 Grok 需要 Twitter Premium 订阅
速率限制:
非高级帐户:每 2 小时 25 条消息
错误消息:“速率限制:您已达到限制...”
解决方案:等到速率限制重置或升级到高级帐户
环境文件位置:
对于演示脚本,请确保您的凭据位于
demo/.env中,而不是在根.env文件中使用
--debug-env标志检查正在加载哪些环境变量
有关 Grok 问题的详细故障排除,请参阅Grok 示例文档。
服务器问题
健康检查
使用health_check工具诊断服务器问题:
Run a health check on the agent-twitter-client-mcp server to diagnose any issues.健康检查将报告以下内容:
身份验证状态
API 连接
内存使用情况
日志记录
服务器记录到控制台和文件:
error.log:包含错误级别的消息combined.log:包含所有日志消息
检查这些日志以获取详细的错误信息。
发展
先决条件
Node.js 18+
npm
设置
克隆存储库
git clone https://github.com/ryanmac/agent-twitter-client-mcp.git
cd agent-twitter-client-mcp安装依赖项
npm install创建带有配置的
.env文件:
AUTH_METHOD=cookies
TWITTER_COOKIES=["cookie1=value1", "cookie2=value2"]构建项目
npm run build启动服务器
npm start环境变量
除了身份验证变量之外,您还可以设置:
LOG_LEVEL:设置日志级别(错误、警告、信息、调试)NODE_ENV:设置环境(开发、生产)
Docker
您还可以使用 Docker 运行服务器:
直接使用 Docker
# Build the Docker image
docker build -t agent-twitter-client-mcp .
# Run the container with environment variables
docker run -p 3000:3000 \
-e AUTH_METHOD=cookies \
-e TWITTER_COOKIES='["auth_token=YOUR_AUTH_TOKEN; Domain=.twitter.com", "ct0=YOUR_CT0_VALUE; Domain=.twitter.com"]' \
agent-twitter-client-mcp使用 Docker Compose
使用您的 Twitter 凭证创建一个
.env文件使用 docker-compose 运行:
# Start the service
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the service
docker-compose downDocker 中的环境变量
您可以通过多种方式将环境变量传递给 Docker 容器:
在docker-compose.yml文件中(已经配置)
通过 .env 文件(推荐用于 docker-compose)
直接在docker run命令中(如上图)
持久化日志
docker-compose 配置包括用于日志的卷挂载:
volumes:
- ./logs:/app/logs这会将日志存储在项目文件夹中的logs目录中。
安全注意事项
凭证存储:安全地存储凭证,最好使用环境变量或安全保险库。
速率限制:实施速率限制以防止滥用 Twitter API。
内容验证:发布前验证所有内容,以防止恶意使用。
执照
麻省理工学院
Available Tools
14 toolsfollow_userC
Follow a Twitter user
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | Username to follow (without @) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states 'Follow a Twitter user,' with no mention of idempotency (safe to call again?), effects (e.g., rate limiting, notification), or error states (e.g., user not found). Significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise single sentence, but lacks structure (e.g., no paragraphs or bullet points). Given the simplicity, it is not overly wasteful, but could be improved by adding a brief note on behavior.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple action with one parameter and no output schema, the description is minimal and lacks context about return value, error handling, and side effects. More completeness is needed to guide an AI agent effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one parameter 'username' described as 'Username to follow (without @).' The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the action ('Follow') and resource ('a Twitter user'), making the purpose immediately understandable. However, it could be slightly more specific about the expected input (username format), though the schema already provides that.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., if already following, or when to use other social actions like like_tweet). No mention of prerequisites (e.g., authentication) or context. Lacks explicit usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_followersC
Get a user's followers
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | User ID | |
| count | No | Number of followers to fetch (1-200) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must fully disclose behavior. It only states 'Get a user's followers' without mentioning pagination, rate limits, authentication requirements, or what happens if count exceeds the allowed range.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence with no wasted words, but it is overly minimal. It could include more detail without becoming verbose, so it is adequate but not excellent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description should explain return format, pagination, or handling of large follower lists. The current description is insufficient for an agent to fully understand the tool's capabilities.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides descriptions for both parameters (userId and count) with 100% coverage. The description 'Get a user's followers' adds no additional meaning beyond what the schema conveys, meeting the baseline for full schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get a user's followers', indicating the verb and resource. However, it does not distinguish from the sibling tool 'get_following', which gets users the user follows. A brief note on the difference would improve clarity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No usage guidelines are provided. The description does not mention when to use this tool versus alternatives like 'get_following', nor does it specify prerequisites or context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_followingC
Get users a user is following
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | User ID | |
| count | No | Number of following to fetch (1-200) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose any behavioral traits such as authentication requirements, rate limits, pagination behavior, or the structure of returned data. The agent receives no insight beyond the basic operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (three words), but this brevity sacrifices essential context. While not verbose, it is not adequately structured to convey important details such as return format or usage constraints.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that there is no output schema and no annotations, the description should compensate with more context. It fails to explain what the response contains (e.g., list of user objects or IDs), pagination, or error cases. The tool's purpose is simple but incomplete for an AI agent to invoke confidently.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for both parameters (userId and count), so the schema already explains their meaning. The tool description adds no additional semantics beyond what the schema provides, meeting the minimum baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get users a user is following' clearly states the action (get) and resource (users a user is following). It is specific enough to convey the basic purpose, though it does not differentiate from the sibling tool 'get_followers' which retrieves the reverse relationship.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'get_followers'. There is no mention of prerequisites, context, or scenarios where this tool is appropriate or when to choose another.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_tweet_by_idB
Fetch a specific tweet by ID
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Tweet ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must convey behavioral traits. 'Fetch' implies a read operation, but it does not disclose rate limits, authentication needs, error handling for non-existent tweets, or any side effects. The description is too brief to give full transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is only 6 words, highly concise. It is front-loaded with the key action and resource. However, it could be slightly improved by structuring with additional context without becoming wordy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description is minimally adequate. It states the basic purpose but omits details about return format, error conditions, or any special behavior. There is room for improvement.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with the 'id' parameter described as 'Tweet ID'. The description does not add any further meaning beyond what the schema already provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses 'Fetch a specific tweet by ID' which clearly specifies the verb (fetch) and resource (tweet by ID). It distinguishes this tool from siblings like search_tweets or get_user_tweets that operate on multiple tweets or by different criteria.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide any guidance on when to use this tool versus alternatives. It only implies usage when a specific tweet ID is known, but lacks explicit when-not conditions or comparisons to sibling tools like search_tweets.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_user_profileC
Get a user's profile information
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | Twitter username (without @) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states 'Get', implying a read operation, but does not mention authentication, error cases, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that front-loads the purpose. However, it sacrifices detail for brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Without an output schema, the description should hint at return values, but it only says 'profile information', which is vague. For a simple tool, this is insufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one parameter clearly described in the schema. The description adds no extra meaning beyond what the schema already provides, so baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states it gets a user's profile information, which is clear but vague. It does not differentiate from sibling tools like get_user_tweets or get_followers, which also relate to user data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, context, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_user_tweetsB
Fetch tweets from a specific user
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | Twitter username (without @) | |
| count | No | Number of tweets to fetch (1-200) | |
| includeReplies | No | Include replies in results | |
| includeRetweets | No | Include retweets in results |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, but the description only says 'Fetch tweets'. It does not disclose rate limits, pagination behavior, sorting order, or whether the tool respects privacy settings. Adds minimal behavioral context beyond the name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no excess words. Perfectly concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, and description lacks details on return format, error handling, or limitations (e.g., max tweets beyond count). For a tool with 4 params and moderate complexity, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema covers 100% of parameters with descriptions. The tool description adds no extra info beyond the schema, so a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Fetch tweets from a specific user', which is a specific verb-resource pair. It disambiguates from sibling tools like search_tweets (keyword search) and get_tweet_by_id (single tweet).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives. The description implies fetching all tweets of a user, but does not mention exclusions or when to prefer follow_user, get_followers, etc.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grok_chatB
Chat with Grok via Twitter
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Message to send to Grok | |
| conversationId | No | Optional conversation ID for continuing a conversation | |
| returnSearchResults | No | Whether to return search results | |
| returnCitations | No | Whether to return citations |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclosure behavioral traits, but it only states 'Chat with Grok via Twitter' without mentioning authentication, side effects, or the nature of the interaction (e.g., AI response).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that is front-loaded and efficient. While it is not verbose, it could include slightly more context without sacrificing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a chat tool with no output schema or annotations, the description is too sparse. It does not explain how conversationId, returnSearchResults, or returnCitations work, leaving the agent with insufficient information to use the tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so parameters are already fully documented in the input schema. The description adds no additional meaning beyond what the schema provides, earning a baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Chat with Grok via Twitter' clearly specifies the action (chat) and the resource (Grok), distinguishing it from sibling tools that focus on Twitter-centric actions like sending tweets or searching.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives (e.g., send_tweet, search_tweets). There is no mention of prerequisites or appropriate contexts.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
health_checkA
Check the health of the Twitter MCP server
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states 'check the health' without explaining what constitutes health, whether the tool is read-only, what the response contains, or if it has any side effects. This is insufficient for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, consisting of one short sentence. It is front-loaded and easy to parse, but could benefit from slightly more detail without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no parameters, no output schema, and a simple purpose, the description is adequate but not fully complete. It does not explain what the health check entails or what the output indicates, which is important for a diagnostic tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, so schema description coverage is 100% (empty). The description adds no parameter info, but none is needed. Baseline 4 is appropriate for zero parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Check the health of the Twitter MCP server'. It uses a specific verb ('check') and resource ('health'), and is unambiguous. No sibling tool serves a similar purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool vs alternatives. However, given it's the only health check tool, usage is implied: use before other operations to verify server status. No exclusions or alternatives mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
like_tweetC
Like a tweet
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Tweet ID to like |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses that the tool performs a 'like' action (a write operation), but with no annotations, it fails to mention authentication needs, idempotency, side effects, or errors.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, but it is too brief; it could include more information without losing conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema or annotations, the description lacks sufficient completeness, e.g., whether liking is idempotent or requires specific permissions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers the only parameter (id) with a description, and the tool description adds no extra meaning. Baseline of 3 is appropriate given 100% schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description 'Like a tweet' is a tautology of the tool name 'like_tweet', restating the same verb and resource without adding clarity or differentiation from sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like retweet or quote_tweet, nor any exclusions or context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
quote_tweetC
Quote a tweet
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Quote content (max 280 characters) | |
| quotedTweetId | Yes | ID of tweet to quote | |
| media | No | Media attachments (optional, max 4 images or 1 video) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It only states the action but does not disclose any behavioral traits such as authentication requirements, rate limits, or effects (e.g., creating a new tweet).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the action. It is concise but may be too terse for an agent unfamiliar with Twitter's quoting feature.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of output schema and lack of explanation about return values or error conditions, the description is incomplete. It does not address what the tool returns or how to use the parameters effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for each parameter. The description adds no extra meaning beyond what the schema provides, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Quote a tweet' clearly states the action and the resource (tweet). It distinguishes from siblings like 'retweet' (which doesn't add text) and 'send_tweet' (new tweet), but does not elaborate on what quoting entails.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like retweet or send_tweet. The description does not mention any prerequisites or context for quoting.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
retweetB
Retweet a tweet
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Tweet ID to retweet |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description only says 'retweet' with no disclosure of side effects (e.g., changes to retweet count, like counts) or authentication requirements. Minimal transparency for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no unnecessary words. Front-loaded with the action and resource. Every word adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple 1-param tool without output schema or nested objects, the description is minimally adequate but lacks context on limits, side effects, or expected behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers 100% of parameters (id is described as 'Tweet ID to retweet'). Description adds no extra meaning beyond the schema, so baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Retweet a tweet' clearly states the verb (retweet) and resource (a tweet). It distinguishes from sibling tools like 'like_tweet' or 'quote_tweet', though it could explicitly clarify it's a simple retweet without comment.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use retweet vs alternatives like quote_tweet or send_tweet. No mention of prerequisites or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_tweetsC
Search for tweets by keyword
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query | |
| count | No | Number of tweets to return (10-100) | |
| searchMode | No | Search mode: Top, Latest, Photos, or Videos | Top |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must carry full burden. It only states 'Search for tweets by keyword' and omits behavioral traits like rate limits, return format, pagination, or that it returns a list.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no extraneous information. Could be slightly more informative but remains concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 3 parameters, no output schema, and no annotations, the description is too brief. It lacks details on return structure, pagination, and default behavior beyond schema fields.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so description adds no extra meaning. The description merely restates 'keyword' for the query parameter, which is already described in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Search for tweets by keyword', specifying a verb and resource. It distinguishes from sibling tools like get_user_tweets and get_tweet_by_id by implying a global search scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives (e.g., get_user_tweets for user-specific tweets, get_tweet_by_id for single tweet). No mention of prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_tweetC
Post a new tweet
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Tweet content (max 280 characters) | |
| replyToTweetId | No | ID of tweet to reply to (optional) | |
| media | No | Media attachments (optional, max 4 images or 1 video) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility for behavioral disclosure. It only states 'post' (implying creation), but omits details like authentication needs, rate limits, or idempotency. This is insufficient for a write operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at 4 words, with no redundancy. However, it sacrifices some clarity and completeness; a single additional sentence could improve value without harming conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 3 parameters, no output schema, and no annotations, the description is too minimal. It fails to cover return values, error conditions, or prerequisites (e.g., authentication), leaving the agent underinformed for a nontrivial operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds no extra meaning beyond the schema; it does not clarify parameter usage or constraints like the 280-character limit for text (already in schema).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the action ('Post a new tweet'), using a specific verb and resource. It distinguishes from siblings like quote_tweet, retweet, and send_tweet_with_poll by focusing on creating a new standalone tweet, but does not explicitly differentiate itself.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives like send_tweet_with_poll or quote_tweet. The description lacks any context for selection, which is a significant gap given the many sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_tweet_with_pollC
Post a tweet with a poll
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Tweet content (max 280 characters) | |
| replyToTweetId | No | ID of tweet to reply to (optional) | |
| poll | Yes | Poll configuration |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits such as authentication requirements, rate limits, side effects, or limitations. It only repeats the basic function without adding depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence. It is front-loaded and efficient, though it could be slightly more informative without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema, the complexity of the nested poll object, and the lack of behavioral information, the description is insufficient for an agent to fully understand the tool's behavior and return value. Important context is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage for all parameters. The description does not add any additional meaning beyond what the schema already provides. Thus, baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action 'Post a tweet' and the distinguishing feature 'with a poll'. It is specific about the resource and action, but does not explicitly contrast with the sibling tool 'send_tweet' which lacks a poll.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives like 'send_tweet' or 'quote_tweet'. There are no explicit conditions, prerequisites, or exclusions mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
14 tool updates
- First observed
follow_user - First observed
get_followers - First observed
get_following - First observed
get_tweet_by_id - First observed
get_user_profile - First observed
get_user_tweets - First observed
grok_chat - First observed
health_check - First observed
like_tweet - First observed
quote_tweet - First observed
retweet - First observed
search_tweets - First observed
send_tweet - First observed
send_tweet_with_poll
TDQS
Scored across 14 tools
Every tool has a clearly distinct purpose with no ambiguity. Each tool targets a specific Twitter action (like, retweet, quote, follow) or data retrieval operation (get followers, get tweets, search), and the descriptions make their unique functions immediately apparent. There is no overlap that would cause confusion or misselection.
The naming is mostly consistent with a clear verb_noun pattern (e.g., follow_user, get_followers, like_tweet), but there are minor deviations. For example, 'grok_chat' and 'health_check' follow the pattern but stand out as non-core Twitter actions, and 'send_tweet' and 'send_tweet_with_poll' could be more aligned (e.g., 'post_tweet'). Overall, the naming is readable and predictable.
With 14 tools, this is well-scoped for a Twitter client server, covering core social media interactions and data access. Each tool earns its place by addressing a specific need, such as posting, liking, searching, or retrieving user information, without being overly bloated or too sparse for the domain.
The tool set provides comprehensive coverage for Twitter operations, including CRUD-like actions (send, like, retweet) and data retrieval (get tweets, search, profile). Minor gaps exist, such as no tools for deleting tweets, managing lists, or handling direct messages, but agents can work around these with the available tools for core workflows.
Maintenance
Related MCP Connectors
X (Twitter) data for AI agents: tweets, profiles, followers, search, trends + social listening.
X (formerly Twitter) posts, profiles, and search for AI agents. Free key, self-minted, no signup.
Twitter/X read-only MCP server — 12 tools: search, users, tweets, followers, timelines, trends.
Twitter (X) API alternative for AI agents: tweet search, profiles, followers. $0.0002 per result.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI to interact with Twitter, allowing functions like searching tweets, comparing sentiments across accounts, and retrieving timeline content.MIT
- AlicenseNot gradedqualityDmaintenanceA 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.8 npm11MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with Twitter functionality using cookie-based authentication, allowing for timeline access, tweet management, user information retrieval, and search capabilities.16-
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that enables programmatic interaction with Twitter API, allowing users to post tweets, search for content, and retrieve user timelines through standardized MCP tools.11 npmMIT