npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

silicon-flow-mcp-server

v0.1.2

Published

Silicon Flow MCP server for image generation

Readme

Silicon Flow MCP Server

这是一个用于生成图像的MCP服务器,它使用Silicon Flow API来生成高质量的图像。

系统要求

  • Node.js v16.0.0 或更高版本
  • npm(通常随Node.js一起安装)

如果没有安装Node.js,可以从Node.js官网下载安装。

安装和使用方式

方式一:使用npx(推荐)

直接通过npx运行服务器,无需克隆仓库:

  1. 配置MCP设置文件:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.local/share/code-server/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "silicon-flow": {
      "command": "npx",
      "args": ["silicon-flow-mcp-server"],
      "env": {
        "SILICON_FLOW_API_KEY": "your-api-key-here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

注意:首次运行时,npx会自动安装所需的依赖包,无需手动安装。

方式二:本地开发

如果你需要修改或开发服务器,可以选择本地开发方式:

  1. 克隆或下载此仓库到本地:
git clone [repository-url]
cd silicon-flow-server
  1. 安装依赖:
npm install
  1. 配置环境变量:
cp .env.example .env

然后编辑 .env 文件,填入你的 Silicon Flow API 密钥。

  1. 构建项目:
npm run build
  1. 配置MCP(本地开发模式):
{
  "mcpServers": {
    "silicon-flow": {
      "command": "node",
      "args": ["[path-to-server]/build/index.js"],
      "env": {
        "SILICON_FLOW_API_KEY": "your-api-key-here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

使用方法

服务器提供了以下工具:

generate_image

生成图像的工具,支持以下参数:

  • model: 生成模型(默认:'Kwai-Kolors/Kolors')
  • prompt: 图像描述(必需)
  • negative_prompt: 需要避免的内容(可选)
  • image_size: 图像尺寸(默认:'1024x1024')
  • batch_size: 生成数量(默认:1)
  • seed: 随机种子(默认:4999999999)
  • num_inference_steps: 推理步数(默认:20)
  • guidance_scale: 引导比例(默认:7.5)

示例使用:

const result = await claude.use_mcp_tool({
  server_name: "silicon-flow",
  tool_name: "generate_image",
  arguments: {
    model: "Kwai-Kolors/Kolors",
    prompt: "A beautiful mountain landscape at sunset",
    image_size: "1024x1024"
  }
});

安全注意事项

  • 不要将API密钥提交到版本控制系统
  • 确保保护好你的API密钥,不要将其分享给他人
  • 生成的图像URL有效期是有限的,请及时保存

开发

  • 项目使用TypeScript开发
  • 使用 npm run build 编译代码
  • 代码提交前请确保没有包含任何敏感信息