Package a local MCP server into a runtime-bundled .mcpb file.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "build-mcpb" skill from askskill: 1. Download https://raw.githubusercontent.com/anthropics/claude-plugins-official/main/plugins/mcp-server-dev/skills/build-mcpb/SKILL.md 2. Save it as ~/.claude/skills/build-mcpb/SKILL.md 3. Reload skills and tell me it's ready
Turn my local stdio MCP file server into an MCPB packaging plan, including required manifest.json fields, a directory-picker user_config, and an example Node entry command.
Provides an MCPB manifest structure, config options, and packaging guidance for local file access.
I have an MCP server that needs to control a desktop app on the user's machine. Explain why MCPB is appropriate and generate a distributable bundle structure and sample manifest.
Explains why local packaging fits and outputs an installable MCPB layout and manifest example.
Help me package a Python local MCP server as an .mcpb file, focusing on how to define mcp_config command, args, and env so users do not need Python preinstalled.
Outputs MCPB configuration guidance and runtime bundling considerations for a Python local server.
When a server needs local files, localhost services, or OS APIs, developers can use this to package a local stdio MCP server into an installable .mcpb file. Users do not need to set up Node, Python, or another toolchain themselves.
If an MCP server must drive desktop apps or integrate with software on the user's machine, this skill fits by producing a runtime-bundled distribution plan. It is especially useful when execution must happen locally rather than through a remote HTTP server.
When developers need users to choose directories or provide sensitive settings during installation, this can help structure the manifest's user_config fields. Those settings surface in the host UI and map into environment variables for server launch.
The document explains how to package a local MCP server as an MCPB bundle that includes its runtime, so users can install and run it without setting up Node, Python, or other toolchains. It covers when MCPB is appropriate versus a remote server, the bundle layout, key manifest.json fields, and how mcp_config and user_config define launch commands, environment variables, and install-time settings.
MCPB is a local MCP server packaged with its runtime. The user installs one file; it runs without needing Node, Python, or any toolchain on their machine. It's the sanctioned way to distribute local MCP servers.
MCPB is the secondary distribution path. Anthropic recommends remote MCP servers for directory listing — see https://claude.com/docs/connectors/building/what-to-build.
Use MCPB when the server must run on the user's machine — reading local files, driving a desktop app, talking to localhost services, OS-level APIs. If your server only hits cloud APIs, you almost certainly want a remote HTTP server instead (see build-mcp-server). Don't pay the MCPB packaging tax for something that could be a URL.
my-server.mcpb (zip archive)
├── manifest.json ← identity, entry point, config schema, compatibility
├── server/ ← your MCP server code
│ ├── index.js
│ └── node_modules/ ← bundled dependencies (or vendored)
└── icon.png
The host reads manifest.json, launches server.mcp_config.command as a stdio MCP server, and pipes messages. From your code's perspective it's identical to a local stdio server — the only difference is packaging.
{
"$schema": "https://raw.githubusercontent.com/anthropics/mcpb/main/schemas/mcpb-manifest-v0.4.schema.json",
"manifest_version": "0.4",
"name": "local-files",
"version": "0.1.0",
"description": "Read, search, and watch files on the local filesystem.",
"author": { "name": "Your Name" },
"server": {
"type": "node",
"entry_point": "server/index.js",
"mcp_config": {
"command": "node",
"args": ["${__dirname}/server/index.js"],
"env": {
"ROOT_DIR": "${user_config.rootDir}"
}
}
},
"user_config": {
"rootDir": {
"type": "directory",
"title": "Root directory",
"description": "Directory to expose. Defaults to ~/Documents.",
"default": "${HOME}/Documents",
"required": true
}
},
"compatibility": {
"claude_desktop": ">=1.0.0",
"platforms": ["darwin", "win32", "linux"]
}
}
server.type — node, python, or binary. Informational; the actual launch comes from mcp_config.
server.mcp_config — the literal command/args/env to spawn. Use ${__dirname} for bundle-relative paths and ${user_config.<key>} to substitute install-time config. There's no auto-prefix — the env var names your server reads are exactly what you put in env.
user_config — install-time settings surfaced in the host's UI. type: "directory" renders a native folder picker. sensitive: true stores in OS keychain. See references/manifest-schema.md for all fields.
The server itself is a standard stdio MCP server. Nothing MCPB-specific in the tool logic.
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
import { readFile, readdir } from "node:fs/promises";
import { join } from "node:path";
import { homedir } from "node:os";
// ROOT_DIR comes from what you put in manifest's server.mcp_config.env — no auto-prefix
const ROOT = (process.env.ROOT_DIR ?? join(homedir(), "Documents"));
const server = new McpServer({ name: "local-files", version: "0.1.0" });
server.registerTool(
"list_files",
{
description: "List files in a directory under the configured root.",
inputSchema: { path: z.string().default(".") },
annotations: { readOnlyHint: true },
},
async ({ path }) => {
const entries = await readdir(join(ROOT, path), { withFileTypes: true });
const list = entries.map(e => ({ name: e.name, dir: e.isDirectory() }));
return { content: [{ type: "text", text: JSON.stringify(list, null, 2) }] };
},
);
…
MCPB is a distribution format that packages a local MCP server together with its runtime, so users can install one file and run it. The docs describe it as a way to install and distribute local stdio MCP servers.
Use MCPB when the server must run on the user's machine, such as for local files, desktop apps, localhost services, or OS APIs. If the server only calls cloud APIs, the docs suggest a remote HTTP server is usually a better fit.
The manifest examples show server.type can be node, python, or binary, while actual launch behavior is controlled by mcp_config command, args, and env. user_config can define install-time settings such as a directory picker; see the source repository for more fields.
Create and structure reusable slash commands for Claude Code workflows.
Browse Anthropic’s official directory of quality Claude Code plugins.
Create Claude Code plugin hooks for tool validation and event-driven automation.
Helps developers plan the right MCP server architecture and build approach.
Build single-file interactive HTML playgrounds with live preview and prompt export.
Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".
Aggregate multiple MCP servers into a few fixed tools for AI apps.
Run terminal commands, execute Python, and manage files for local automation.
Search files, run Shortcuts, manage Homebrew, and use local models on macOS.
Discover, browse, and install MCP servers from a desktop app.
Let AI read, write, search files, and run local commands.
Build local MCP servers and AI tools from plain-language descriptions.