MCP Apps Kit - v0.5.0
    Preparing search index...

    Interface AppConfig<T>

    Main application configuration

    This is the input to createApp(). Supports both single-version and multi-version formats.

    const config: AppConfig = {
    name: "my-app",
    version: "1.0.0",
    tools: {
    greet: defineTool({
    description: "Greet a user",
    input: z.object({ name: z.string() }),
    output: z.object({ message: z.string() }),
    handler: async ({ name }) => ({ message: `Hello, ${name}!` }),
    ui: defineUI({ html: "./widget.html" }),
    }),
    },
    };
    interface AppConfig<T extends ToolDefs = ToolDefs> {
        config?: GlobalConfig;
        icon?: string;
        icons?: Icon[];
        name: string;
        plugins?: Plugin<unknown>[];
        tools: T;
        version: string;
    }

    Type Parameters

    Index

    Properties

    config?: GlobalConfig

    Global configuration options.

    icon?: string

    Server icon URL or data URI (shorthand for single icon).

    For multiple icons or advanced configuration, use icons instead.

    icon: "https://example.com/icon.png"
    
    icon: "data:image/svg+xml;base64,PHN2Zy..."
    
    icons?: Icon[]

    Server icons for MCP client display.

    Allows specifying multiple icons with different sizes, formats, and themes. Follows the MCP specification for Implementation icons.

    icons: [
    { src: "https://example.com/icon-48.png", mimeType: "image/png", sizes: ["48x48"] },
    { src: "https://example.com/icon-96.png", mimeType: "image/png", sizes: ["96x96"] },
    { src: "https://example.com/icon-dark.png", theme: "dark" }
    ]
    name: string

    App name. Used in MCP server registration and protocol metadata.

    Should be a valid npm package name format (lowercase, no spaces).

    plugins?: Plugin<unknown>[]

    Plugins to extend app behavior. Plugins provide lifecycle hooks and execution hooks without modifying tool handlers.

    import { loggingPlugin } from '@mcp-apps-kit/core';

    const config = {
    // ... other config
    plugins: [
    loggingPlugin
    ]
    };
    tools: T

    Tool definitions. Each key is the tool name, value is the tool definition.

    version: string

    Semantic version of the app.

    "1.0.0"