mcpb/examples
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Bryan Thompson dace08d31f
fix(examples/chrome-applescript): sanitize tab_id to prevent AppleScript injection
The inputSchema `type: "number"` is advisory only — runtime may receive a
string payload that gets interpolated into the osascript template. Coerce
tab_id via Number.parseInt before interpolating at all four sites.

Affected sites:
- findTabById(tabId)
- executeTabOperation(tabId, ...) (close_tab, switch_to_tab, reload_tab,
  go_back, go_forward)
- execute_javascript handler
- get_page_content handler

The shared toSafeTabId() helper returns null for missing values (preserving
the active-tab fallthrough) and throws on non-numeric input (surfacing misuse
via the existing request-level try/catch, consistent with the missing-code
path in execute_javascript).
2026-04-17 13:49:30 -05:00
..
calculator-rust chore: remove Dockerfile and .gitignore from calculator-rust example 2026-03-13 16:41:30 -05:00
chrome-applescript fix(examples/chrome-applescript): sanitize tab_id to prevent AppleScript injection 2026-04-17 13:49:30 -05:00
file-manager-python fix: repair broken examples and graduate UV runtime from experimental 2026-03-12 11:16:30 -05:00
file-system-node Bump version and update dependencies in package.json 2025-12-03 17:07:25 -08:00
hello-world-node fix: repair broken examples and graduate UV runtime from experimental 2026-03-12 11:16:30 -05:00
hello-world-uv fix: repair broken examples and graduate UV runtime from experimental 2026-03-12 11:16:30 -05:00
README.md feat: add Rust binary calculator example 2026-03-13 16:36:47 -05:00

MCPB Examples

This directory contains example MCP Bundles that demonstrate the MCPB format and manifest structure. These are reference implementations designed to illustrate how to build MCPB extensions.

⚠️ Not Production Ready

Important: These examples are NOT intended for production use. They serve as:

  • Demonstrations of the MCPB manifest format
  • Templates for building your own extensions
  • Simple MCP server implementations for testing

But, the MCP servers themselves are not robust secure production ready servers and should not be relied upon for production use.

Examples Included

Example Type Demonstrates
hello-world-node Node.js Basic MCP server with simple time tool
chrome-applescript Node.js Browser automation via AppleScript
file-manager-python Python File system operations and path handling
calculator-rust Binary Compiled Rust binary as MCP Bundle

Usage

Each example includes its own manifest.json and can be packed with:

dxt pack examples/hello-world-node

Use these as starting points for your own extensions, but ensure you implement proper security measures before deploying to users.