@fre4x/grok
v1.1.6
Published
An MCP server for xAI (Grok) with search and generation capabilities.
Downloads
541
Maintainers
Readme
grok — The Infinite Oracle
Searching the stream of everything, imagining the void, and animating the future. A B1TE that sees all.
Part of FRE4X-B1TE — a monorepo of MCP servers built for autonomous agents.
xAI's Grok is more than an LLM. It's a real-time sensor for the global consciousness (X) and a multi-modal engine for creation. This server gives autonomous agents the ability to search the web with high reasoning, tap into the real-time X stream, and generate high-fidelity images and videos.
Tools
| Tool | Capability |
|------|------------|
| search_x | Search X posts and threads with optional date and handle filters |
| search_web | Search the public web with optional domain filters |
| generate_image | Generate high-quality images from text prompts |
| generate_video | Start an asynchronous video generation task |
| get_video_status | Check the status of a video generation task |
Search tools support limit and offset pagination and return normalized results with citations.
search_x accepts allowed_x_handles, excluded_x_handles, from_date, to_date, enable_image_understanding, and enable_video_understanding. search_web accepts allowed_domains, excluded_domains, and enable_image_understanding. Include and exclude filters are mutually exclusive per tool, and web domain filters follow xAI's max-5 constraint.
Image generation responses include direct MCP image content blocks when media can be embedded. Video responses include direct MCP embedded resource blobs because MCP does not define a dedicated video content block.
Configuration
Required environment variable:
XAI_API_KEY: Your xAI API key from console.x.ai.
Mock mode is supported for local development and offline validation:
MOCK=true npx @fre4x/grokOptional media embedding controls:
GROK_MAX_EMBEDDED_MEDIA_BYTES: Maximum bytes to inline into MCPcontentblocks. Defaults to5242880.GROK_MEDIA_FETCH_TIMEOUT_MS: Timeout for downloading generated media before embedding. Defaults to15000.
Deploy
{
"mcpServers": {
"grok": {
"command": "npx",
"args": ["-y", "@fre4x/grok"],
"env": {
"XAI_API_KEY": "your-key-here"
}
}
}
}Development
npm install
npm run dev
npm run build
npm run typecheck
npm test
npm run inspectorLicense
MIT — WE ARE THE FRE4X.
