loading…
Search for a command to run...
loading…
An MCP server that lets users and autonomous agents generate high-quality images in a chosen artistic style by automatically discovering and applying open-sourc
An MCP server that lets users and autonomous agents generate high-quality images in a chosen artistic style by automatically discovering and applying open-source LoRA models.
An MCP (Model Context Protocol) server that lets users and autonomous agents generate high-quality images in a chosen artistic style by automatically discovering and applying open-source LoRA (Low-Rank Adaptation) models.
generate_image - Generate images with automatic LoRA selection based on stylediscover_loras - Search for LoRA models from HuggingFace Hub or local directoriessave_image_to_disk - Save generated images to the local filesystemlora://{name} - Access metadata for LoRA modelsconfig://defaults - View effective configuration defaultsfluxlora-mcp/
├── bin/ # Executable scripts
├── scripts/ # Dev utility scripts
├── src/
│ ├── config/ # Environment configuration
│ ├── mcp/ # MCP server implementation
│ ├── prompts/ # System prompts for LLMs
│ ├── resources/ # MCP resources
│ ├── services/ # External service integrations
│ │ ├── fal/ # Fal.ai client for image generation
│ │ ├── fs/ # Filesystem operations
│ │ └── hf/ # HuggingFace Hub client
│ ├── tools/ # MCP tool implementations
│ │ ├── discover_loras.ts
│ │ ├── generate_image.ts
│ │ └── save_image_to_disk.ts
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── IMPLEMENTATION-PLAN.md # Current status and roadmap
└── README.md # This file
# Clone the repository
git clone https://github.com/yourusername/fluxlora-mcp.git
cd fluxlora-mcp
# Install dependencies
npm install
Copy the example environment file and update with your settings:
cp .env.example .env
Required environment variables:
FAL_KEY - Your Fal API key (get one from Fal.ai)HF_TOKEN - Optional Hugging Face API token for increased rate limits# Start the server in development mode
npm run dev
# Build the project with TypeScript
npm run build
# Create an optimized bundle with esbuild
npm run bundle
# Run tests
npm test
# Run the MCP Inspector with your development server
npm run inspect
# Lint and typecheck your code
npm run lint
npm run typecheck
The project includes integration with the MCP Inspector, an interactive developer tool for testing and debugging MCP servers.
With the Inspector, you can:
To use the Inspector:
npm run buildnpm run inspectThe project supports multiple build options:
TypeScript Build: Standard TypeScript compilation (npm run build)
dist/node dist/index.jsOptimized Bundle: Single-file bundle with esbuild (npm run bundle)
dist/bundle/index.jsnode dist/bundle/index.jsThe server exposes an MCP-compatible API that can be used with any MCP client. Here are some examples:
// Using an MCP client
const response = await client.invokeTool('generate_image', {
prompt: 'A watercolor portrait of a cyberpunk cat',
style: 'watercolor',
width: 512,
height: 512
});
console.log(response.image.url);
const loras = await client.invokeTool('discover_loras', {
style: 'anime',
limit: 10
});
console.log(loras.results);
const result = await client.invokeTool('save_image_to_disk', {
url: 'https://example.com/image.png'
});
console.log(result.filePath);
.safetensor file scanningFor more detailed documentation, see:
@modelcontextprotocol/sdk@fal-ai/client@huggingface/hubzodMIT
Выполни в терминале:
claude mcp add fluxlora-mcp -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.