Skip to main content

SiliconFlow MCP Server

[English | 한국어]

An MCP (Model Context Protocol) server for SiliconFlow's generative services. This allows AI models (like Claude) to generate high-quality images, videos, and speech 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.
  • generate_speech tool: Generate speech (TTS) from text.
    • Supports fish-speech, IndexTTS, and CosyVoice models.
    • Customizable voices, response formats (mp3, wav, etc.), and speed.
  • submit_video_generation & get_video_status: Low-level tools for manual async video management.
  • list_models tool: Dynamically fetch available image, video, and audio models.
  • get_user_info tool: Check your SiliconFlow account details, including balance (Total, Paid, Free) and profile info.
  • Local Saving: Automatically save .png, .jpg, .mp4, or .mp3 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=/path/to/save/assets
# Optional: Path to save generated audio files (defaults to IMAGE_DIR)
SILICONFLOW_AUDIO_DIR=/path/to/save/audio

Usage

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": "/path/to/save/assets",
        "SILICONFLOW_AUDIO_DIR": "/path/to/save/audio"
      }
    }
  }
}

Claude Code

Run the following command:

claude mcp add siliconflow \
-e SILICONFLOW_API_KEY="your_api_key_here" \
-e SILICONFLOW_IMAGE_DIR="/path/to/save/assets" \
-e SILICONFLOW_AUDIO_DIR="/path/to/save/audio" \
-- uvx siliconflow-mcp

Gemini CLI

Run the following command:

gemini mcp add siliconflow \
-e SILICONFLOW_API_KEY="your_api_key_here" \
-e SILICONFLOW_IMAGE_DIR="/path/to/save/assets" \
-e SILICONFLOW_AUDIO_DIR="/path/to/save/audio" \
uvx siliconflow-mcp

Manual: 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": "/path/to/save/assets",
        "SILICONFLOW_AUDIO_DIR": "/path/to/save/audio"
      }
    }
  }
}

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

Image Models

  • black-forest-labs/FLUX.1-schnell (Fast and efficient)
  • black-forest-labs/FLUX.1-dev (High fidelity)
  • black-forest-labs/FLUX.1-pro (Top-tier quality)
  • stabilityai/stable-diffusion-3-5-large
  • stabilityai/stable-diffusion-3-5-large-turbo
  • stabilityai/stable-diffusion-xl-base-1.0
  • ByteDance/SDXL-Lightning
  • Kwai-Kolors/Kolors
  • Qwen/Qwen-Image-Edit-2509 (Image editing)

Video Models

  • Wan-AI/Wan2.2-T2V-A14B (Text-to-Video)
  • Wan-AI/Wan2.1-T2V-14B
  • Wan-AI/Wan2.1-I2V-14B-720P (Image-to-Video)
  • Wan-AI/Wan2.1-T2V-1.3B

Audio (TTS) Models

  • fishaudio/fish-speech-1.5
  • IndexTeam/IndexTTS-2
  • FunAudioLLM/CosyVoice2-0.5B

You can use the list_models tool to see the full list of available models from SiliconFlow.

License

MIT

Metadata

Release files for siliconflow-mcp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for siliconflow-mcp 0.1.2
File Size Uploaded Provenance
siliconflow_mcp-0.1.2.tar.gz 53.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for siliconflow-mcp 0.1.2
File Interpreter ABI Platform
siliconflow_mcp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 63.1 kB

Release files / siliconflow_mcp-0.1.2.tar.gz

Download URL siliconflow_mcp-0.1.2.tar.gz
Size 53.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f9e74339ada806555c1ef434bfae8feadc7593fd719f77cdd89488b5852f5600
BLAKE2b-256 checksum
How to use checksums
13b779a4e8784804aae00d721751e8b16cc9a2760e1515d01a46d842d08afeec
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / siliconflow_mcp-0.1.2-py3-none-any.whl

Download URL siliconflow_mcp-0.1.2-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74693b8f188f098f92971562ea8687b2eb75ae34a4ed24d8d4eb5d35e54c9d69
BLAKE2b-256 checksum
How to use checksums
aa753c943c983b691b517ef43fe0050a04b68bdf4e332fc446d99f2eca52554a
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for siliconflow-mcp 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page