Skip to main content
Glama
afikrim

x-mcp-server

by afikrim

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
X_HEADLESSNoSet to 'false' to run the browser visibly (e.g., for interactive login). Default is 'true'.
X_LOG_LEVELNoLogging level (e.g., 'DEBUG', 'INFO'). Default is 'INFO'.
X_AUTH_TOKENYesThe `auth_token` cookie from x.com. Required for authentication.
X_CSRF_TOKENNoThe `ct0` cookie from x.com. Optional but recommended.
X_USER_DATA_DIRNoPath to a directory to persist browser session data. Used for interactive login.
X_NAV_TIMEOUT_MSNoNavigation timeout in milliseconds. Default is 30000.
X_BROWSER_CHANNELNoBrowser channel to use (e.g., 'chromium', 'chrome'). Default is 'chromium'.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_profileB

Fetch a user's public profile on X.

get_user_tweetsB

Fetch a user's most recent posts from their profile timeline.

get_tweetA

Fetch a single post by its URL or numeric status id.

search_tweetsB

Search X for posts matching a query.

loginA

Open a visible browser and wait for you to sign in to X interactively.

Run the server with X_HEADLESS=false so the window is visible, call this tool, complete the login (including any 2FA / email step) in the browser, and the session is persisted to the on-disk profile for all later calls.

login_with_credentialsA

Attempt an automated DOM login using X_USERNAME / X_PASSWORD (fragile).

This types the configured credentials into the login form. It does NOT handle 2FA, email confirmation, or the anti-bot challenges X frequently injects, so it only works for simple accounts. Prefer login or session cookies.

Returns: ActionResult describing whether the session ended up authenticated.

post_tweetB

Publish a new post (tweet) from the authenticated account.

reply_to_tweetB

Reply to an existing post.

like_tweetA

Like a post by URL or status id (no-op if already liked).

follow_userA

Follow a user from their profile page.

check_authA

Report whether the browser session is logged in to X.

Returns a dict with 'authenticated' (bool) and 'has_session_cookies' (whether X_AUTH_TOKEN was supplied). Use this to diagnose empty results.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

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

curl -X GET 'https://glama.ai/api/mcp/v1/servers/afikrim/x-mcp-server'

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