这是一个基于TypeScript的MCP服务器,它使用Flux Schnell模型实现了一个从文本生成图像的工具。该服务器通过集成Cloudflare的Flux Schnell worker API,提供了通过MCP进行图像生成的能力。
generate_image - 根据文本描述生成图像
必须配置以下环境变量:
FLUX_API_URL - Flux Schnell API端点的URLFLUX_API_TOKEN - 访问Flux Schnell API的身份验证令牌WORKING_DIR(可选)- 生成的图像保存目录(默认为当前工作目录)安装依赖项:
npm install
# 或
pnpm install
构建服务器:
npm run build
# 或
pnpm build
要通过Smithery自动安装Flux Schnell图像生成器到Claude Desktop:
npx -y @smithery/cli install @bytefer/mcp-flux-schnell --client claude
有两种方式可以在Cursor中配置MCP服务器:
对于特定于项目的工具,在项目目录中创建一个.cursor/mcp.json文件:
{
"mcpServers": {
"mcp-flux-schnell": {
"command": "node",
"args": ["/path/to/mcp-flux-schnell/build/index.js"],
"env": {
"FLUX_API_URL": "your flux api url",
"FLUX_API_TOKEN": "your flux api token",
"WORKING_DIR": "your working directory"
}
}
}
}
此配置仅在特定项目中可用。
对于希望在所有项目中使用的工具,在您的主目录中创建一个~/.cursor/mcp.json文件,配置与上述相同:
{
"mcpServers": {
"mcp-flux-schnell": {
"command": "node",
"args": ["/path/to/mcp-flux-schnell/build/index.js"],
"env": {
"FLUX_API_URL": "your flux api url",
"FLUX_API_TOKEN": "your flux api token",
"WORKING_DIR": "your working directory"
}
}
}
}
这使得MCP服务器在您所有的Cursor工作空间中都可用。