Token导航 LogoToken导航

MCP Server · 浏览器工具

MCP Replicate Flux

使用Replicate的FLUX模型生成图片并存储到Cloudflare R2的MCP服务器,支持自定义提示词和文件名。

stdio官方级别未说明来源级核验工具 0@smithery/cli
云存储HTMLClaude自动化处理Claude DesktopCursor

快速开始

作者 / 组织
andylee20014
提供方
andylee20014
运行时
Node.js

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

10

仓库热度

收录来源

3 个

MCP World

选型结论

MCP Replicate Flux 属于浏览器工具类 MCP Server,公开资料标注 0 个工具,通过stdio 本地进程接入,适配 Claude Desktop、Claude、Cursor,有可以直接复制的安装命令;接入前要先准备 访问 Token。

分类

浏览器工具

传输方式

stdio

认证方式

访问 Token

部署方式

公开资料未说明

安装与配置

安装命令

npx -y @smithery/cli install @andylee20014/mcp-replicate-flux --client claude

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

MCP Replicate FLUX

A Model Context Protocol (MCP) server that generates images using Replicate's FLUX model and stores them in Cloudflare R2.

使用 Replicate 的 FLUX 模型生成图片并存储到 Cloudflare R2 的模型上下文协议(MCP)服务器。

Features 功能特点

  • Generate images using Replicate's black-forest-labs/flux-schnell model
  • Store generated images in Cloudflare R2
  • Return accessible image URLs
  • Support for custom prompts and filenames
  • 使用 Replicate 的 black-forest-labs/flux-schnell 模型生成图片
  • 将生成的图片存储到 Cloudflare R2
  • 返回可访问的图片链接
  • 支持自定义提示词和文件名

Prerequisites 前置要求

  • Node.js (v16 or higher)
  • Replicate API token
  • Cloudflare R2 bucket and credentials
  • npm or yarn
  • Node.js(v16 或更高版本)
  • Replicate API 令牌
  • Cloudflare R2 存储桶和凭证
  • npm 或 yarn

Environment Variables 环境变量

Required environment variables in .env file:

.env 文件中需要的环境变量:

REPLICATE_API_TOKEN=your_replicate_token
STORAGE_ENDPOINT=your_r2_endpoint
STORAGE_ACCESS_KEY=your_r2_access_key
STORAGE_SECRET_KEY=your_r2_secret_key
STORAGE_BUCKET=your_bucket_name
STORAGE_DOMAIN=your_domain

Local Installation 本地安装

Installing via Smithery

To install MCP Replicate FLUX for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @andylee20014/mcp-replicate-flux --client claude

Installing manually

Follow these steps to set up the project locally:

按照以下步骤在本地设置项目:

# Clone the repository
git clone https://github.com/andylee20014/mcp-replicate-flux.git
cd mcp-replicate-flux

# Install dependencies
npm install

# Create .env file and add your credentials
cp .env.example .env
# Edit .env with your actual credentials

Make sure your Cloudflare R2 bucket has appropriate CORS settings for public access to the uploaded images.

确保您的 Cloudflare R2 存储桶具有适当的 CORS 设置,以允许公共访问上传的图片。

Running Locally 本地运行

To start the MCP server locally:

在本地启动 MCP 服务器:

node index.js

The server will start and listen for MCP protocol messages on standard input/output.

服务器将启动并通过标准输入/输出监听 MCP 协议消息。

Usage 使用方法

The server provides a generate-image tool that accepts two parameters:

  • prompt: The text prompt for image generation
  • filename: The desired filename for the generated image

服务器提供了一个 generate-image 工具,接受两个参数:

  • prompt:用于生成图片的文本提示词
  • filename:生成的图片所需的文件名

Integration Example 集成示例

Here's an example of how to integrate with this MCP server using the MCP client library:

以下是使用 MCP 客户端库与此 MCP 服务器集成的示例:

const { McpClient } = require('@modelcontextprotocol/sdk/client/mcp.js')

async function generateImage(prompt, filename) {
  const client = new McpClient()
  // Connect to your running MCP server
  await client.connect(yourTransport)
  
  const result = await client.tools.call('generate-image', {
    prompt,
    filename
  })
  
  return result
}

Example response 示例响应:

{
  "content": [
    { "type": "text", "text": "Image successfully generated and uploaded to Cloudflare R2" },
    { "type": "image", "url": "" }
  ]
}

Testing 测试

A test script is provided to verify the image generation and upload functionality.

提供了一个测试脚本,用于验证图片生成和上传功能。

Running the test 运行测试

node test.js

The test script will:

  1. Generate an image with a sample prompt
  2. Upload the image to Cloudflare R2
  3. Return the accessible URL

测试脚本将:

  1. 使用示例提示词生成图片
  2. 将图片上传到 Cloudflare R2
  3. 返回可访问的 URL

Example test output 测试输出示例:

Generating image with prompt: "a beautiful girl"
Filename: test-1234567890.jpg
Image generated and uploaded successfully!
Image URL: 

You can modify the prompt in test.js to test different image generation scenarios.

您可以在 test.js 中修改提示词来测试不同的图片生成场景。

Cursor MCP Configuration Cursor MCP配置

There are two ways to configure the MCP server in Cursor:

在Cursor中配置MCP服务器有两种方式:

Method 1: Complete Configuration 完整配置方式

Create a file at ~/.cursor/mcp.json with all environment variables:

在 ~/.cursor/mcp.json 创建完整配置文件,包含所有环境变量:

{
  "mcpServers": {
    "replicate-flux": {
      "command": "node",
      "args": ["C:\\Users\\YourUsername\\path\\to\\mcp-replicate-flux\\index.js"],
      "description": "使用Replicate的FLUX模型生成图片并存储到Cloudflare R2的MCP服务器",
      "env": {
        "REPLICATE_API_TOKEN": "your_replicate_token",
        "STORAGE_ENDPOINT": "your_r2_endpoint",
        "STORAGE_ACCESS_KEY": "your_r2_access_key",
        "STORAGE_SECRET_KEY": "your_r2_secret_key",
        "STORAGE_BUCKET": "your_bucket_name",
        "STORAGE_DOMAIN": "your_domain"
      }
    }
  }
}

Method 2: Minimal Configuration 最小配置方式

If you prefer to manage environment variables separately (using system environment variables or .env file), you can use a minimal configuration:

如果你想单独管理环境变量(使用系统环境变量或.env文件),可以使用最小配置:

{
  "mcpServers": {
    "replicate-flux": {
      "command": "node",
      "args": ["C:\\Users\\YourUsername\\path\\to\\mcp-replicate-flux\\index.js"]
    }
  }
}

When using the minimal configuration, make sure your environment variables are properly set up either in:

  • System environment variables
  • .env file in the project directory
  • Cloud platform's environment variables (for deployed servers)

使用最小配置时,请确保你的环境变量正确设置在以下位置之一:

  • 系统环境变量
  • 项目目录中的 .env 文件
  • 云平台的环境变量(对于已部署的服务器)

Notes 注意事项

  • The description field is optional in both methods
  • Environment variables in the configuration file take precedence over system environment variables
  • After changing the configuration, restart Cursor to apply the changes
  • description 描述字段在两种方式中都是可选的
  • 配置文件中的环境变量优先级高于系统环境变量
  • 更改配置后,需要重启Cursor以应用更改

Project Structure 项目结构

mcp-replicate-flux/
├── .env                  # Environment variables
├── index.js             # MCP server entry point
├── generateImage.js      # Image generation and R2 upload logic
├── test.js              # Test script
└── README.md            # Project documentation

Troubleshooting 故障排除

Common Issues 常见问题

  1. Image generation fails: Check your Replicate API token and quota
  2. R2 upload fails: Verify your R2 credentials and bucket permissions
  3. Cannot access generated images: Ensure your R2 bucket has proper CORS configuration
  1. 图片生成失败:检查您的 Replicate API 令牌和配额
  2. R2 上传失败:验证您的 R2 凭证和存储桶权限
  3. 无法访问生成的图片:确保您的 R2 存储桶具有正确的 CORS 配置

MCP Protocol 协议说明

The Model Context Protocol (MCP) is a standard for AI model interaction that enables interoperability between different AI systems. This server implements an MCP tool that can be used with any MCP-compatible client.

模型上下文协议(MCP)是一种 AI 模型交互标准,可实现不同 AI 系统之间的互操作性。此服务器实现了一个 MCP 工具,可与任何兼容 MCP 的客户端一起使用。

For more information about MCP, visit: https://mcp.freeaigen.com/

References 参考链接

License 许可证

MIT

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

HTML本地部署图片生成云存储AI模型MCP协议自动化处理

支持客户端

Claude DesktopClaudeCursor

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

自动操作网页

打开页面、点击、填表,把浏览器动作交给模型执行。

抓结构化数据

把页面内容整理成表格或 JSON,省掉手工复制粘贴。

走一遍关键流程

按步骤检查页面是否正常,回归时少漏环节。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 Node.js,换机器要重新装一遍。
  • 需要自备访问 Token,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在浏览器工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到访问 Token的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
MCP Replicate Flux

MCP World · 本页

0stdio有3 个2026-05-17
Fetch 9a2682de

MCP.so

1SSE有3 个2026-05-17
Browser 738d52bc

MCP World

0stdio有1 个2026-05-17
Playwright MCP Server

MCP.so

21stdio有4 个2026-05-17
Skyvern MCP

MCP World

0stdio有2 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

MCP Replicate Flux 怎么安装?

公开资料给出的安装命令是 npx -y @smithery/cli install @andylee20014/mcp-replicate-flux --client claude,运行环境为 Node.js。装完后按客户端要求写进 MCP 配置,重启客户端生效。

MCP Replicate Flux 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Node.js;保存后完全退出客户端再打开,配置才会生效。

MCP Replicate Flux 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Replicate Flux 需要 API Key 吗?

公开资料标注的认证方式是访问 Token,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

MCP Replicate Flux 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude、Cursor;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP