Skip to main content
Layer provides an MCP (Model Context Protocol) server that lets you generate images, 3D assets, video, and audio directly from AI conversations — no code required.

Connect to Layer

Connect using your Layer account — recommended for most agents.
  1. Open Settings > Developer > MCP Servers.
  2. Add this config:
    {
      "mcpServers": {
        "Layer": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://mcp.app.layer.ai/mcp"
          ]
        }
      }
    }
    
  3. Requires Node.js. mcp-remote is installed automatically via npx.

Available tools

The MCP server exposes the following tools. Your AI agent selects and calls them automatically based on your prompts.

Instructions

ToolDescription
get_instructionsReturns platform guidance, Creative Unit pricing info, and error codes
get_workflow_instructionsReturns the full workflow lifecycle: discover, estimate, execute, poll, display
get_forge_instructionsReturns the forge (direct model execution) lifecycle
These are called automatically to understand how to use the platform. You don’t need to invoke them directly.

Workspaces

ToolDescription
list_workspacesList all workspaces you belong to, including Creative Unit balances
get_workspaceGet details for a specific workspace

Models

ToolDescription
get_model_recommendationsGet curated model recommendations by category
list_modelsSearch and filter models by modality, capabilities, or text query
get_modelGet full details for a model including capabilities and prompt format
Models can be filtered by modality (image, video, three_d, audio) and by capabilities like inpainting, style_reference, text_to_3d, lipsync, and more.

Workflows

Workflows are multi-step pipelines built in the Layer app’s Blueprint editor.
ToolDescription
list_workflowsList available workflows with their inputs and outputs
estimate_workflow_priceCheck the Creative Unit cost before running
execute_workflowRun a workflow (async — returns a run_id)
get_workflow_runPoll for workflow run status and results
cancel_workflow_runCancel a running workflow and release reserved CUs

Forge (direct model execution)

Forge runs a single model directly, giving you full control over parameters.
ToolDescription
estimate_forge_priceCheck the Creative Unit cost for a generation
execute_forgeRun inference on a model (async — returns an inference_id)
get_forge_runPoll for forge run status and generated assets
Forge supports the full range of generation parameters: prompts, dimensions, batch size, guidance files (reference images, masks, poses, depth maps), video effects, 3D options, audio settings, and post-processing (upscale, vectorize, remove background).

Files

ToolDescription
request_file_upload_urlGet a signed upload URL for a local file (image, video, or audio)
upload_fileUpload a file from a public URL for use as input in workflows or forge
request_file_upload_url supports PNG, JPEG, WebP (up to 100 MB), MP4 (up to 5 GB), and WAV/MP3 (up to 64 MB). upload_file supports PNG, JPEG, WebP, and MP4 (up to 64 MB).
request_file_upload_url is available in Claude Code CLI and similar clients. It does not work in Claude.ai or Claude Desktop due to URL allowlisting restrictions.

Example prompts

Once connected, try prompts like:
  • “Generate 4 variations of a crystal sword icon on a transparent background”
  • “Show me what image models are available for my workspace”
  • “Create a 3D model of a treasure chest from this reference image”
  • “Run the product shot workflow with a photo of my item”
  • “How many Creative Units do I have left?”
Your AI agent will pick the right tools, estimate costs, run the generation, and show you the results.

Error codes

CodeStatusMeaning
UNAUTHENTICATED401OAuth connection not completed — reconnect in your Connectors settings
FORBIDDEN403You don’t have permission for this action
INSUFFICIENT_BALANCE402Not enough Creative Units — top up in Settings > Billing
RATE_LIMITED429Max 5 concurrent runs per user per workspace
WORKSPACE_NOT_FOUND404Workspace doesn’t exist or you’re not a member
MODEL_NOT_FOUND404Model not found or not available in this workspace
WORKFLOW_NOT_FOUND404Workflow not found or not linked to this workspace
RUN_NOT_FOUND404Workflow or forge run doesn’t exist
INVALID_INPUTS400Malformed parameters or UUIDs
UPLOAD_FAILED400File could not be downloaded or stored

Troubleshooting

Layer doesn’t appear in my Connectors list (Claude) Your team admin needs to add the custom connector first. If you’re on a personal account, make sure you’re looking under Customize > Connectors. Authorization fails or times out Make sure you have an active Layer account at layer.ai. If you’re behind a VPN or corporate firewall, the OAuth redirect may be blocked — try on a direct connection. Agent doesn’t seem to use Layer tools Start a new conversation after connecting — existing conversations may not pick up new MCP servers. Check that the connector status shows as connected. Claude Code: “unknown transport” error Try --transport sse instead of --transport http — the correct flag depends on your Claude Code version. Codex: MCP server not loading Make sure mcp-remote is installed correctly. Try running npx -y mcp-remote@latest to verify. If using API Key, ensure the LAYER_PAT environment variable is set in your shell profile and you’ve restarted Codex. Cursor / VS Code / Windsurf: connection fails Verify the MCP server URL is exactly https://mcp.app.layer.ai/mcp. If using API Key, check that the Authorization header value starts with Bearer (with a space) followed by your token. Manus: tools not working Verify that your Personal Access Token is valid and the Authorization header value starts with Bearer (with a space) followed by your token. Make sure the transport type is streamableHttp in the JSON config. Gemini CLI: authentication error If using API Key, ensure the header flag is formatted correctly: --header "Authorization: Bearer YOUR_PAT". If using OAuth, the flow should trigger automatically on first tool use.