Skip to main content
Glama
afikrim

x-mcp-server

by afikrim

x-mcp-server

An MCP server that scrapes public content from X (formerly Twitter) using a stealth Patchright browser, exposed over FastMCP. Designed to run with uvx, so any MCP client can launch it with zero local setup.

Inspired by stickerdaniel/linkedin-mcp-server.

Disclaimer: This is an independent, community project. It is not affiliated with, authorized by, endorsed by, or sponsored by X Corp. "X" and "Twitter" are trademarks of X Corp, used here only descriptively to identify the third-party service this software interoperates with.

Why a browser instead of the API

X's official API is expensive and heavily gated. This server drives a real, undetected Chrome session via Patchright and reads the rendered page, so it works with a normal logged-in account. Selectors target X's stable data-testid attributes and will need occasional maintenance as the UI changes.

Related MCP server: Xee-mcp

Tools

Tool

Description

get_profile(username)

Display name, bio, location, website, join date, follower/following counts.

get_user_tweets(username, limit=20)

A user's most recent posts from their timeline.

get_tweet(url_or_id)

A single post by URL or numeric status id.

search_tweets(query, limit=20, latest=True)

Search across X; supports operators like from:, min_faves:, #tag.

check_auth()

Diagnose whether the session is logged in.

login(timeout_seconds=180)

Open a visible browser and sign in interactively; persists the session.

login_with_credentials()

Best-effort automated DOM login from X_USERNAME/X_PASSWORD (no 2FA).

post_tweet(text)

Publish a post from the logged-in account.

reply_to_tweet(url_or_id, text)

Reply to an existing post.

like_tweet(url_or_id)

Like a post.

follow_user(username)

Follow a user from their profile.

Handles may be passed as @name, name, or a full https://x.com/name URL. Write tools require an authenticated session (run login or set X_AUTH_TOKEN). See docs/RESEARCH.md for the reverse-engineered login/post HTTP flow behind a future browserless implementation.

Roadmap

The current scope is intentionally minimal: sign in and start posting. Everything below is a TODO, modelled on the capabilities of stickerdaniel/linkedin-mcp-server (the project that inspired this one) and adapted to X.

Near-term (the current focus)

  • Interactive sign-in — the login tool opens a browser for manual auth and persists the session (run with X_HEADLESS=false). Cookie auth still works.

  • post_tweet(text) — publish a post from the logged-in account.

Scaffolded but not yet validated against live X — selectors and the compose DOM drift. Verify with a real session before trusting output.

Write actions (X-native, inspired by connect_with_person / send_message)

  • reply_to_tweet

  • quote_tweet

  • like_tweet

  • repost

  • delete_tweet

  • follow_user

  • unfollow

  • send_dm, get_inbox, get_conversation, search_conversations (mirrors LinkedIn's messaging tools)

Read actions

  • get_my_profile — the authenticated user's own profile (get_my_profile).

  • get_home_timeline — the logged-in home feed (get_feed).

  • search_users — people search (search_people).

  • get_who_to_follow — recommended accounts (get_sidebar_profiles).

Session & tooling

  • close_session tool to terminate the browser and clean up.

  • Streamable HTTP transport in addition to stdio.

  • Claude Desktop one-click .mcpb bundle.

  • Secure credential storage via the system keyring.

Authentication

Most X content requires a logged-in session. Two options:

uv run mcp-server-x --login

This opens a browser where you sign in manually (handles 2FA and challenges). The session is saved to X_USER_DATA_DIR (default: ~/.x-mcp/profile) and reused on all future runs — no cookie management needed.

Option 2: Manual session cookies

Set environment variables in .env (copy from .env.example):

X_AUTH_TOKEN=...   # the `auth_token` cookie from x.com
X_CSRF_TOKEN=...   # the `ct0` cookie (optional but recommended)

To grab them: log in to x.com, open DevTools → Application → Cookies → https://x.com, and copy auth_token and ct0.

Verify authentication

uv run mcp-server-x --check-auth

Clear the saved session

uv run mcp-server-x --logout

Run

Published as mcp-server-xuvx runs it without a local install:

# one-time interactive login (opens a browser, saves the session)
uvx mcp-server-x --login

# then run the server
uvx mcp-server-x

Pin a version for reproducibility, e.g. uvx mcp-server-x@0.2.2.

With uvx, straight from GitHub

To run an unreleased commit, point uvx at the repo instead:

uvx --from git+https://github.com/afikrim/x-mcp-server.git mcp-server-x --login
uvx --from git+https://github.com/afikrim/x-mcp-server.git mcp-server-x

Pin a tag or commit for reproducibility, e.g. git+https://github.com/afikrim/x-mcp-server.git@v0.2.2.

The Chromium browser is auto-provisioned on first launch if it isn't already present, so there's no separate patchright install step. (It downloads ~150MB once into the Patchright browser cache.)

Install into an MCP client (automatic)

--install writes the config for you, merging into the client's existing servers (it never clobbers other entries) and using each client's own CLI when available:

uvx mcp-server-x --install claude-desktop
uvx mcp-server-x --install claude-code
uvx mcp-server-x --install codex
uvx mcp-server-x --install opencode

Client

Config written

claude-desktop

claude_desktop_config.json (platform-specific path)

claude-code

claude mcp add-json (user scope), else ~/.claude.json

codex

codex mcp add, else ~/.codex/config.toml

opencode

~/.config/opencode/opencode.json

Restart the client afterward. Run --login once (see above) so the session exists before the client first calls a tool.

MCP client config (manual)

If you'd rather configure by hand:

{
  "mcpServers": {
    "mcp-server-x": {
      "command": "uvx",
      "args": ["mcp-server-x"]
    }
  }
}

No env block is needed once you've run --login — the session is read from ~/.x-mcp/profile. (You can still pass X_AUTH_TOKEN / X_CSRF_TOKEN instead.)

Local development

uv sync
uv run patchright install chromium

# Option 1: Interactive login (saves session for future runs)
uv run mcp-server-x --login

# Option 2: Run the server (with X_AUTH_TOKEN/X_CSRF_TOKEN from .env)
uv run mcp-server-x

# Check auth status
uv run mcp-server-x --check-auth

# Clear the saved session
uv run mcp-server-x --logout

CLI flags:

  • --login — Open browser for interactive sign-in, save session.

  • --logout — Clear the saved browser profile.

  • --check-auth — Check if the session is authenticated and exit.

  • --install {claude-desktop,claude-code,codex,opencode} — Register the server in a client's config and exit.

  • --no-headless — Show the browser window (useful for debugging login).

  • --log-level {DEBUG,INFO,WARNING,ERROR} — Set verbosity (default: INFO).

Docker

docker build -t x-mcp-server .
docker run --rm -i -e X_AUTH_TOKEN=... -e X_CSRF_TOKEN=... x-mcp-server

Configuration

All settings are environment variables (prefix X_). See .env.example for the full list: X_HEADLESS, X_USER_DATA_DIR, X_BROWSER_CHANNEL, X_NAV_TIMEOUT_MS, X_LOG_LEVEL.

Contributing

Contributions welcome — see CONTRIBUTING.md for setup, conventions (notably: data-testid selectors only, browser-driven not API), and the current feature status.

Disclaimer & responsible use

This tool is for personal and research use only, and comes with no warranty of any kind. Use it in accordance with X's Terms of Service.

Is this safe? Will I get banned?

This server controls a real, logged-in browser session — it does not exploit undocumented APIs or bypass authentication. That said, X's Terms of Service prohibit scraping and automated access without prior consent, and accounts using automated tools can be rate-limited, restricted, or banned. There is no guarantee of account safety. Use at your own risk, and prefer an account you can afford to lose.

Because the session is authenticated, you have agreed to X's terms — so the risk here is contractual (breach of the ToS) and operational (account action), not just abstract. See the LinkedIn precedent (hiQ v. LinkedIn) for how courts have treated authenticated scraping versus public-data scraping.

Keep volume sane

You are responsible for the volume of automation you run. Use it sparingly, keep pacing human-like, respect rate limits, and prompt your agents responsibly. Do not redistribute, resell, or build public datasets from the output.

For anything commercial or at scale

Use the official X API, or obtain written consent from X. The browser route is not defensible at scale — switch to a licensed path before you grow beyond personal use.

Credits

This project is directly inspired by stickerdaniel/linkedin-mcp-server by Daniel Sticker — a stealth-browser MCP server for LinkedIn. The architecture (Patchright + FastMCP, cookie/session auth, uvx distribution) and the Roadmap above follow its design. Go give it a star.

License

MIT — see LICENSE.

Available Tools

11 tools
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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It implies a read-only operation via 'report' and describes return type (dict with bools). However, it does not explicitly state safety (no side effects, no authentication required) or behavior under different session states. The return info is helpful, but additional behavioral context (e.g., 'does not modify session') would improve transparency for an agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences precisely communicate purpose, return values, and usage hint. No extraneous text, and key information is front-loaded. Every sentence adds value, meeting the 'earn its place' criterion.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given low complexity (no parameters, simple boolean check) and presence of an output schema (likely detailing the dict fields), the description sufficiently covers return values and purpose. The diagnostic hint further contextualizes usage. No gaps are apparent for an agent to correctly invoke this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has no parameters and coverage is trivially 100%. The description adds no parameter meaning, which is appropriate. Baseline score of 3 applies since the schema fully describes the absence of parameters and the description does not need to compensate further.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'report' and resource 'browser session logged in to X', clearly stating its function. It lists return fields ('authenticated', 'has_session_cookies'), making intent unambiguous. It distinguishes from sibling tools like 'login' and 'login_with_credentials' which perform authentication actions rather than diagnostics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description explicitly advises 'Use this to diagnose empty results', providing a clear use case. While it does not list exclusions or alternative tools, the fine-grained siblings (e.g., 'get_profile', 'get_tweet') are obviously different, and the diagnostic purpose is well communicated. A slightly stronger exclusion would clarify when not to use it, but the guidance is adequate for correct selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

follow_userA

Follow a user from their profile page.

ParametersJSON Schema
NameRequiredDescriptionDefault
usernameYesAn @handle, plain handle, or full profile URL.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idNoNumeric status id of the created/affected post, if resolvable.
okYesWhether the action completed successfully.
urlNoPermalink to the created/affected post, if any.
actionYesThe action that was attempted, e.g. 'post_tweet'.
messageNoHuman-readable detail about the outcome.

TDQS

A3.5/5.0
Behavior2/5

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 the action but gives no information about authentication requirements, idempotency, rate limits, reversal, or side effects. For a mutation tool, this is insufficient for an agent to understand the operational implications.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, making it concise, but it lacks structure or front-loading of essential information. It is appropriately sized for the tool's simplicity but could benefit from additional details like return behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no nested objects, output schema exists), the description is partially complete. It conveys the core purpose but omits behavioral context and return value details. Moderate completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema documents the single parameter 'username' with a clear description. The tool description adds no further semantic value beyond the schema, which already covers 100% of the parameter. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (follow) and the resource (a user) with an additional context ('from their profile page'). It distinguishes from sibling tools like like_tweet or get_profile, which have different purposes. Highly specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (on a profile page) but does not explicitly state when to use this tool over alternatives or when not to use it. It provides a clear hint about the appropriate context, earning a high score, but lacks explicit exclusions or alternative tool references.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_profileB

Fetch a user's public profile on X.

ParametersJSON Schema
NameRequiredDescriptionDefault
usernameYesAn @handle, plain handle, or full profile URL (e.g. "@jack", "jack", or "https://x.com/jack").

Output Schema

ParametersJSON Schema
NameRequiredDescription
bioNoProfile bio / description.
nameNoDisplay name.
handleYes@handle without the leading @.
joinedNoHuman-readable join date.
websiteNo
locationNo
verifiedNo
followers_countNo
following_countNo

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; the description does not disclose behavioral traits such as read-only nature, authentication requirements, or potential side effects. The user must infer that fetching a profile is a safe operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no wasted words. It is front-loaded and immediately tells the agent what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is brief and adequate for a simple fetch operation given the presence of an output schema. However, it lacks usage guidance and behavioral context, which reduces completeness for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the parameter 'username' is well-described with examples in the schema. The description adds no additional semantic value beyond what the schema provides, so baseline score applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Fetch a user's public profile on X.' It uses a specific verb ('Fetch') and resource ('user's public profile') and distinguishes from sibling tools that deal with tweets or authentication.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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 'get_user_tweets' or 'get_tweet'. The description does not mention context or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_tweetA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
url_or_idYesA full post URL (e.g. "https://x.com/jack/status/20") or the bare numeric status id.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idNoNumeric status id, if resolvable.
urlNoCanonical permalink to the post.
textNoThe post's text content.
created_atNoISO 8601 timestamp from the post.
like_countNo
view_countNo
author_nameNoDisplay name of the author.
reply_countNo
repost_countNo
author_handleNo@handle of the author.

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Only states 'Fetch a single post' without disclosing behavioral traits such as authentication requirements, rate limits, error handling, or idempotency. Minimal transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single, well-formed sentence with no unnecessary words. Front-loaded with purpose and clearly states input format.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so return values are documented. The tool is simple with one parameter and clear purpose, but lacks usage guidelines and behavioral transparency, leaving gaps for effective agent selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and description adds value by providing concrete examples (URL format e.g. 'https://x.com/jack/status/20') and clarifying that bare numeric id is acceptable. Enhances understanding beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Fetch', the resource 'single post', and the input 'URL or numeric status id'. It distinguishes from sibling tools like 'get_user_tweets' or 'search_tweets' which handle multiple posts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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. Missing exclusions or context for when to prefer other tools like 'get_user_tweets' or '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_tweetsB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of posts to return (1-100).
usernameYesAn @handle, plain handle, or full profile URL.

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and description does not disclose authentication requirements, whether retweets are included, rate limits, or any other behavioral traits beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded, and clear. Could include more behavioral context without significantly increasing length, but is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists but description lacks details on behavior like pagination, whether replies are included, and authentication needs. Adequate for a simple tool but incomplete for robust agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds no additional parameter meaning beyond what schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states verb (Fetch), resource (user's most recent posts), and scope (from profile timeline), distinguishing it from sibling tools like search_tweets, get_tweet, and post_tweet.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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 like search_tweets or get_tweet. Context must be inferred from name and description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

like_tweetA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
url_or_idYesA full post URL or the bare numeric status id.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idNoNumeric status id of the created/affected post, if resolvable.
okYesWhether the action completed successfully.
urlNoPermalink to the created/affected post, if any.
actionYesThe action that was attempted, e.g. 'post_tweet'.
messageNoHuman-readable detail about the outcome.

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry behavioral disclosure. It mentions the 'no-op if already liked' behavior, which is good, but does not cover authentication requirements, rate limits, or side effects. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no wasted words. It efficiently conveys the action, input, and key behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has one well-described parameter, an output schema (so return values are covered), and low complexity. The description is complete for the agent to understand and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the description adds no additional semantic information beyond what the schema already provides ('A full post URL or the bare numeric status id'). Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Like') and the resource ('a post'), with specific input methods (URL or status id). It distinguishes from sibling tools like post_tweet or reply_to_tweet by focusing on liking, and includes the idempotency behavior.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives, but the context of siblings and the clear action imply usage. Lacks explicit when-not or alternative recommendations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
timeout_secondsNoHow long to wait for sign-in to complete before giving up.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idNoNumeric status id of the created/affected post, if resolvable.
okYesWhether the action completed successfully.
urlNoPermalink to the created/affected post, if any.
actionYesThe action that was attempted, e.g. 'post_tweet'.
messageNoHuman-readable detail about the outcome.

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses that the browser is visible, waits for sign-in, and persists session; no annotations provided, so description carries the burden and does it well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two succinct sentences, front-loaded with purpose and followed by setup guidance; no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers key aspects: interactive nature, visibility, timeout, session persistence; output schema exists but its content is not visible; still sufficient for a login tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers parameter with clear description; the description adds context about session persistence but not additional semantics for the parameter itself.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool opens a visible browser and waits for interactive sign-in to X, distinguishing it from automated login methods like login_with_credentials.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to run server with X_HEADLESS=false and describes the interactive login process including 2FA, but does not explicitly contrast with login_with_credentials or state when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
idNoNumeric status id of the created/affected post, if resolvable.
okYesWhether the action completed successfully.
urlNoPermalink to the created/affected post, if any.
actionYesThe action that was attempted, e.g. 'post_tweet'.
messageNoHuman-readable detail about the outcome.

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses limitations (no 2FA, email confirmation, anti-bot handling), fragility, and DOM interaction. Could mention failure states, but return value description suffices.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences with no waste: purpose, method, limitations, alternative, return. Front-loaded with key info.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with an output schema, the description covers behavior, limitations, alternatives, and return value. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist; schema coverage is 100%. Baseline 4 applies as description adds no unnecessary param context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool attempts an automated DOM login using credentials, specifies it is fragile, and distinguishes from the preferred 'login' tool or session cookies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use (only for simple accounts without 2FA/anti-bot challenges) and recommends alternatives: 'Prefer ``login`` or session cookies.'

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

post_tweetB

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

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe post body. Standard accounts are capped at 280 characters.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idNoNumeric status id of the created/affected post, if resolvable.
okYesWhether the action completed successfully.
urlNoPermalink to the created/affected post, if any.
actionYesThe action that was attempted, e.g. 'post_tweet'.
messageNoHuman-readable detail about the outcome.

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description does not disclose behavioral traits such as rate limits, idempotency, or error cases. It implies authentication is needed but does not specify requirements or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence with no wasted words. It is appropriately concise and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is minimal for a social media posting tool. It does not cover authentication requirements, character limits for different account types, or potential error conditions. Output schema exists but additional context would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a clear description for the text parameter. The tool 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.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it publishes a new tweet from the authenticated account. The verb 'Publish' and resource 'tweet' are specific and distinguish it from siblings like reply_to_tweet.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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 reply_to_tweet or search_tweets. It does not mention prerequisites such as authentication or conditions for posting.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

reply_to_tweetB

Reply to an existing post.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe reply body (max 280 characters on standard accounts).
url_or_idYesA full post URL or the bare numeric status id to reply to.

Output Schema

ParametersJSON Schema
NameRequiredDescription
idNoNumeric status id of the created/affected post, if resolvable.
okYesWhether the action completed successfully.
urlNoPermalink to the created/affected post, if any.
actionYesThe action that was attempted, e.g. 'post_tweet'.
messageNoHuman-readable detail about the outcome.

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It does not disclose character limit (though in schema), rate limits, or error handling for non-existent tweets.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single, front-loaded sentence with no superfluous words. Efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite presence of output schema, the description lacks usage context, behavioral traits, and guidance on when to use this vs. 'post_tweet'. Minimal for a 2-param tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear parameter descriptions. The tool description adds no extra meaning beyond the schema, achieving baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'Reply to an existing post', distinguishing it from siblings like 'post_tweet' (new tweet) and 'like_tweet'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or when-not-to-use guidance; differentiation from 'post_tweet' is implicit. No prerequisites mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_tweetsB

Search X for posts matching a query.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of posts to return (1-100).
queryYesA search query. Supports X's search operators (e.g. 'from:jack', '#python', '"exact phrase"', 'min_faves:100').
latestNoIf true, use the "Latest" tab (chronological); otherwise "Top".

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full burden for behavioral disclosure. It only states 'Search X for posts matching a query', implying a read-only operation but omitting details about rate limits, authentication needs, or result structure. No explicit confirmation that it is non-destructive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single 6-word sentence that is front-loaded with the action and resource. No wasted words; every part contributes to understanding. Ideal conciseness for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema and three clear parameters, the description is minimally adequate. However, it lacks context about what 'posts' refers to (e.g., tweet objects), potential pagination, or search behavior nuances. An agent would need to infer specifics from the schema and tool name.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description itself does not add any parameter-specific meaning beyond what the schema already provides (e.g., limit, latest, query). The description's generic 'matching a query' is covered by the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'search', the resource 'X for posts', and the mechanism 'matching a query'. It is specific but does not explicitly differentiate from sibling tools like get_tweet or get_user_tweets, though the verb 'search' implies broad querying.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives (e.g., get_tweet for specific tweets, get_user_tweets for timeline posts). No context about prerequisites or when not to use it is provided.

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. Dates show when Glama detected each change.

  1. 11 tool updatesv0.2.2
    • First observedcheck_auth
    • First observedfollow_user
    • First observedget_profile
    • First observedget_tweet
    • First observedget_user_tweets
    • First observedlike_tweet
    • First observedlogin
    • First observedlogin_with_credentials
    • First observedpost_tweet
    • First observedreply_to_tweet
    • First observedsearch_tweets

TDQS

A3.8/5.0
Disambiguation5/5

Each tool targets a distinct action (check auth, follow, get profile, get tweet, get user tweets, like, login, login with credentials, post, reply, search). Even the two login tools are clearly differentiated by method (interactive vs automated). There is no ambiguity between tools.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., check_auth, get_profile, like_tweet, search_tweets). The only deviation is login_with_credentials, which is still a verb phrase and fits the pattern. No mixing of styles.

Tool Count5/5

With 11 tools, the server covers the essential operations for interacting with X (authentication, profile viewing, tweeting, searching, following, liking, replying). The count is well-scoped for this domain, neither too few nor too many.

Completeness4/5

The tool set covers core X workflows: authentication, profile and tweet retrieval, posting, replying, liking, following, and searching. However, notable gaps exist, such as no retweet, quote tweet, delete tweet, unfollow, or direct message support. These are common actions that agents may need, but the set is still functional for basic interactions.

Maintenance

ActivityStale
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to search X posts and read user timelines without API costs, using cookie authentication.
    2
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides programmatic X (Twitter) engagement via MCP, offering 24 tools for search, timelines, notifications, bookmarks, profiles, and tweet actions through a headless browser.
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    Enables AI agents to search, read user profiles, timelines, media, follow threads, track trends, and manage accounts on X/Twitter via GraphQL, without browser automation or paid API keys.
    100
    10
    MIT

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