surfagent-x
OfficialClick on "Deploy 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., "@surfagent-x search X for 'MCP servers'"
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.
surfagent-x
X adapter for SurfAgent.
This adapter gives AI agents X-native verbs for navigation, extraction, posting, replies, likes, reposts, proof-first task execution, recovery, and deeper research workflows.
What this adapter is for
Use surfagent-x when you need reliable X workflows like:
opening key X surfaces
checking route-specific state
extracting timelines, profiles, communities, posts, and threads
creating posts and replies
liking posts
running X-specific recovery flows
doing broader topic or community research with receipts
Related MCP server: Spectre
Why this exists
X is not a generic website.
It has:
route-specific UI states
React-sensitive composer behavior
flaky button-state signals
community-specific flows
delayed state settlement after actions
So this adapter wraps X-specific navigation, action, verification, and recovery into dedicated tools.
It also now bakes in some hard-won X lessons:
account switching uses a trust hierarchy instead of one weak extraction pass
flaky switcher or composer states can trigger visual snapshot escalation
composer flows auto-recover with real typing when text appears present but X still keeps submit disabled
built-in state maps help agents reason about switcher, composer, and community surfaces faster
Core tool groups
Health and setup
x_health_checkx_open
Navigation and state
x_get_statex_get_state_mapx_open_homex_open_profilex_open_notificationsx_open_searchx_open_post
Timeline and search
x_get_timelinex_search_postsx_open_communityx_search_communitiesx_search_profilesx_get_community_feedx_extract_communityx_extract_postx_extract_profilex_get_profile_postsx_get_post_thread
Actions
x_get_composer_statex_create_postx_reply_to_postx_like_postx_repost_postx_follow_profilex_engage_post_taskx_quote_post_taskx_verify_text_visiblex_recover
Autonomous research
x_research_topicx_map_community
Receipts and saved runs
Autonomous research tools can optionally save bundles to disk.
Default output path:
~/.surfagent/receipts/x-research
Saved runs can include:
bundle.jsonsummary.jsonreceipts.jsonper-dataset JSON files
SUMMARY.md
How to use it
Run this adapter alongside the base SurfAgent MCP.
{
"mcpServers": {
"surfagent": {
"command": "npx",
"args": ["-y", "surfagent-mcp"]
},
"surfagent-x": {
"command": "npx",
"args": ["-y", "surfagent-x"]
}
}
}CLI task runner
For repeatable X actions, prefer the built-in deterministic task runner over a live improvised browser loop.
surfagent-x task engage-post --account reggiesurfagent --url https://x.com/surfagentapp/status/123 --repost
surfagent-x task quote-post --account solvingdilemma --url https://x.com/surfagentapp/status/123 --text "Real browser-native agents need proof, not vibes."Each task run writes a journal plus screenshots under:
${SURFAGENT_RUN_DIR:-$TMPDIR/surfagent-x-runs}
If you are new to SurfAgent, start here first:
https://github.com/surfagentapp/surfagent-docs/blob/main/docs/start-here.md
https://github.com/surfagentapp/surfagent-docs/blob/main/docs/mcp-server.md
https://github.com/surfagentapp/surfagent-docs/blob/main/docs/skills-and-adapters.md
When to use this vs skills vs raw MCP
use
surfagent-mcpfor raw browser controluse
surfagent-skillsfor workflow rules and operating disciplineuse
surfagent-xwhen you want reliable X-native verbs instead of rediscovering X every run
Environment variables
SURFAGENT_DAEMON_URLdefault:http://127.0.0.1:7201SURFAGENT_AUTH_TOKENoptional override, otherwise auto-detectedSURFAGENT_RUN_DIRoptional override for task-runner journals and screenshots
Status
Early, but already one of the more capable SurfAgent adapters.
Related repos
License
MIT
Available Tools
38 toolsx_community_post_taskB
Run a deterministic community-post task with membership check, screenshots, composer recovery, and feed verification.
Inputs: url (required), text (required), account (required), join.
x_create_postA
Create a new X post from the home composer with button-state verification and automatic real-typing fallback if X rejects the initial input.
Inputs: text (required).
x_engage_post_taskB
Run a deterministic engage-post task with account switch, screenshots, optional like/repost actions, and a persisted run journal.
Inputs: url (required), account (required), like, repost.
x_extract_communityC
Open a community and return structured community metadata, including name, description, member/post hints, and join state when visible.
Inputs: url (required).
x_extract_postB
Open a post and return a structured post record with author, text, media, and visible stats.
Inputs: url (required), tabId.
x_extract_profileB
Open a profile and return a structured profile record with bio, stats, and pinned post when visible.
Inputs: username (required), tabId.
x_follow_profileB
Follow an X profile and verify the resulting follow state from the active account.
Inputs: username (required), tabId.
x_follow_profile_taskB
Run a deterministic follow-profile task with account switching, screenshots, and profile-state verification.
Inputs: account (required), username (required).
x_get_accountsB
Inspect the active X account and any account-switcher entries currently visible.
Inputs: no named parameters.
x_get_community_feedA
Extract visible posts from the current or specified X community feed.
Inputs: url, limit.
x_get_composer_stateA
Inspect the current X composer state, including whether the Post/Reply button is enabled.
Inputs: no named parameters.
x_get_post_threadA
Open a post and extract the visible thread/timeline around it as structured post rows.
Inputs: url (required), limit, tabId.
x_get_profile_postsC
Open a profile and extract visible posts from that profile timeline.
Inputs: username (required), limit, tabId.
x_get_stateA
Get structured X page state for the current tab: route, page kind, selected tabs, composer state, and account info.
Inputs: no named parameters.
x_get_state_mapB
Return the built-in X state maps for flaky surfaces like account switcher, composer, community, home, post, and profile.
Inputs: surface.
x_get_timelineC
Extract the currently visible X timeline posts with author, text, status URL, and social action labels.
Inputs: limit.
x_health_checkA
Check whether X is open in SurfAgent, identify current X page state, and report composer/account readiness.
Inputs: no named parameters.
x_like_postB
Like a specific X post and verify resulting button state.
Inputs: url, tabId, postId, username.
x_map_communityB
Run an autonomous community mapping pass: open a community, extract feed rows, and profile a sample of visible participants.
Inputs: url (required), save, query, feedLimit, +2 more.
x_openB
Open X in SurfAgent. Optionally choose a starting section such as home, notifications, search, or a profile path.
Inputs: path.
x_open_communityB
Open an X community URL directly. Useful because community navigation has its own weird composer behavior.
Inputs: url (required).
x_open_homeB
Open the X home timeline and wait for a settled X page state.
Inputs: no named parameters.
x_open_notificationsB
Open X notifications.
Inputs: no named parameters.
x_open_postC
Open a specific X post by full URL or by username + status ID.
Inputs: url, tabId, postId, username.
x_open_profileC
Open a profile by username.
Inputs: username (required).
x_open_searchC
Open X search, optionally prefilled with a query and live filter.
Inputs: mode, query.
x_quote_post_taskB
Run a deterministic quote-post task with screenshots before and after submit, account switching, and profile-level verification.
Inputs: url (required), text (required), account (required), like.
x_recoverB
Apply lightweight X recovery actions for common stuck states: composer, home, or target URL.
Inputs: url, mode.
x_reply_post_taskB
Run a deterministic reply-post task with account switching, screenshots, and post-surface verification.
Inputs: url (required), text (required), account (required), like.
x_reply_to_postB
Reply to a specific post with pre-submit composer verification, automatic real-typing fallback, and post-submit visibility verification.
Inputs: text (required), url, tabId, postId, +1 more.
x_repost_postB
Repost a specific X post and verify the resulting repost state.
Inputs: url, tabId, postId, username.
x_research_topicB
Run an autonomous X research pass for a topic, with retries, receipts, post/thread/profile extraction, and community sampling.
Inputs: query (required), save, outputDir, postLimit, +3 more.
x_search_communitiesC
Search X communities and return community cards/links discovered on the search surface.
Inputs: query (required), limit.
x_search_postsC
Search X posts and return extracted live results from the search timeline.
Inputs: query (required), limit.
x_search_profilesC
Search X profiles and return discovered accounts with display names, handles, bios, and URLs.
Inputs: query (required), limit.
x_switch_accountA
Switch X accounts through the in-session account switcher and verify the resulting active account state.
Inputs: account (required).
x_switch_account_and_act_taskC
Run a deterministic account switch followed by a focused action like open-home, open-url, or follow-profile.
Inputs: action (required), account (required), url, username.
x_verify_text_visibleB
Verify that a specific text snippet is visible on X. Scope can target body, article content, or the active composer.
Inputs: text (required), scope.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 38 tools
Primitive actions and deterministic task wrappers overlap heavily (e.g., x_reply_to_post vs x_reply_post_task, x_follow_profile vs x_follow_profile_task, x_switch_account vs x_switch_account_and_act_task). Multiple post-reading tools also overlap (x_open_post, x_extract_post, x_get_post_thread). Descriptions help distinguish them, but an agent must read carefully to avoid misselection.
Tool names are consistently snake_case with an x_ prefix and generally follow a verb_noun pattern. Minor deviations exist: retrieval verbs mix get and extract, and some names are bare verbs or multi-word task names. The pattern is still predictable overall.
With 38 tools, the surface is heavy for a single-domain server. Many high-level task wrappers duplicate simpler primitives (reply, follow, switch-account), inflating the count beyond what the core X automation domain requires.
The set covers core X lifecycle operations: open, read, search, post, reply, like, repost, follow, communities, accounts, state, and health. Missing operations like delete post, unfollow, unlike, and direct messages are notable but agents can work around most core workflows.
Maintenance
Related MCP Connectors
X (formerly Twitter) posts, profiles, and search for AI agents. Free key, self-minted, no signup.
X/Twitter search, posts, comments, user profiles, user posts/replies and video transcripts.
Your agent posts, schedules, queues and threads posts on X, with a human approval queue.
Scrape X, Reddit, LinkedIn, GitHub, Instagram and TikTok data as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with Twitter/X through Playwright browser automation without requiring an official API key. It provides tools for posting content, searching tweets, reading feeds, and managing social interactions like follows and likes.4MIT
- AlicenseCqualityBmaintenanceEnables 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.113111 PyPI12MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to fully automate X/Twitter interactions including searching, posting, engaging, and managing multiple accounts without paid API keys.MIT
- AlicenseNot gradedqualityCmaintenanceProvides 19+ tools for AI agents to interact with X/Twitter, including search, posting, analysis, and monitoring capabilities.23 npm3MIT