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

The server requires an API key to function. You can provide it via environment variables or a .env file.

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

Usage

Using with uvx (Recommended)

You don't need to install anything locally. Just run it directly using uvx:

uvx siliconflow-mcp

Installation via PyPI

You can also install it as a global tool:

uv tool install siliconflow-mcp
# or using pip
pip install siliconflow-mcp

Configuration for MCP Clients

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": "uvx",
      "args": ["siliconflow-mcp"],
      "env": {
        "SILICONFLOW_API_KEY": "your_api_key_here",
        "SILICONFLOW_IMAGE_DIR": "C:/path/to/save/assets"
      }
    }
  }
}

Claude Code

Run the following command:

claude mcp add siliconflow -- uvx siliconflow-mcp

Gemini CLI

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

{
  "mcpServers": {
    "siliconflow": {
      "command": "uvx",
      "args": ["siliconflow-mcp"],
      "env": {
        "SILICONFLOW_API_KEY": "your_api_key_here",
        "SILICONFLOW_IMAGE_DIR": "C:/path/to/save/assets"
      }
    }
  }
}

Installation for Developers

If you want to contribute or run from source:

# 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.1.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.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: siliconflow_mcp-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 672692abf0383de94574f8420e1c01fbd0df44f7720abd0ec24d36f41f9f76bc
MD5 ead12711a4ba44d3d64fc64b2f5faff6
BLAKE2b-256 d64cb8e9977869cc0c5bbc3d43c133ed7ac9ad6e323435502511e5e1617297a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: siliconflow_mcp-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 444f68da28a72f30b6fb5377ac2422f7fac1aac3941d8781aa51f892549cb36f
MD5 3834f14d23102272502f5408650e1c41
BLAKE2b-256 579fd8ab6441624b87e0c06a4bfb621853f8ff8a7b067db290c3f155dd85f9fc

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