grok-mcp
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., "@grok-mcpsummarize X posts about Rust programming from @rustlang"
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.
grok-mcp
FastMCP server for searching X (Twitter) via the xAI Grok API.
Uses the xAI Responses API with the x_search server-side tool — Grok autonomously searches X, analyses results, and returns a grounded answer with citations.
Tools
search_x
Search X posts and get a summarised answer with source citations.
Parameter | Type | Default | Description |
|
| required | Natural-language search query |
|
|
| X usernames to restrict search to (max 10) |
|
|
| X usernames to exclude (max 10) |
|
|
| Start date filter (ISO 8601, e.g. |
|
|
| End date filter (ISO 8601) |
|
|
| Analyse images in posts |
|
|
| Analyse video clips in posts |
|
|
| Grok model to use |
|
|
| Custom system prompt |
|
|
| Sampling temperature (0-2) |
Returns: { text, citations?, model, usage }
Related MCP server: grok-mcp-server
Setup
Get an API key from console.x.ai
Copy the env template and add your key:
cp .env.example .env # edit .env with your XAI_API_KEYInstall dependencies:
uv sync
Usage with Claude Code
Add to your Claude Code MCP config (~/.claude/settings.json or project .claude/settings.json):
{
"mcpServers": {
"grok": {
"command": "uv",
"args": ["run", "--directory", "/path/to/grok", "python", "server.py"]
}
}
}Model Options
Model | Context | Input $/1M | Output $/1M | Notes |
| 2M | $0.20 | $0.50 | Default — fast, cheap, great for search |
| 256K | $3.00 | $15.00 | Flagship reasoning |
| 128K | $2.00 | $10.00 | Stable general purpose |
Live search costs an additional ~$0.025 per source retrieved.
Available Tools
1 toolsearch_xARead-only
Search X (Twitter) posts using Grok and return a summarised answer with citations.
The xAI server autonomously searches X, analyses results, and synthesises an answer grounded in real posts.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural-language search query (e.g. "What are people saying about $TSLA?"). | |
| to_date | No | Only include posts on or before this date (ISO 8601). | |
| from_date | No | Only include posts on or after this date (ISO 8601, e.g. "2026-02-01"). | |
| temperature | No | Sampling temperature (0-2). | |
| system_prompt | No | Optional system prompt to shape the response style. | |
| allowed_handles | No | Whitelist of X usernames to restrict search to (max 10). | |
| excluded_handles | No | X usernames to exclude from results (max 10). | |
| enable_video_understanding | No | Let the model analyse video clips in posts. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds valuable behavioral context beyond the readOnlyHint and openWorldHint annotations: it discloses that the tool operates autonomously, searches, analyzes, and synthesizes answers grounded in real posts, and includes citations. This informs the agent about the tool's internal behavior, though it does not disclose potential limitations like 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 compact—two sentences—and front-loads the core purpose. Every sentence adds meaningful information: the first states the main function, the second explains the autonomous synthetic process. No unnecessary filler or repetition.
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 an output schema available, the description does not need to explain return values, and it already covers the essential purpose, process, and output type ('summarised answer with citations'). It could include more on limitations or prerequisites, but for a search tool with rich schema and annotations, it is adequately 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 input schema already provides 100% coverage with detailed descriptions for all 8 parameters (e.g., query, date filters, temperature, allowed/excluded handles). The tool description itself does not add parameter-level information, so it stays at the baseline 3 without adding or requiring compensation.
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 a specific action ('Search X (Twitter) posts') and the resource (X posts) using Grok, with a distinct outcome ('return a summarised answer with citations'). It also explains the autonomous process, making the tool's purpose unmistakable even in the absence of sibling tools.
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 for querying X posts and receiving a synthesized answer, but it does not provide explicit when-to-use or when-not-to-use guidance, nor does it mention alternatives. With no sibling tools, the lack is less critical, but the absence of exclusions or context (e.g., 'use for real-time social media analysis') keeps this at a mid score.
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 tool update
v0.1.0- First observed
search_x
TDQS
With only one tool, there is no possibility of confusing it with another. The tool's purpose is clearly distinct by default.
The tool name 'search_x' follows a clear verb_noun pattern and is a single, coherent naming choice. No inconsistency exists with only one tool.
A single tool is borderline for a server named 'grok-mcp'. While the narrow search-and-summarize scope justifies a single tool, the surface feels thin and could benefit from additional related tools.
The tool covers the core search-and-summarize function well, but lacks complementary operations like retrieving raw posts, user timelines, or trending topics. Minor gaps agents can work around, but not a dead end.
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
X (Twitter) profiles, tweets and single-tweet lookup by handle or URL. No login. Pay per result.
X/Twitter reads, search, monitors and posting. Pay-per-call in USDC — no signup, no API keys.
X (formerly Twitter) posts, profiles, and search for AI agents. Free key, self-minted, no signup.
X (formerly Twitter): X (formerly Twitter) public and private data API for search, posts (Tweets).
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables searching X (formerly Twitter) using xAI's Responses API with support for filtering by handles, date ranges, and media understanding, returning structured results with citations.1311MIT
- AlicenseNot gradedqualityDmaintenanceSearch X (formerly Twitter) in real-time from your AI assistant using xAI's Grok API, with no X API account required.57MIT
- AlicenseAqualityDmaintenanceEnables real-time search of X.com (Twitter) posts, users, threads, and trends via xAI's Grok API, directly from Claude.53MIT
- FlicenseNot gradedqualityDmaintenanceEnables real-time search of X (Twitter) posts, user timelines, and trends using either xAI's Responses API or the official X API v2.4-
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/Pantainos-Toolkit/grok-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server