Skip to main content
Glama
stvlynn

Volcengine Image Generation MCP Server

by stvlynn
README.md
# Volcengine Image Generation MCP Server

A Model Context Protocol (MCP) server that provides tools for generating images using Volcengine's text-to-image API.

## Features

- Text-to-image generation using Volcengine's doubao-seedream-3-0-t2i-250415 model
- Support for multiple image sizes and formats
- Configurable parameters including seed, guidance scale, and watermark
- Proper error handling and validation
- TypeScript implementation with full type safety

## Installation

1. Clone or download this repository
2. Install dependencies:

```bash
npm install
```

3. Build the project:

```bash
npm run build
```

## Configuration

Set the required environment variable:

```bash
export VOLCENGINE_API_KEY="your_api_key_here"
```

## Usage

### Running the server

```bash
npm start
```

### Development mode

```bash
npm run dev
```

## Available Tools

### generate_image

Generate images from text prompts using Volcengine's API.

**Parameters:**
- `prompt` (required): Text description of the image to generate
- `model` (optional): Model ID (default: doubao-seedream-3-0-t2i-250415)
- `size` (optional): Image size (default: 1024x1024)
- `seed` (optional): Random seed for reproducible results
- `guidance_scale` (optional): How closely to follow the prompt (1-10)
- `watermark` (optional): Whether to add watermark (default: true)
- `response_format` (optional): Return format - 'url' or 'b64_json' (default: url)

**Supported sizes:**
- 1024x1024 (1:1)
- 864x1152 (3:4)
- 1152x864 (4:3)
- 1280x720 (16:9)
- 720x1280 (9:16)
- 832x1248 (2:3)
- 1248x832 (3:2)
- 1512x648 (21:9)

## Example Usage

```json
{
  "name": "generate_image",
  "arguments": {
    "prompt": "A beautiful sunset over mountains",
    "size": "1024x1024",
    "guidance_scale": 7.5
  }
}
```

## MCP Client Configuration

Add this server to your MCP client configuration:

```json
{
  "mcpServers": {
    "volcengine-image": {
      "command": "node",
      "args": ["path/to/build/index.js"],
      "env": {
        "VOLCENGINE_API_KEY": "your-api-key"
      }
    }
  }
}
```

## Error Handling

The server provides comprehensive error handling for:
- Invalid API keys
- Rate limiting
- Invalid parameters
- Network errors
- API response errors

## License

MIT

TDQS

B3.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion or overlap between tools. The single tool 'generate_image' has a clear and distinct purpose for generating images via a text-to-image API, leaving no ambiguity for an agent to misselect.

Naming Consistency5/5

The tool name 'generate_image' follows a consistent verb_noun pattern, and with only one tool, there is no inconsistency to evaluate. The naming is straightforward and predictable, adhering to common conventions without any deviations.

Tool Count2/5

A single tool is too few for a server focused on image generation, as it lacks essential operations like listing generated images, managing styles, or handling errors. This minimal scope limits functionality and feels incomplete for the domain, making it borderline inappropriate.

Completeness2/5

The tool set is severely incomplete for an image generation server. While 'generate_image' covers the core creation function, there are significant gaps such as retrieving, updating, or deleting images, managing parameters, or handling batch operations, which will likely cause agent failures in complex workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues