Skip to main content
Glama
Hanyuyu

ImgLume MCP

by Hanyuyu

ImgLume MCP

CI License: MIT Node.js 20+

An open-source local MCP server that connects AI clients to ImgLume for visual inspiration, prompt improvement, image generation and editing, and video generation.

The tools are flexible building blocks. Search the gallery when inspiration is useful, improve a short idea when needed, or generate directly when the user already knows what they want.

How it works

MCP host (Codex, Claude Code, Cursor, ...)
  -> local ImgLume MCP server (this repository)
  -> ImgLume API
  -> generated files saved on your computer

This repository contains only the open-source MCP server. The ImgLume website and API backend are not included.

Gallery prompts and model information are read from ImgLume's live catalog. New gallery entries, model options, and image or video credit costs can therefore become available without an MCP update. An MCP update is needed only when the tool or API contract changes.

Related MCP server: fluxlora-mcp

See it in action

Every asset below came from one production run through the public MCP tools. The fictional LUME NO. 7 product was created first, combined with a fashion model reference, and then animated from the saved local campaign image.

Create the product

Build a model campaign

Animate the campaign

A fictional LUME NO. 7 perfume bottle created through ImgLume MCP

An adult fashion model holding the same LUME NO. 7 bottle

A stable frame from the generated model campaign video

Watch the 4-second generated video.

Hard cases

These are ordinary generate_image and generate_video calls rather than hard-coded workflows. They show how the same tools can handle several constraints at once.

One reference, four visual directions

The base bottle was used in four parallel image requests: fashion campaign, midnight neon, moonlit botanicals, and minimal editorial. The bottle geometry, purple-to-amber liquid, black cap, and gold label remain recognizable while the art direction changes.

Four distinct campaigns generated from one product reference

Two references, one controlled composition

Left to right: the product reference, the model reference, and a new campaign. The request preserved the model's identity, green dress, bottle design, and label while moving both subjects into a warm gold studio.

Product reference, model reference, and combined campaign output

Exact poster copy

This 9:16 poster required exactly two headline lines: MIDNIGHT BLOOM and LUME NO. 7, while preserving the three-line product label.

A minimal perfume poster with exact requested headline and product text

Image-to-video continuity

Frames at 0.05, 1.30, 2.60, and 3.85 seconds show the same face, hairstyle, dress, hand pose, bottle, and label through a slow camera push-in and subtle subject motion.

Four frames showing identity and product continuity across the generated video

Watch the full 4-second continuity test.

Requirements

  • Node.js 20 or newer

  • An MCP client that supports local stdio servers

  • An ImgLume account and API key only when generating images or videos

Gallery search, inspiration details, prompt improvement, and model discovery do not require an API key.

Quick start

Add ImgLume to your MCP client:

{
  "mcpServers": {
    "imglume": {
      "command": "npx",
      "args": ["-y", "github:Hanyuyu/imglume-mcp"]
    }
  }
}

Restart the client, then try:

Browse popular ImgLume inspiration and show me three different visual directions.

To enable image and video generation:

  1. Create an ImgLume API key. ImgLume will guide signed-out users through login first.

  2. Add the key to the server's environment:

{
  "mcpServers": {
    "imglume": {
      "command": "npx",
      "args": ["-y", "github:Hanyuyu/imglume-mcp"],
      "env": {
        "IMGLUME_API_KEY": "imglume_your_key"
      }
    }
  }
}

Keep the key in your private, local MCP configuration. Never commit it to a repository.

Codex

codex mcp add imglume -- npx -y github:Hanyuyu/imglume-mcp

Add --env IMGLUME_API_KEY=imglume_your_key before -- when generation is needed.

Claude Code

claude mcp add --scope user imglume -- npx -y github:Hanyuyu/imglume-mcp

Add -e IMGLUME_API_KEY=imglume_your_key before -- when generation is needed.

Cursor

Save the JSON configuration above using Cursor's MCP configuration:

  • ~/.cursor/mcp.json for all projects

  • .cursor/mcp.json for one project

Restart Cursor after saving the file.

Try it

Use natural-language requests. The host chooses the relevant tool.

Find inspiration

Search ImgLume for poster inspiration and show me five options.

Use short, broad search terms such as poster, product, portrait, anime, or cinematic. Leave the search empty to browse popular work.

Improve a brief

Improve this into a production-ready image prompt: a glass of coffee on a snowy mountain, editorial style.

Generate an image

Generate a vertical luxury campaign for a fictional LUME NO. 7 perfume: an adult East Asian fashion model in an emerald one-shoulder dress, warm studio lighting, and the product label clearly readable.

Edit an image

Use /absolute/path/to/product.png and /absolute/path/to/model.png as references. Preserve the model's identity, dress, bottle shape, and label; place them together in a warm gold studio.

Animate an image

Turn /absolute/path/to/campaign.png into a four-second video. Add a subtle turn, blink, hair movement, and slow camera push-in while keeping the face, hands, bottle, and label stable.

Preview rendering depends on the MCP host. Hosts without inline media support may show a URL instead of the image or video itself.

Tools

Tool

Purpose

API key

search_gallery

Search the live gallery for visual references and prompt examples

No

get_inspiration

Retrieve the full prompt, media, recommendations, and attribution

No

enhance_prompt

Ask the current host model to improve a short visual brief

No

list_models

Read current models, options, defaults, and live credit costs

No

generate_image

Generate or edit one image and save it locally

Yes

generate_video

Generate one video and save it locally

Yes

Each tool can be used independently. Gallery search is optional inspiration, not a required step before generation.

Generation inputs and outputs

  • Use list_models when model choice, supported options, or current costs matter. Avoid relying on a hard-coded model list.

  • Image costs are reported per generation. Video costs are reported per second, so multiply the selected rate by the requested duration.

  • Image generation and video generation consume credits from the ImgLume account associated with the API key.

  • Reference images may be public HTTP(S) URLs or local file paths.

  • Local paths should be absolute so the MCP process resolves the intended file.

  • JPG, PNG, and WebP reference images are supported.

  • Each reference image may be up to 10 MB, with at most five references per request.

  • The MCP validates the live model, quality, and aspect-ratio options before uploading local references. Partial uploads are removed when an upload or generation submission fails.

  • Video duration may be between 4 and 15 seconds. Available quality and aspect ratio values come from the live model catalog.

  • Generated files are saved to ~/Pictures/imglume by default.

Set IMGLUME_OUTPUT_DIR to use another save location.

Configuration

Variable

Purpose

Default

IMGLUME_API_KEY

ImgLume API key used for generation

None

IMGLUME_API_URL

Advanced API origin override

https://imglume.com

IMGLUME_OUTPUT_DIR

Where generated files are saved

~/Pictures/imglume

IMGLUME_POLL_INTERVAL_MS

Generation status polling interval

2000 (2 seconds)

IMGLUME_IMAGE_TIMEOUT_MS

Image wait timeout

300000 (5 minutes)

IMGLUME_VIDEO_TIMEOUT_MS

Video wait timeout

900000 (15 minutes)

Most users should leave IMGLUME_API_URL unset. It exists for ImgLume maintainers and trusted compatible API environments; it does not provide the private ImgLume backend for local development.

The configured API origin receives the API key, prompts, and uploaded reference images. Only point IMGLUME_API_URL at an endpoint you trust.

Privacy and security

  • search_gallery, get_inspiration, and list_models read data from the ImgLume API.

  • enhance_prompt returns guidance to the current MCP host model and does not call a separate ImgLume AI model.

  • Image and video generation send the prompt and any reference images to ImgLume.

  • Generated assets are downloaded to the configured local output directory.

  • This MCP server adds no analytics or telemetry.

  • Treat IMGLUME_API_KEY like a password. Do not publish it, commit it, or paste it into shared logs.

See the ImgLume Privacy Policy for the service's data practices.

Troubleshooting

The tools do not appear

Confirm that Node.js 20 or newer is installed, then restart the MCP client after changing its configuration.

Use a shorter or broader term, or omit the query to browse popular inspiration.

Generation says an API key is required

Create a key at ImgLume API Keys, add it as IMGLUME_API_KEY, and restart the client so it reloads the environment.

A reference image is rejected

Use an absolute local path or a public URL that returns a JPG, PNG, or WebP image. Confirm that each image is no larger than 10 MB.

Image or video generation times out

The MCP server waits up to 5 minutes for images and 15 minutes for videos by default. The MCP host's own request timeout must be at least as long. Increase the host timeout or the corresponding IMGLUME_*_TIMEOUT_MS value when needed.

The generated file cannot be found

The completed tool response includes the exact saved path. The default directory is ~/Pictures/imglume; check IMGLUME_OUTPUT_DIR if it was overridden.

For reproducible problems, open a GitHub issue without including your API key.

Optional skill

skills/visual-creative/SKILL.md provides lightweight guidance for hosts that support skills. It keeps scenarios such as product imagery, portraits, posters, characters, interiors, thumbnails, and storyboards as examples rather than fixed workflows.

The MCP server works without the skill.

Contributing

This public repository contains the MCP layer only. The private ImgLume product and API backend are not part of the contributor setup.

git clone https://github.com/Hanyuyu/imglume-mcp.git
cd imglume-mcp
pnpm install
pnpm check
pnpm build

Contributors can exercise the read-only tools against the public ImgLume API. Generation tests require their own ImgLume account, API key, and credits.

License

MIT

Available Tools

6 tools
enhance_promptA
Read-only

Turn a short visual idea into a stronger generation prompt using the current host model. This tool returns concise guidance rather than calling another AI service.

ParametersJSON Schema
NameRequiredDescriptionDefault
styleNoOptional visual direction such as realistic, anime, editorial, 3D, or watercolor.
promptYesThe brief idea to improve

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, but the description adds context by stating the tool uses the host model and returns guidance, not invoking external services. This clarifies the behavior beyond the annotation, though it omits details like whether the input prompt is modified or used for training.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, front-loaded with the core action and key differentiator. Every sentence adds value, with no redundant or filler content. Efficient and to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with 2 parameters, readOnlyHint annotation, and no output schema, the description adequately covers the function and behavior. It explains the tool does not call another AI service, which is important context. However, it does not describe the return format or how the guidance is presented, leaving a minor gap in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description mentions 'short visual idea' (maps to prompt) and 'visual direction' (maps to style), but these are paraphrases of the schema descriptions without adding new meaning or format details. No additional value over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Turn a short visual idea into a stronger generation prompt.' It explicitly distinguishes from siblings like generate_image/generate_video by noting it 'returns concise guidance rather than calling another AI service.' This provides a specific verb and resource, fully differentiating from alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use cases (when you have a short visual idea and want a better prompt) but does not explicitly state when to use versus alternatives or provide exclusions. Sibling tools like search_gallery or generate_image are not contrasted, leaving the agent to infer context without clear guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_imageA

Generate or edit one image with ImgLume. For edits, pass the source image URL or local file path in referenceImages and keep the prompt focused on the requested change. Omit model, quality, or aspectRatio to use live ImgLume defaults.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoOptional model ID
promptYesImage generation prompt
qualityNoOptional quality value
promptIdNoOptional ID returned by get_inspiration
aspectRatioNoOptional ratio such as 1:1, 16:9, or 9:16
referenceImagesNoPublic image URLs or absolute/local image file paths

TDQS

A3.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It discloses the tool can generate or edit, but it does not mention return format (e.g., image URL or file path), error handling, rate limits, or potential side effects. This is a significant gap for a tool that produces output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, dense sentence with no redundancy. It front-loads the main action and immediately provides usage tips. Every phrase adds value, achieving maximum conciseness without sacrificing clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 parameters, no output schema, no annotations), the description is adequate for basic usage but lacks important details such as output format, error handling, or processing time. A more complete description would include what the tool returns or how to handle failures.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds meaningful context: referenceImages should contain source file for edits, and prompt should focus on the change. It also suggests omitting certain parameters to use defaults, which enhances understanding beyond the schema definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Generate or edit one image with ImgLume', specifying the verb (generate/edit) and resource (image). It distinguishes from sibling tools like generate_video (video) and search_gallery (searching), establishing a unique purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance for editing: pass source image in referenceImages and keep prompt focused. It also advises omitting model, quality, aspectRatio to use defaults. While it doesn't explicitly state when not to use the tool, the context is clear for typical usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_videoB

Generate one video with ImgLume. Pass a reference image URL or local path for image-to-video. Omit model, quality, or aspectRatio to use live ImgLume defaults.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoOptional video model ID
promptYesDescribe subject motion, camera motion, and scene changes
qualityNoOptional video quality
promptIdNo
aspectRatioNoOptional ratio such as 16:9 or 9:16
generateAudioNoWhether to request generated audio
durationSecondsNoVideo duration from 4 to 15 seconds
referenceImagesNoPublic image URLs or absolute/local image file paths

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description only states it generates a video. Missing details on execution time, async behavior, destructive actions, or authentication needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose, no extraneous information. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 parameters and no output schema, the description lacks details on return values, error handling, or parameter interactions. Basic functionality is covered, but experienced users need more context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 88%, so most parameter descriptions are already present. The description adds value by noting that omitting model/quality/aspectRatio uses defaults, but does not explain advanced parameters like promptId or generateAudio.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The phrase 'Generate one video with ImgLume' clearly states the action and resource. Mentioning image-to-video distinguishes it from sibling tools like generate_image, but it could be more explicit about output type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides implicit guidance by mentioning optional parameters and defaults, but does not explicitly state when to use this tool versus siblings or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_inspirationA
Read-only

Get the full prompt, preview media, recommendations, and attribution for one result returned by search_gallery.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYesImgLume inspiration ID

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Description discloses key behavioral trait: it returns comprehensive data for one result. Annotations already indicate readOnlyHint, so description enhances with specific return contents.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence that is front-loaded and contains all essential information. No redundancy or unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has one parameter, no output schema, and description explains what is returned. Given simplicity and no nested objects, description is fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Parameter 'id' is fully described in schema (ImgLume inspiration ID). Description adds context that id comes from search_gallery, but this is marginal beyond schema. Baseline 3 due to high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states it gets full details for a single result from search_gallery, listing specific elements (prompt, preview media, recommendations, attribution). Distinguishes from sibling search_gallery which returns a list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implicitly clear that this tool is used after search_gallery to retrieve detailed information for a specific result. No explicit exclusions or alternatives, but context is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_modelsA
Read-only

List the image and video models currently available from ImgLume, including supported quality, aspect-ratio, and live credit-cost values. Use when model choice, capability, or cost matters.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, indicating a safe read operation. The description adds value by specifying exactly what information is listed (supported quality, aspect-ratio, credit-cost). No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences: first states the purpose and specifics, second advises when to use. No redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters or output schema, the description fully covers the tool's purpose and usage context. It is sufficient for an agent to understand and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters are defined, so the baseline is 4. The description is unaffected by parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists image and video models from ImgLume with details on quality, aspect ratio, and credit cost. It distinguishes from sibling tools that generate or search content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states 'Use when model choice, capability, or cost matters.' Provides clear context for when to use, though no exclusions or alternatives are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedenhance_prompt
    • First observedgenerate_image
    • First observedgenerate_video
    • First observedget_inspiration
    • First observedlist_models
    • First observedsearch_gallery

TDQS

A4.1/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: searching, retrieving inspiration, enhancing prompts, listing models, and generating images or videos. No overlap in functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case (e.g., search_gallery, generate_image), making it easy to predict tool behavior.

Tool Count5/5

Six tools cover the essential workflow of visual inspiration and generation: search, get details, enhance prompt, list models, generate image/video. The count is well-scoped for this domain.

Completeness5/5

The tool set provides a complete lifecycle for visual generation: inspiration discovery, prompt refinement, model selection, and generation of images or videos. No obvious gaps.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers