Path to the image file (absolute or relative to cwd)
Optional icon configuration (sizes, theme, mimeType override)
Icon object with base64 data URI
import { createApp, iconFromFile } from "@mcp-apps-kit/core";
const app = createApp({
name: "my-app",
version: "1.0.0",
icons: [iconFromFile("./assets/icon.png")],
tools: { ... }
});
Create an Icon object from a local image file.
Reads the file, converts it to a base64 data URI, and returns an Icon object ready for use in createApp configuration.
Size limit: Files must be under 1MB. For larger images, host them externally and use a URL instead. Consider using SVG for logos (smaller size, scalable).