x-search-plugin
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., "@x-search-pluginsearch for recent tweets about AI from the last 24 hours"
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.
X Search Plugin
MCP plugin for read-only X/Twitter research through xAI's Responses API
x_search tool. It is packaged for Codex and Claude Code, supports xAI OAuth
login for entitled X Premium, Premium+, and SuperGrok accounts, and falls back
to XAI_API_KEY when no usable stored OAuth credential is present.
This is not a browser scraper. The plugin calls https://api.x.ai/v1/responses
with xAI's server-side x_search tool and returns Grok's answer plus citations
when xAI provides them.
Copy-Paste Agent Prompt
Paste this into Codex or Claude Code to have the agent set up and verify the plugin for you:
Set up x-search-plugin from https://github.com/Ilevk/x-search-plugin for this machine.
Use uv. Prefer xAI OAuth, but if I already have XAI_API_KEY configured, use that as the fallback. Do not ask me to paste access tokens, refresh tokens, API keys, browser cookies, or credential file contents into chat.
Steps:
1. Clone or update the repository.
2. Register the x-search-plugin MCP server for the current agent client.
- Codex: use codex mcp add or the Codex plugin marketplace flow.
- Claude Code: use claude mcp add --transport stdio.
3. Run uv run --quiet --locked python scripts/x_search_auth.py status.
4. If no credential is configured, ask me to run uv run --quiet --locked python scripts/x_search_auth.py login locally.
5. Run uv run --quiet --locked python scripts/smoke_mcp.py.
6. Confirm the MCP tools are available, then try a read-only X search for recent posts from @Lo_gan__.
Keep this read-only. Do not post, like, follow, DM, or mutate any X account state.Related MCP server: X MCP Server
Quickstart for Codex
Prerequisites: uv, Codex CLI with MCP support, and either an xAI OAuth-entitled
X Premium, Premium+, or SuperGrok account, or XAI_API_KEY.
git clone git@github.com:Ilevk/x-search-plugin.git
cd x-search-plugin
codex mcp add x-search-plugin -- uv run --quiet --locked python "$PWD/scripts/x_search_mcp.py"
uv run --quiet --locked python scripts/x_search_auth.py login
uv run --quiet --locked python scripts/x_search_auth.py status
uv run --quiet --locked python scripts/smoke_mcp.pyFor API-key usage instead, skip OAuth and set XAI_API_KEY before starting
Codex:
export XAI_API_KEY="..."Open a new Codex thread or restart Codex after changing credentials or MCP registration.
Quickstart for Claude Code
Prerequisites: uv, Claude Code with MCP support, and either an xAI OAuth-entitled
X Premium, Premium+, or SuperGrok account, or XAI_API_KEY.
git clone git@github.com:Ilevk/x-search-plugin.git
cd x-search-plugin
uv run --quiet --locked python scripts/x_search_auth.py login
claude mcp add --transport stdio --scope user x-search-plugin -- uv run --quiet --locked python "$PWD/scripts/x_search_mcp.py"
claudeApprove the x-search-plugin MCP server if prompted, then check /mcp.
claude mcp listDocumentation
Setup Guide - Codex, Claude Code, and marketplace install paths.
Authentication - OAuth, refresh, logout, credential priority, and API-key fallback.
Tools and Examples - MCP tools and common X research prompts.
Configuration - environment variables and runtime knobs.
Troubleshooting - common setup, auth, and xAI response failures.
Security Notes - read-only boundary and credential handling.
Development - smoke tests, packaging sync, and local verification.
License
MIT. See LICENSE and NOTICE.md.
Available Tools
5 toolsfetch_tweetB
Fetch and summarize details for one X post URL.
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Summarize details' is vague and doesn't specify what information is returned, whether it includes the full post content, or any rate limits or authentication requirements. This lack of detail leaves significant ambiguity.
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 that is immediately informative and contains no filler. It is appropriately concise for the simple one-parameter tool.
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 lack of output schema and annotations, the description should explain what the 'summary' contains and what the output looks like. It does not, leaving the agent uncertain about the tool's return value and edge cases. The description is too minimal to be considered complete.
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 has only a 'url' parameter with no description. The tool description clarifies that this URL is an X post URL, adding some meaning. However, it doesn't specify the expected format (e.g., full URL versus ID) or validate the input, so it only partially compensates for the 0% schema description 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 uses a specific verb ('Fetch and summarize') and clearly identifies the resource ('one X post URL'). It distinguishes from sibling tools like search_tweets and get_trends by focusing on a single URL rather than searches or trends.
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 phrase 'for one X post URL' implies that this tool is used when you already have a specific post URL, as opposed to searching for posts. However, it does not explicitly mention alternatives or state when not to use it, so the guidance is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_trendsC
Get current X trends for a region using xAI x_search.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| region | No | Global |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must convey behavioral traits. It only says 'current' trends, implying real-time data, but does not disclose whether the operation is read-only, any rate limits, or what the response structure looks like. No mention of pagination, sorting, or default behavior beyond the schema's defaults. The description adds minimal value beyond the obvious action.
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, front-loaded sentence with no extraneous information. Every word contributes to stating the tool's core function. This is an example of efficient, concise specification.
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 there is no output schema and no annotations, the description should cover behavior and return expectations. It only states 'get current trends', but does not describe what the output looks like, any specific behaviors (e.g., current trends for a region), or limitations. The description is not complete enough for an agent to understand the tool's full usage without further guesswork.
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 has two parameters (limit, region) with 0% description coverage, and the tool description provides no additional meaning for them. It does not explain what 'region' accepts (e.g., codes, names) or how 'limit' behaves. The description's phrase 'for a region' hints at the region parameter but gives no format or constraints. This is insufficient compensation for the schema's lack of descriptions.
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: 'Get current X trends for a region'. It identifies the specific resource (trends) and the action (get), which is clear even without comparing to siblings. It doesn't explicitly differentiate from sibling tools like search_tweets or x_search, but the verb+resource combination is unambiguous enough to warrant a 4.
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?
There is no guidance on when to use this tool versus the sibling tools (search_tweets, fetch_tweet, x_search_status, x_search). The description merely states what it does, without any context for selection or exclusion criteria. This is a clear lack of usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_tweetsB
Search recent X posts by keyword with optional language, dates, and author filter.
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | ||
| query | Yes | ||
| since | No | YYYY-MM-DD | |
| until | No | YYYY-MM-DD | |
| from_user | No | Optional author handle. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries the full transparency burden but only notes that results are 'recent' and lists filters. It does not disclose pagination, result limits, rate limits, or return format, leaving significant behavioral ambiguity.
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, front-loaded sentence that mentions the core action (search), resource (recent X posts), and optional filters without wasted words.
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?
The tool has no annotations or output schema, so the description should explain return values and usage context more fully. It omits result details, pagination, and any guidance relative to sibling search tools, leaving the agent under-informed.
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 60%, with since/until/from_user already described. The description adds general meaning by mapping keyword, language, dates, and author filter to the parameters, but does not provide deeper detail on format or constraints beyond that.
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 a search over recent posts with keyword and optional filters, giving a specific verb and resource. It does not explicitly distinguish itself from sibling tools like x_search, though 'recent' and the filter list help narrow its 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?
The description implies usage: use this tool to search recent posts by keyword with optional language, date, and author filters. It does not explicitly state when to prefer this over x_search or x_search_status, nor does it mention any exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
x_searchC
Free-form read-only X/Twitter research using xAI Responses API x_search.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | What to look up on X. | |
| to_date | No | Optional YYYY-MM-DD end date. | |
| from_date | No | Optional YYYY-MM-DD start date. | |
| allowed_x_handles | No | Optional X handles to include exclusively, max 10. | |
| excluded_x_handles | No | Optional X handles to exclude, max 10. | |
| enable_image_understanding | No | ||
| enable_video_understanding | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description explicitly labels the tool as 'read-only', which is a useful behavioral signal, especially since no annotations are provided. However, it fails to disclose other important behaviors like return format, pagination, rate limits, or authentication requirements.
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 with the key purpose. It avoids fluff, though its brevity limits the information conveyed.
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?
With 7 parameters, no output schema, and no annotations, the description carries a heavy burden. It only provides a high-level purpose and the read-only hint, leaving out essential details about result types, filter semantics, or how it relates to sibling tools.
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 71%, so the schema already documents most parameters. The description adds no extra semantic detail about parameter values or usage; it only mentions 'free-form' which hints at query flexibility but doesn't elaborate beyond 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 says 'Free-form read-only X/Twitter research' which conveys a search-like purpose but is vague about what type of results are returned. It doesn't clearly differentiate from sibling tool 'search_tweets', which likely has a more specific 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 is provided on when to use this tool versus alternatives. It doesn't mention 'search_tweets' or any other sibling, nor does it describe suitable use cases, exclusions, or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
x_search_statusA
Check x-search-plugin configuration without making a network call.
| 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 convey behavior. It does disclose that no network call is made and implies a read-only check, which is useful. However, it does not describe what 'configuration' entails or what output/status info the tool returns.
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 immediately conveys the core action and key constraint ('without making a network call'). No unnecessary words.
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 parameterless status/configuration check tool, the description provides the essential context: what it checks and that it is local. It lacks detail on the exact contents of the status or output format, but is largely complete for its simplicity.
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 zero parameters, so the baseline is 4. The description provides context about the tool's purpose ('configuration' check), which is sufficient given no parameters exist to explain.
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 ('Check') and the resource ('x-search-plugin configuration'), and the explicit note 'without making a network call' distinguishes it from sibling tools that perform network-based searches or fetches.
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 implies this tool is for local configuration checks, contrasting with network-dependent siblings. However, it does not explicitly state when to use it versus alternatives, nor provide direct exclusions, so it falls just short of full guidance.
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.
5 tool updates
v0.1.0- First observed
fetch_tweet - First observed
get_trends - First observed
search_tweets - First observed
x_search - First observed
x_search_status
TDQS
search_tweets and x_search both perform searches, but their descriptions differentiate: search_tweets is keyword-focused with filters, while x_search is free-form and more general. The other tools are clearly distinct.
search_tweets, fetch_tweet, and get_trends follow a consistent verb_noun pattern, but x_search and x_search_status use an 'x_' prefix that breaks the pattern, mixing styles.
Five tools is well-scoped for a search plugin, covering the most relevant operations without unnecessary bloat.
The tool set covers keyword search, single tweet retrieval, trends, and free-form search, which comprehensively addresses the search domain. Minor gaps exist (e.g., no dedicated user timeline search), but these are workable.
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
Twitter/X read-only MCP server — 12 tools: search, users, tweets, followers, timelines, trends.
Hosted MCP for X/Twitter and Reddit. 12 read-only tools, no API keys, free during beta.
FastMCP server for posting formatted content to X (Twitter) — Tollbooth-monetized, DPYC-native
128 REST operations. 120 MCP routes; 119 JSON/text ops. OAuth 2.1. Not affiliated with X Corp.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA read-only X/Twitter MCP server that enables data retrieval for user profiles, tweets, and social graphs using OAuth 2.0 Bearer Token authentication. It supports searching recent tweets, viewing timelines, and tracking engagement metrics like followers, likes, and retweets.3MIT
- AlicenseBqualityDmaintenanceMCP server for interacting with the X platform (Twitter) via MCP clients like Claude, Cursor AI, and Windsurf AI.20156MIT
- FlicenseNot gradedqualityBmaintenanceRead-only MCP server for public X/Twitter search and retrieval via twitter.2-38.com-
- AlicenseAqualityBmaintenanceMCP server for the Twitter/X read API, enabling search, user profiles, tweets, followers, and more via natural language.94149MIT
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/Ilevk/x-search-plugin'
If you have feedback or need assistance with the MCP directory API, please join our Discord server