Skip to main content
Glama

expo-assets-mcp

Local MCP server to generate and transform Expo assets. Also includes a CLI script to run it directly from the terminal.


Project structure

src/
├── expo-assets.ts   ← reusable logic (asset definitions, image transformations)
├── index.ts         ← MCP server
└── generate.ts      ← CLI script
dist/                ← compiled output (generated with npm run build)

Related MCP server: Expo MCP Server

Installation

npm install
npm run build

Web Generator

A pure JavaScript version of this tool is available directly in the browser! Open index.html or visit https://elber-code.github.io/expo-assets-mcp/ to access a rich GUI that features:

  • Interactive Cropper: Perfectly center your icons with a 1:1 aspect ratio.

  • Live Icon Previews: See how your icon looks in iOS (squircle) and Android (circle) shapes with transparent or solid backgrounds in real-time.

  • Advanced Banners: Generate App Store mockups or promo banners by placing your Expo assets (e.g. Splash, Icon) inside custom resolutions to download individually.

  • Custom ZIP Assets: Easily add extra custom-sized assets to the final ZIP.

  • Bilingual Interface: Seamlessly switch between English and Spanish (index_es.html).

No backend or server required; everything is processed locally in your browser!


CLI usage

Generates all Expo assets from a source image. Creates a folder next to the image named <image>-assets/.

node dist/generate.js <image-path> [options]

Options:

Flag

Description

--bg "#rrggbb"

Background color. Omit for transparent

--no-overwrite

Skip files that already exist

Examples:

# Transparent background
node dist/generate.js /Users/me/logo.png

# With background color
node dist/generate.js /Users/me/logo.png --bg "#E6F4FE"

Output:

/Users/me/logo-assets/
├── icon.png
├── android-icon-foreground.png
├── android-icon-background.png
├── android-icon-monochrome.png
├── splash-icon.png
├── favicon.png
├── react-logo.png
├── react-logo@2x.png
├── react-logo@3x.png
└── partial-react-logo.png

MCP usage (Claude Desktop)

Copy claude-config.example.json to claude-config.json, fill in the correct path, then merge it into:

~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "expo-assets-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/expo-assets-mcp/dist/index.js"]
    }
  }
}

Test with MCP Inspector

npx @modelcontextprotocol/inspector node dist/index.js

Available MCP tools

generate_expo_icons

Generates all 10 Expo assets into a single assets/images/ folder.

Parameter

Type

Default

Description

input_image

string

Absolute path to the source image

output_dir

string

Absolute path to the Expo project's assets/images/ folder

background_color

string

transparent

Background color in hex (e.g. #E6F4FE). Omit for transparent.

overwrite

boolean

true

Overwrite existing files

proportions

object

see table

Content proportion per asset (0.1–1.0)

Proportions:

Key

Asset(s)

Default

icon

icon.png

0.7

android_adaptive

android-icon-foreground/background.png

0.33

android_monochrome

android-icon-monochrome.png

0.33

splash

splash-icon.png

0.5

favicon

favicon.png

0.8

react_logo

react-logo.png + @2x + @3x

0.8

partial_logo

partial-react-logo.png

0.5


transform_image

Transforms an image to specific dimensions with optional content proportion and background.

Parameter

Type

Default

Description

input_image

string

Path to the source image (PNG, JPEG, WebP, TIFF, AVIF)

output_path

string

Full output path including filename and extension (e.g. /path/result.webp)

width

number

Output canvas width in pixels

height

number

Output canvas height in pixels

proportion

number

1

How much of the canvas the content fills (0.1–1.0, 1 = fills everything)

background_color

string

transparent

Canvas background color in hex. Omit for transparent.

format

png|jpeg|webp

png

Output file format

quality

number

95

Compression quality for jpeg/webp only (1 = lowest, 100 = highest)


convert_svg

Converts an SVG file to PNG, JPEG, or WebP at the specified dimensions.

Parameter

Type

Default

Description

input_svg

string

Absolute path to the source SVG file

output_path

string

Full output path including filename and extension

width

number

Output width in pixels

height

number

proportional

Output height in pixels. Omit to scale proportionally from width.

format

png|jpeg|webp

png

Output file format

background_color

string

transparent

Background color in hex. Omit for transparent (PNG only).

quality

number

95

Compression quality for jpeg/webp only (1 = lowest, 100 = highest)


Generated assets

Expo handles all platform-specific resizing automatically from these 10 files.

Source image requirements

  • Format: PNG

  • Minimum size: 1024×1024 px

  • Background: transparent (recommended)

Asset table

File

Canvas

Background

Transformation

app.json key

icon.png

1024×1024

background_color or transparent

contain, centered, prop 0.7

expo.icon

android-icon-foreground.png

512×512

Always transparent

contain, centered, prop 0.33

android.adaptiveIcon.foregroundImage

android-icon-background.png

512×512

background_color or transparent

contain, centered, prop 0.33

android.adaptiveIcon.backgroundImage

android-icon-monochrome.png

432×432

Always transparent

White silhouette, prop 0.33

android.adaptiveIcon.monochromeImage

splash-icon.png

1024×1024

Always transparent

contain, centered, prop 0.5

expo-splash-screen > image

favicon.png

48×48

Always transparent

contain, centered, prop 0.8

web.favicon

react-logo.png

100×100

Always transparent

contain, centered, prop 0.8

Decorative UI @1x

react-logo@2x.png

200×200

Always transparent

contain, centered, prop 0.8

Decorative UI @2x

react-logo@3x.png

300×300

Always transparent

contain, centered, prop 0.8

Decorative UI @3x

partial-react-logo.png

518×316

Always transparent

Right-side crop from top, prop 0.5

Decorative UI partial

Special transformations

android-icon-monochrome.png — White silhouette

Every non-transparent pixel is converted to pure white. Android 13+ uses this for Themed Icons, tinting the silhouette with the system color theme.

pixel (r, g, b, a > 10)  →  (255, 255, 255, a)
pixel (r, g, b, a ≤ 10)  →  unchanged (transparent)

partial-react-logo.png — Section crop

A section of the source image is cropped without distortion:

  • Horizontal: right side (end)

  • Vertical: from the top (start)

  • The section is scaled proportionally to fit the 518×316 canvas

partial_logo: 0.5 → right half · partial_logo: 0.33 → right third

Android adaptive icon — Safe zone

Keep important content within the 66% center (338×338 px on a 512×512 canvas) to avoid being clipped by any Android launcher shape.

┌─────────────────┐  512×512
│                 │
│  ┌───────────┐  │
│  │  safe     │  │  338×338 (66%)
│  │  zone     │  │
│  └───────────┘  │
│                 │
└─────────────────┘

Scripts

npm run build   # compile TypeScript
npm start       # start MCP server
npm run dev     # run with tsx (no compile needed)

Available Tools

3 tools
convert_svgB

Converts an SVG file to PNG, JPEG, or WebP at the specified dimensions. Supports multiple output sizes in a single call.

ParametersJSON Schema
NameRequiredDescriptionDefault
widthYesOutput width in pixels
formatNoOutput file format (default: png)png
heightNoOutput height in pixels. Omit to scale proportionally from width.
qualityNoCompression quality for jpeg/webp only (1 = lowest, 100 = highest, default: 95)
input_svgYesAbsolute path to the source SVG file
output_pathYesAbsolute path of the output file, including name and extension (e.g. /path/result.png)
background_colorNoBackground color in hex (e.g. #ffffff). Omit for transparent (only works with png).

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'Supports multiple output sizes in a single call' as a behavior, but it does not clarify whether existing output files are overwritten, what permissions are required, or how the multiple-size feature is actually invoked—especially since the schema does not reflect it. This leaves significant behavioral gaps.

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

Conciseness4/5

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

The description is only two sentences, front-loaded with the core action ('Converts an SVG file to PNG, JPEG, or WebP'). The first sentence is efficient and clear. However, the second sentence introduces a capability with no explanation, and because it may be unsupported by the schema, it slightly undermines the conciseness and value of the sentence.

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?

The description covers the core conversion behavior but omits crucial context: how 'multiple output sizes' is specified, whether output files are overwritten, and any limitations like transparency only applying to PNG. With seven parameters and no output schema, the description should provide more guidance on usage and edge cases to be 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?

The schema provides descriptions for all seven parameters, so baseline is 3. The description adds no parameter-level detail, and the claim about multiple output sizes could mislead the agent into expecting a parameter for it, which does not exist. The schema remains the primary source of parameter meaning.

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 description explicitly states the tool converts SVG to PNG/JPEG/WebP at specified dimensions, which is specific and distinguishes it from the icon generation and image transformation siblings. However, the claim 'Supports multiple output sizes in a single call' is not backed by the input schema, introducing ambiguity about the tool's actual capability.

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 intended use case is implied: convert SVG files to raster formats. However, there is no explicit guidance on when to use this tool over the sibling tools (generate_expo_icons, transform_image), no exclusions, and no mention of alternatives. The agent must infer usage from the tool name and description.

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

generate_expo_iconsA

Generates all 10 Expo assets into assets/images/: icon, android adaptive (foreground/background/monochrome), splash, favicon, react-logo (@1x/@2x/@3x) and partial.

ParametersJSON Schema
NameRequiredDescriptionDefault
overwriteNoOverwrite existing files (default: true)
output_dirYesAbsolute path to the Expo project's assets/images/ folder
input_imageYesAbsolute path to the source image (transparent PNG recommended, minimum 1024×1024)
proportionsNoContent proportion per asset (0.1–1.0). Controls how much of the canvas the content fills.
background_colorNoBackground color in hex (e.g. #E6F4FE). Omit for transparent background.

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of explaining side effects. It clearly states that files are generated into assets/images/, but it does not explicitly warn about overwriting existing files or mention prerequisites like the need for a transparent PNG. The schema documents the overwrite parameter, but the description itself is thin on behavioral details.

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 sentence that directly conveys the purpose and enumerates the outputs. Every word earns its place; it is concise and front-loaded.

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?

The description covers the full scope of generated outputs and the target directory. Given the rich schema (including nested proportions and defaults), the description is sufficient for an agent to select and invoke the tool. It could mention the required source image or the fact that it writes files, but those are present in the schema.

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 description coverage is 100%, so the schema already documents all parameters and their defaults. The description adds no parameter-specific meaning, so the baseline of 3 is appropriate.

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 uses a specific verb ('Generates') and resource ('all 10 Expo assets'), explicitly listing each output (icon, android adaptive, splash, favicon, react-logo, partial). This clearly distinguishes it from sibling tools like transform_image or convert_svg, which handle generic transformations or conversions.

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 states the tool's output directory and the full set of generated assets, providing clear context for when to use it. However, it does not explicitly mention when not to use it or name alternatives, such as using transform_image for one-off resizing.

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

transform_imageB

Transforms an image to the specified canvas dimensions with optional content proportion and background color.

ParametersJSON Schema
NameRequiredDescriptionDefault
widthYesOutput canvas width in pixels
formatNoOutput file format (default: png)png
heightYesOutput canvas height in pixels
qualityNoOutput compression quality, only applies to jpeg and webp (1 = lowest, 100 = highest, default: 95)
proportionNoHow much of the canvas the content fills (0.1–1.0, default: 1 = fills everything)
input_imageYesAbsolute path to the source image (accepts PNG, JPEG, WebP, TIFF, AVIF)
output_pathYesAbsolute path of the output file, including name and extension (e.g. /path/to/result.webp)
background_colorNoCanvas background color in hex (e.g. #ffffff). Omit for transparent background.

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It fails to explain how the transformation is applied (cropping, stretching, padding), how 'proportion' affects the layout, how 'background_color' interacts with transparency, or whether the source file is modified. These are significant undocumented behaviors for a tool with multiple options.

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

Conciseness4/5

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

The description is a single, front-loaded sentence with no filler or redundancy. It efficiently conveys the core purpose, though it could include a bit more detail without becoming verbose.

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 the tool's complexity (8 parameters, 4 required, multiple formats and options), the one-sentence description is insufficient. It does not describe the transformation result, output saving behavior, or how optional parameters interact. Without an output schema or annotations, users face many unknowns.

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?

The schema already provides detailed descriptions for all 8 parameters (100% coverage), so the description adds no extra semantic value. Its mention of 'content proportion' and 'background color' simply restates what the schema already says, without clarifying interactions or edge cases.

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 description states 'Transforms an image to the specified canvas dimensions' using a specific verb and resource, clearly indicating a dimension-changing operation. It distinguishes from siblings (generate_expo_icons, convert_svg) by focusing on canvas sizing rather than icon generation or SVG conversion. However, 'transforms' is somewhat generic and could be more specific (e.g., resize, pad).

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 the tool is used when an image needs to be fitted to a specific canvas size, but it does not explicitly state when to use it over sibling tools or provide exclusions. No alternatives or conditions are mentioned, leaving usage guidance implied rather than explicit.

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. Dates show when Glama detected each change.

  1. 3 tool updatesv1.0.0
    • First observedconvert_svg
    • First observedgenerate_expo_icons
    • First observedtransform_image

TDQS

A3.8/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: generate_expo_icons creates a predefined set of Expo assets, transform_image modifies an existing image's canvas, and convert_svg handles SVG to raster conversion. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case: generate_expo_icons, transform_image, convert_svg. This provides a predictable and readable naming convention throughout the server.

Tool Count5/5

With only 3 tools, the server is well-scoped for its specific purpose of handling Expo assets. Each tool is essential and non-redundant, fitting within the ideal range without feeling thin or excessive.

Completeness5/5

The tool surface covers the full lifecycle of asset preparation: generating standard Expo icons, transforming existing images, and converting SVGs to required formats. No obvious gaps exist for the stated purpose, as the set includes both batch generation and bespoke manipulation utilities.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/elber-code/expo-assets-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server