@leg3ndy/mcpb
v0.1.0
Published
MCP bundle manifest validation and config helpers for Otto plugins.
Readme
@leg3ndy/mcpb
MCP bundle manifest validation and configuration helpers for Otto plugins.
This package is intentionally small. It provides the runtime contract Otto Code
needs to load .mcpb and .dxt bundles:
- manifest validation
- user configuration option types
- MCP server config generation from bundle manifests
${user_config.KEY},${__dirname}, and system directory substitution
Installation
npm install @leg3ndy/mcpbValidate a Manifest
import { McpbManifestSchema } from '@leg3ndy/mcpb'
const result = McpbManifestSchema.safeParse(manifestJson)
if (!result.success) {
console.error(result.error.flatten())
}Generate MCP Config
import { getMcpConfigForManifest } from '@leg3ndy/mcpb'
const config = await getMcpConfigForManifest({
manifest,
extensionPath: '/path/to/extracted/bundle',
systemDirs: {
HOME: process.env.HOME ?? '',
},
userConfig: {
API_KEY: 'secret',
},
pathSeparator: '/',
})
console.log(config)Supported Server Forms
The first release supports:
- direct
server.command/server.argsstdio configs - direct
server.urlremote configs forhttp,sse, andws server.mcp_configobject passthroughnode,python, andbinaryserver entry points
License
UNLICENSED. Copyright LEG3NDY.
