agent-twitter-client-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-twitter-client-mcppost a tweet: Hello world from AI!"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agent-twitter-client-mcp
A Model Context Protocol (MCP) server that integrates with Twitter using the agent-twitter-client package, allowing AI models to interact with Twitter without direct API access.
Features
Authentication Options:
Cookie-based authentication (recommended)
Username/password authentication
Twitter API v2 credentials
Tweet Operations:
Fetch tweets from users
Get specific tweets by ID
Search tweets
Send tweets with text and media
Create polls
Like, retweet, and quote tweets
User Operations:
Get user profiles
Follow users
Get followers and following lists
Grok Integration:
Chat with Grok via Twitter's interface
Continue conversations with conversation IDs
Get web search results and citations
Access Twitter's real-time data through Grok
Note: Grok functionality requires agent-twitter-client v0.0.19 or higher
Related MCP server: Twitter/X MCP Server
Documentation
Developer Guide - Comprehensive guide for developers
Testing Guide - Instructions for testing the MCP
Agent Guide - Guide for AI agents on how to use the Twitter MCP
Contributing Guide - Guidelines for contributing to this project
Changelog - History of changes to this project
Demo README - Guide for running the demo scripts
Grok Examples - Documentation for the Grok AI integration examples
Quick Start
Installation
# Install globally
npm install -g agent-twitter-client-mcp
# Or install locally
npm install agent-twitter-client-mcpBasic Usage
Create a
.envfile with your Twitter credentials (see Authentication Methods)Run the MCP server:
# If installed globally
agent-twitter-client-mcp
# If installed locally
npx agent-twitter-client-mcpDemo Scripts
The package includes a demo directory with example scripts that demonstrate various features:
# 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-clientSee the Demo README for more details.
Port Configuration
By default, the MCP server runs on port 3000. If you need to change this (for example, if you already have an application running on port 3000), you have several options:
Option 1: Using Environment Variables
Set the PORT environment variable:
PORT=3001 npx agent-twitter-client-mcpOption 2: Using Docker Compose
If using Docker Compose, you can configure both the host and container ports in your .env file:
# .env file
MCP_HOST_PORT=3001 # The port on your host machine
MCP_CONTAINER_PORT=3000 # The port inside the containerThen run:
docker-compose up -dThis will map port 3001 on your host to port 3000 in the container, allowing you to access the MCP at http://localhost:3001 while your other application continues to use port 3000.
Setup with Claude Desktop
Configure Claude Desktop to use this MCP by adding to your config file:
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\"]"
}
}
}
}Restart Claude Desktop
Authentication Methods
Cookie Authentication (Recommended)
{
"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\"]"
}To obtain cookies:
Log in to Twitter in your browser
Open Developer Tools (F12)
Go to the Application tab > Cookies
Copy the values of
auth_token,ct0, andtwidcookiesMake sure to include the
Domain=.twitter.compart for each cookie
Username/Password Authentication
{
"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 Authentication
{
"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"
}Available Tools
get_user_tweets: Fetch tweets from a specific userget_tweet_by_id: Fetch a specific tweet by IDsearch_tweets: Search for tweetssend_tweet: Post a new tweetsend_tweet_with_poll: Post a tweet with a polllike_tweet: Like a tweetretweet: Retweet a tweetquote_tweet: Quote a tweetget_user_profile: Get a user's profilefollow_user: Follow a userget_followers: Get a user's followersget_following: Get users a user is followinggrok_chat: Chat with Grok via Twitterhealth_check: Check the health of the Twitter MCP server
Testing Interface
The MCP includes an interactive command-line interface for testing:
npx agent-twitter-client-mcp-test
# or if installed locally
npm run test:interfaceThis launches a REPL where you can test various MCP functions:
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 interfaceExample Test Commands
# 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 termsExample Usage
Ask Claude to:
"Search Twitter for tweets about AI"
"Post a tweet saying 'Hello from Claude!'"
"Get the latest tweets from @OpenAI"
"Chat with Grok about quantum computing"
Advanced Usage
Working with Media
To post a tweet with an image:
I want to post a tweet with an image. The tweet should say "Beautiful sunset today!" and include this image.To post a tweet with a video:
I want to post a tweet with a video. The tweet should say "Check out this amazing video!" and include the video file.Creating Polls
To create a poll:
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.Interacting with Grok
To have a conversation with Grok:
Use Grok to explain quantum computing to me. Ask it to include some real-world applications.To continue a conversation with Grok:
Continue the Grok conversation and ask it to elaborate on quantum entanglement.Grok's Unique Capabilities
Grok on Twitter has access to real-time Twitter data that even the standalone Grok API doesn't have. This means you can ask Grok about:
Current trending topics on Twitter
Analysis of recent tweets on specific subjects
Information about Twitter users and their content
Real-time events being discussed on the platform
Example queries:
"What are the trending topics on Twitter right now?"
"Analyze the sentiment around AI on Twitter"
"What are people saying about the latest Apple event?"
"Show me information about popular memecoins being discussed today"
Grok Authentication Requirements
Grok functionality requires proper authentication. The MCP supports two methods:
Cookie Authentication (Recommended):
Cookies must be in JSON array format
Example:
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"]Essential cookies are
auth_token,ct0, andtwid
Username/Password Authentication:
Set
TWITTER_USERNAMEandTWITTER_PASSWORDin your environmentMay encounter Cloudflare protection in some cases
Grok Rate Limits
Grok has rate limits that may affect usage:
Non-premium accounts: 25 messages per 2 hours
Premium accounts: Higher limits
The MCP will return rate limit information in the response when limits are reached.
For more details on using Grok, see the Grok Examples documentation.
Troubleshooting
Authentication Issues
Cookie Authentication Problems
If you're experiencing issues with cookie authentication:
Cookie Expiration: Twitter cookies typically expire after a certain period. Try refreshing your cookies by logging out and back into Twitter.
Cookie Format: Ensure your cookies are properly formatted as a JSON array of strings with the correct domain.
Required Cookies: Make sure you've included the essential cookies:
auth_token,ct0, andtwid.
Example of properly formatted cookies:
"TWITTER_COOKIES": "[\"auth_token=1234567890abcdef; Domain=.twitter.com\", \"ct0=abcdef1234567890; Domain=.twitter.com\", \"twid=u%3D1234567890; Domain=.twitter.com\"]"Credential Authentication Problems
If you're having trouble with username/password authentication:
Two-Factor Authentication: If your account has 2FA enabled, you'll need to provide the
TWITTER_2FA_SECRET.Account Lockouts: Too many failed login attempts may lock your account. Check your email for account verification requests.
Captcha Challenges: Twitter may present captcha challenges that the client can't handle automatically.
API Authentication Problems
For API authentication issues:
API Key Permissions: Ensure your API keys have the necessary permissions for the actions you're trying to perform.
Rate Limiting: Twitter API has rate limits that may cause failures if exceeded.
API Changes: Twitter occasionally changes its API, which may cause compatibility issues.
Operation Errors
Tweet Posting Failures
If you can't post tweets:
Content Restrictions: Twitter may block tweets that violate its content policies.
Media Format Issues: Ensure media is properly formatted and encoded.
Rate Limiting: Twitter limits how frequently you can post.
Search Problems
If search isn't working:
Query Syntax: Ensure your search query follows Twitter's search syntax.
Search Limitations: Some search modes may have restrictions or require specific permissions.
Grok Issues
If Grok functionality isn't working:
Version Requirement:
Grok requires agent-twitter-client v0.0.19 or higher
The current package uses v0.0.18 for basic functionality
For the demo scripts, use the
--use-local-agent-twitter-clientflag to temporarily install v0.0.19
Authentication Issues:
Cookie Format: Ensure cookies are in the correct JSON array format
Cookie Validity: Twitter cookies expire after a certain period
Cloudflare Protection: Username/password authentication may be blocked by Cloudflare
Premium Requirement: Grok access requires a Twitter Premium subscription
Rate Limits:
Non-premium accounts: 25 messages per 2 hours
Error Message: "Rate Limited: You've reached the limit..."
Solution: Wait until the rate limit resets or upgrade to a premium account
Environment File Location:
For the demo scripts, make sure your credentials are in
demo/.env, not in the root.envfileUse the
--debug-envflag to check which environment variables are being loaded
For detailed troubleshooting of Grok issues, see the Grok Examples documentation.
Server Issues
Health Check
Use the health_check tool to diagnose server issues:
Run a health check on the agent-twitter-client-mcp server to diagnose any issues.The health check will report on:
Authentication status
API connectivity
Memory usage
Logging
The server logs to both console and files:
error.log: Contains error-level messagescombined.log: Contains all log messages
Check these logs for detailed error information.
Development
Prerequisites
Node.js 18+
npm
Setup
Clone the repository
git clone https://github.com/ryanmac/agent-twitter-client-mcp.git
cd agent-twitter-client-mcpInstall dependencies
npm installCreate a
.envfile with configuration:
AUTH_METHOD=cookies
TWITTER_COOKIES=["cookie1=value1", "cookie2=value2"]Build the project
npm run buildStart the server
npm startEnvironment Variables
In addition to the authentication variables, you can set:
LOG_LEVEL: Set logging level (error, warn, info, debug)NODE_ENV: Set environment (development, production)
Docker
You can also run the server using Docker:
Using Docker Directly
# 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-mcpUsing Docker Compose
Create a
.envfile with your Twitter credentialsRun with docker-compose:
# Start the service
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the service
docker-compose downEnvironment Variables in Docker
You can pass environment variables to the Docker container in several ways:
In the docker-compose.yml file (already configured)
Through a .env file (recommended for docker-compose)
Directly in the docker run command (as shown above)
Persisting Logs
The docker-compose configuration includes a volume mount for logs:
volumes:
- ./logs:/app/logsThis will store logs in a logs directory in your project folder.
Security Considerations
Credential Storage: Store credentials securely, preferably using environment variables or a secure vault.
Rate Limiting: Implement rate limiting to prevent abuse of the Twitter API.
Content Validation: Validate all content before posting to prevent malicious use.
License
MIT
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.
TDQS
Each tool targets a distinct action or resource: user relationships, tweet retrieval, tweet actions, chat, and health check. There is no obvious overlap between tools.
All tools use a consistent verb_noun pattern in snake_case (e.g., follow_user, get_tweet_by_id, send_tweet_with_poll). The naming is predictable and clear.
14 tools cover core Twitter operations (tweets, users, search, likes, retweets, polls) plus a health check and chat. The scope is well-balanced for a Twitter client.
The tool set covers essential read and write operations but lacks common actions like delete tweet, unlike, unfollow, or direct messaging. These gaps could hinder some workflows.
Maintenance
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
X (formerly Twitter) posts, profiles, and search for AI agents. Free key, self-minted, no signup.
Twitter: Access real-time Twitter/X data as soon as it's posted! With the Twitter/X AIO API, you.
X / Twitter public post, comment, reply, user, and search tools.
Twitter (X) API alternative for AI agents: tweet search, profiles, followers. $0.0002 per result.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLM agents to interact with Twitter (X) for searching tweets, posting content with images, analyzing engagement, and extracting topics using the Twitter API.
- FlicenseNot gradedqualityNot gradedmaintenanceConnects AI assistants to Twitter/X using cookie-based authentication to read timelines, search tweets, and perform actions like posting and liking. It leverages Twitter's internal GraphQL API to provide full functionality without requiring a developer account.25
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with X (Twitter) API v2 for posting tweets, searching, liking, retweeting, and more through natural language.MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Twitter/X using session cookies. Supports posting, searching, managing tweets, viewing trends, and user profiles.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/theo-nash/twitter-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server