Ai Image GenSAFE
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
An MCP (Model Context Protocol) server implementation for generating images using Replicate's `black-forest-labs/flux-schnell` model.
Ideally to be used with Cursor's MCP feature, but can be used with any MCP client.
Features
- Generate images from text prompts
- Configurable image parameters (resolution, aspect ratio, quality)
- Save generated images to specified directory
- Full MCP protocol compliance
- Error handling and validation
Prerequisites
- Node.js 16+
- Replicate API token
- TypeScript SDK for MCP
Setup
- Clone the repository
- Install dependencies:
npm install
- Add your Replicate API token directly in the code at
src/imageService.tsby updating theapiTokenconstant:
// No environment variables are used since they can't be easily set in cursor const apiToken = "your-replicate-api-token-here";
Note: If using with Claude, you can create a .env file in the root directory and set your API token there:REPLICATE_API_TOKEN=your-replicate-api-token-here
Then build the project:
npm run build
Usage
To use with cursor:
- Go to Settings
- Select Features
- Scroll down to "MCP Servers"
- Click "Add new MCP Server"
- Set Type to "Command"
- Set Command to:
node ./path/to/dist/server.js
API Parameters
1ac0c75ceba8OBSERVED · 2026-10-07Connect
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 image-gen-mcp --env REPLICATE_API_TOKEN=${REPLICATE_API_TOKEN} -- npx -y [email protected]{
"mcpServers": {
"image-gen-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"REPLICATE_API_TOKEN": "${REPLICATE_API_TOKEN}"
}
}
}
}Exposed tools (1)
1 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
generate-image | read | Generate an image based on a prompt |
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 (2)
@modelcontextprotocol/sdk, @types/node, dotenv, replicate, typescript, zod, ts-node
Gates applied: no_behavioural_pass, no_license.
1ac0c75ceba8full audit observations/trust-audit/mcp-server/mikeyny__ai-image-gen.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-07 | 1ac0c75ceba8 | SAFE | B | 89 | first audit |
Questions
What tools does Ai Image Gen expose?
1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Ai Image Gen 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 Ai Image Gen need?
It reads REPLICATE_API_TOKEN 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 Ai Image Gen run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as image-gen-mcp at 1.0.0.
How current is this page?
The grade is for one exact copy of the source (1ac0c75ceba8), read on 2026-10-07. The repository is watched and re-audited when it changes.