Skip to main content

Prerequisites

  1. Node.js 18+ installed
  2. A MeiGen account at meigen.ai
  3. An API key (for image generation — get one here)

Installation

Claude Code

1

Install the plugin

Run this command in your terminal:
claude mcp add libreart -- npx -y libreart
2

Configure your API key

When prompted by the plugin, run /meigen:setup and paste your API key.Alternatively, set it as an environment variable:
export MEIGEN_API_KEY=meigen_sk_YOUR_API_KEY
3

Start using it

Just ask Claude to generate images naturally:
  • “Generate a logo for my app”
  • “Search the gallery for landscape photography”
  • “Enhance this prompt: a cat in space”

Cursor

1

Open MCP settings

Go to Cursor SettingsMCPAdd new MCP server.
2

Add configuration

Add the following to your MCP configuration:
{
  "mcpServers": {
    "libreart": {
      "command": "npx",
      "args": ["-y", "libreart"],
      "env": {
        "MEIGEN_API_KEY": "meigen_sk_YOUR_API_KEY"
      }
    }
  }
}
3

Restart Cursor

Restart the editor for the changes to take effect.

Windsurf

1

Open MCP settings

Go to Windsurf SettingsMCPAdd Server.
2

Add configuration

Use the same JSON configuration as Cursor:
{
  "mcpServers": {
    "libreart": {
      "command": "npx",
      "args": ["-y", "libreart"],
      "env": {
        "MEIGEN_API_KEY": "meigen_sk_YOUR_API_KEY"
      }
    }
  }
}
3

Restart Windsurf

Restart the editor for the changes to take effect.

Verify Installation

After setup, ask your AI assistant:
“List the available MeiGen models”
If configured correctly, it will call the list_models tool and show you the available models with their pricing.

Usage Examples

Generate an image

“Generate a minimalist tech logo using Nanobanana 2, square format”

Search for inspiration

“Search the MeiGen gallery for cyberpunk cityscapes”

Enhance a prompt

“Enhance this prompt for image generation: a sunset over mountains”

Get random inspiration

“Give me some inspiration for AI art”

Troubleshooting

Your API key is not set. Run /meigen:setup in Claude Code, or add the MEIGEN_API_KEY environment variable to your MCP configuration.
API keys can only use purchased credits, not daily free credits. Purchase credits at meigen.ai.
  1. Make sure Node.js 18+ is installed
  2. Try running npx -y libreart directly to check for errors
  3. Restart your editor
  4. Check that the MCP configuration JSON is valid
Some models take longer to generate. Niji 7 can take up to 60 seconds, and Veo 3.1 (video) can take several minutes. The plugin will wait automatically.