Grok Web MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GROK_WEB_MCP_HOME | No | Moves the whole settings folder. | ~/.grok-web-mcp |
| GROK_WEB_MCP_PORT | No | Local WebSocket port; set the same port in the extension popup. | 8799 |
| GROK_WEB_MCP_DEFAULT_N | No | Images to keep per call when a call does not give n (1-4). | 1 |
| GROK_WEB_MCP_OUTPUT_DIR | No | Folder that relative out_dir / image_path values resolve against. | ~/grok-web-mcp |
| GROK_WEB_MCP_QUOTA_GUARD | No | Refuse jobs over the daily limits in limits.json. Usage is still recorded when off. | true |
| GROK_WEB_MCP_DEFAULT_MODE | No | speed or quality when a call does not give one; "" leaves the page as it is. | |
| GROK_WEB_MCP_EXTENSION_IDS | No | Extension ids always allowed (comma-separated). | [] |
| GROK_WEB_MCP_PIN_EXTENSION | No | Trust only the first Chrome extension id that connects. | true |
| GROK_WEB_MCP_DEFAULT_ASPECT | No | Aspect ratio when a call does not give one (16:9, 9:16, 1:1, 2:3, 3:2). | 16:9 |
| GROK_WEB_MCP_IMAGE_TIMEOUT_S | No | Seconds to wait for an image submission. | 180 |
| GROK_WEB_MCP_VIDEO_TIMEOUT_S | No | Seconds to wait for a video. | 420 |
| GROK_WEB_MCP_REQUIRE_PEER_TOKEN | No | Require the local peer token. | true |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| grok_statusA | Bridge health: is the Chrome extension connected, is a grok.com/imagine tab open, is the user logged in. |
| grok_settingsA | The settings in effect (defaults < config.json < GROK_WEB_MCP_* env vars), where each came from, and what each one does. Settings are read when the server starts; restart the MCP client after changing them. |
| grok_usageA | Today's Grok Imagine usage (image submissions, images generated/kept, videos) against the daily limits. |
| grok_set_limitsB | Change the daily Grok quota guard (only when the user asked for it). Omitted values stay as they are. |
| grok_generate_imageA | Generate images with Grok Imagine in the user's logged-in Chrome (no API key; uses the user's own Grok plan and daily quota: see grok_usage(); jobs over the limits are refused). Omitted aspect / n / mode / timeout_s use the configured defaults (see grok_settings). aspect: 16:9 | 9:16 | 1:1 | 2:3 | 3:2. n: images to keep, 1..4 (one submission gives 2; n=3/4 = 2 submissions). mode: "speed" | "quality" (a warning, not a failure, if the page control is not found). max_side: shrink saved files so the long side <= max_side (e.g. 1344). size: exact "WxH" (e.g. "1344x768"), scale to cover + center crop (overrides max_side). keep_original: also keep _orig.. out_dir: absolute, or relative to the output root (GROK_WEB_MCP_OUTPUT_DIR, default ~/grok-web-mcp). Files are _1.jpg, _2.jpg ... (never overwritten). Returns {"files", "kept", "generated", "submissions", "aspect_ok", "secs", "sizes"?, "warning"?}. |
| grok_batchA | Run several image jobs one after another. Each job: {"prompt", "name", "aspect"?, "n"? (1..4, default 1),
"mode"?, "max_side"?, "size"?, "keep_original"?, "timeout_s"?, "out_dir"?}.
The whole batch is checked first (job count, total submissions vs today's budget); nothing runs if it does not fit.
Batches needing more than |
| grok_generate_videoA | EXPERIMENTAL: make a Grok Imagine video (about 6 s) from a prompt, optionally animating a local image (image_path: jpg/png/webp). Videos cost much more quota than images and are capped by max_videos_per_day (see grok_usage). Relies on Grok's current web UI, which changes often. Returns {"files": [mp4 path]}. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: status (health), settings (configuration), usage (today's quota), set_limits (quota changes), and three separate generation entry points (single image, batch, video). The descriptions make the boundaries explicit, including read-vs-write and single-vs-batch distinctions.
All tools use a consistent `grok_` prefix with snake_case suffixes. Action tools use verb phrases (`generate_image`, `set_limits`) while state/query tools use nouns (`status`, `settings`, `usage`), which is predictable and readable.
Seven tools is well-scoped for a Grok web bridge: generation, batch generation, video generation, quota inspection, quota modification, health status, and configuration. No tool feels redundant or missing at the surface level.
The surface covers the core lifecycle: generate images/videos, batch jobs, inspect usage, adjust quota, and check bridge health/settings. Minor gaps exist around job cancellation, output file listing/cleanup, or history beyond today, but core workflows are covered.