Grok2 ImageSAFE
grok image mcp server
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
English | 中文
An MCP (Model Context Protocol) server for image generation and editing using the Grok image model from xAI.
Note: This package was previously published as `grok2-image-mcp-server`. That package is now deprecated — please use grok-image-mcp instead.Features
- Image Generation — Generate images from text prompts with configurable aspect ratio, resolution, and batch count
- Image Editing — Edit existing images with natural language instructions, supporting 1–3 source images
- Local File Support — Provide local image paths for editing; the server reads and encodes them automatically
- Image Proxy — Optional proxy domain for
imgen.x.aito handle network restrictions - HTTP Proxy — Optional network proxy for API requests
Installation
Using npx (recommended)
{
"mcpServers": {
"grok_image": {
"command": "npx",
"args": ["grok-image-mcp"],
"env": {
"XAIAPI_KEY": "your-xai-api-key"
}
}
}
}Tools
generate_image
Generate images from text prompts.
edit_image
Edit existing images using a text prompt.
d06860bf9989OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add grok-image-mcp --env XAIAPI_KEY=${XAIAPI_KEY} -- npx -y [email protected]{
"mcpServers": {
"grok-image-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"XAIAPI_KEY": "${XAIAPI_KEY}"
}
}
}
}Exposed tools (2)
1 read · 1 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
edit_image | write | Edit existing images using a text prompt. Provide 1-3 source images (as URLs, base64 data URIs, or local file paths) along with editing instructions. Returns edited image URLs in markdown format. |
generate_image | read | Generate images from text prompts using the Grok image model. Returns image URLs in markdown format. Note: URLs are temporary, download or process promptly. |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (6)
| `HTTP_PROXY` | | HTTP/HTTPS proxy for API requests (e.g. `http://127.0.0.1:7890`) |
HTTP_PROXY=http://127.0.0.1:7890
| `HTTP_PROXY` | | HTTP/HTTPS 网络代理地址(如 `http://127.0.0.1:7890`) |
HTTP_PROXY=http://127.0.0.1:7890
@modelcontextprotocol/sdk, undici, zod, @types/node, shx, typescript
Gates applied: no_behavioural_pass, no_license.
d06860bf9989full audit observations/trust-audit/mcp-server/fl0w1nd__grok2-image.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | d06860bf9989 | SAFE | B | 89 | first audit |
Questions
What is the Grok2 Image MCP server?
grok image mcp server
What tools does Grok2 Image expose?
2 in total: 1 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Grok2 Image safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Grok2 Image need?
It reads XAIAPI_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Grok2 Image run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as grok-image-mcp at 1.0.0.
How current is this page?
The grade is for one exact copy of the source (d06860bf9989), read on 2026-10-08. The repository is watched and re-audited when it changes.