MCP-Web MCPB Bundle API
McpBundleOptions
Interface — packages/mcpb/src/types.ts
Options for generating an MCPB bundle.
Properties:
displayName?: stringDisplay name shown in Claude Desktop's extension list. Defaults to the MCPWeb config name.
version?: stringBundle version (semantic version format). Defaults to "1.0.0".
description?: stringBundle description. Defaults to the MCPWeb config description.
author?: {
name: string;
email?: string;
url?: string;
}Author information.
icon?: string | BlobIcon for the extension. Can be:
- A URL to fetch the icon from
- A Blob containing the icon data
Should be a PNG image. If provided, it will be included in the bundle as icon.png.
clientBundleUrl?: stringOverride the default CDN URL for fetching the
McpBundleResult
Interface — packages/mcpb/src/types.ts
Result of generating an MCPB bundle.
Properties:
blob: BlobThe .mcpb file as a Blob, ready to be downloaded or processed.
filename: stringSuggested filename for the bundle (e.g., "my-app.mcpb").
download: () => voidHelper function to trigger browser download of the bundle. Creates a temporary download link and clicks it.
ManifestJson
Interface — packages/mcpb/src/types.ts
MCPB manifest.json structure (v0.3).
Properties:
manifest_version: stringname: stringdisplay_name?: stringversion: stringdescription: stringauthor: {
name: string;
email?: string;
url?: string;
}server: {
type: 'node';
entry_point: string;
mcp_config: {
command: string;
args: string[];
env: Record<string, string>;
};
}icon?: stringtools_generated: booleancompatibility: {
platforms: string[];
runtimes: {
node: string;
};
}fetchClientBundle
Function — packages/mcpb/src/fetch-client.ts
Fetches the pre-built
fetchClientBundle(customUrl?: string): Promise<string>getMcpBundle
Function — packages/mcpb/src/get-mcp-bundle.ts
Generates a pre-configured MCPB bundle for installation in Claude Desktop.
This function creates a .mcpb file (which is a zip archive) containing:
- manifest.json with pre-baked MCP_SERVER_URL and AUTH_TOKEN
- server/index.js (the standalone
getMcpBundle(mcpWeb: MCPWeb, options: McpBundleOptions): Promise<McpBundleResult>generateManifest
Function — packages/mcpb/src/manifest.ts
Generates a MCPB manifest.json from an MCPWeb instance and options.
The manifest includes pre-baked environment variables (MCP_SERVER_URL and AUTH_TOKEN) so the user doesn't need to configure anything after installation.
generateManifest(mcpWeb: MCPWeb, options: McpBundleOptions): ManifestJson