Skip to main content

High-quality SiliconFlow Image Generation MCP Server

Project description

SiliconFlow MCP Server

[English | 한국어]

An MCP (Model Context Protocol) server for SiliconFlow's image generation service. This allows AI models (like Claude) to generate high-quality images directly using various models available on SiliconFlow.

Features

  • generate_image tool: Generate images from text prompts.
    • Supports multiple models (FLUX.1-schnell, FLUX.1-dev, FLUX.2-pro, etc.)
    • aspect_ratio support: Choose from 1:1, 16:9, 9:16, etc.
    • Supports negative_prompt for supported models.
    • Customizable seeds for reproducible generations.
  • generate_video tool: Generate videos via text prompts (auto-polls until completion).
    • Supports Wan-AI models and customizable aspect ratios.
  • submit_video_generation & get_video_status: Low-level tools for manual async video management.
  • list_models tool: Dynamically fetch available image and video models.
  • get_user_info tool: Check your SiliconFlow account details, including balance (Total, Paid, Free) and profile info.
  • Local Saving: Automatically save .png, .jpg, or .mp4 files to your specified directory.

Setup

1. Prerequisites

2. Configuration

Create a .env file in the project root (you can copy from .env.example):

SILICONFLOW_API_KEY=your_api_key_here
# Optional: Path to save generated images locally
SILICONFLOW_IMAGE_DIR=C:/path/to/save/images

3. Usage with MCP Clients

This server can be used with any MCP-compatible client.

Claude Desktop

Add the following to your Claude Desktop configuration file (%APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "siliconflow": {
      "command": "uv",
      "args": [
        "--directory",
        "C:/path/to/siliconflow-mcp",
        "run",
        "siliconflow_mcp"
      ]
    }
  }
}

Claude Code

Run the following command to add the server:

claude mcp add siliconflow -- uv --directory C:/path/to/siliconflow-mcp run siliconflow_mcp

Gemini CLI

Add the configuration to your settings.json (usually located in .gemini/settings.json):

{
  "mcpServers": {
    "siliconflow": {
      "command": "uv",
      "args": [
        "--directory",
        "C:/path/to/siliconflow-mcp",
        "run",
        "siliconflow_mcp"
      ]
    }
  }
}

GPT Codex

Configure the MCP server in your GPT Codex settings following the standard MCP server format:

  • Name: siliconflow
  • Command: uv
  • Args: ["--directory", "C:/path/to/siliconflow-mcp", "run", "siliconflow_mcp"]

Note: Always replace C:/path/to/siliconflow-mcp with the actual absolute path to this directory.

Installation for Developers

# Install dependencies
uv sync

# Run the server locally
uv run siliconflow_mcp

Supported Models

  • black-forest-labs/FLUX.1-schnell (Fast and efficient)
  • black-forest-labs/FLUX.1-dev (Higher quality)
  • black-forest-labs/FLUX.2-pro (Professional grade)
  • ...and other image models hosted on SiliconFlow.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

siliconflow_mcp-0.1.0.tar.gz (51.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

siliconflow_mcp-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file siliconflow_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: siliconflow_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 51.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for siliconflow_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cbbcb81e296bbd70cce39d3db39403172c554544142b054712f038cf8eb32463
MD5 14320184b7206d23201c17279208b9c1
BLAKE2b-256 ddabdd90f2999bfcab6b6122b28a812bd9f8dc28f18310f33813cef3f20bb628

See more details on using hashes here.

File details

Details for the file siliconflow_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: siliconflow_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for siliconflow_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb4d974ccddfa3adda1aaa0635f23a9f4e5c0bb5b5f5b1eac8cfd0f9232c02bb
MD5 c275ff7ec06014450057a59f0df67ab7
BLAKE2b-256 9acd14396ba46cc1f937904595f7a6bdff892009c2542e5ecf9d80ebf53eeec3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page