Skip to main content
Glama
Ilevk

x-search-plugin

by Ilevk

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.py

For 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"
claude

Approve the x-search-plugin MCP server if prompted, then check /mcp.

claude mcp list

Documentation

License

MIT. See LICENSE and NOTICE.md.

Available Tools

5 tools
fetch_tweetB

Fetch and summarize details for one X post URL.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYes

TDQS

B3.4/5.0
Behavior2/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 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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

search_tweetsB

Search recent X posts by keyword with optional language, dates, and author filter.

ParametersJSON Schema
NameRequiredDescriptionDefault
langNo
queryYes
sinceNoYYYY-MM-DD
untilNoYYYY-MM-DD
from_userNoOptional author handle.

TDQS

B3.2/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines3/5

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_search_statusA

Check x-search-plugin configuration without making a network call.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/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 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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 5 tool updatesv0.1.0
    • First observedfetch_tweet
    • First observedget_trends
    • First observedsearch_tweets
    • First observedx_search
    • First observedx_search_status

TDQS

B3.4/5.0
Disambiguation4/5

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.

Naming Consistency3/5

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.

Tool Count5/5

Five tools is well-scoped for a search plugin, covering the most relevant operations without unnecessary bloat.

Completeness4/5

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

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
    Not graded
    quality
    D
    maintenance
    A 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.
    3
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Read-only MCP server for public X/Twitter search and retrieval via twitter.2-38.com
    -
  • A
    license
    A
    quality
    B
    maintenance
    MCP server for the Twitter/X read API, enabling search, user profiles, tweets, followers, and more via natural language.
    94
    149
    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/Ilevk/x-search-plugin'

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