Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/superradcompany/tool-cli/llms.txt

Use this file to discover all available pages before exploring further.

Initialize a new MCPB package in a directory. With no arguments it runs interactively in the current directory. When run against an existing project, it detects the server type, transport, and entry point automatically and generates a manifest.json without touching your code.

Synopsis

tool init [PATH] [OPTIONS]

Options

path
string
Directory to initialize. Defaults to the current directory.
-n, --name
string
Package name. Defaults to the directory name.
-t, --type
string
Server runtime type. One of node, python, rust, or binary. (rust is accepted as an alias for binary.)
-d, --description
string
Package description written into the manifest.
-a, --author
string
Author name written into the manifest.
-l, --license
string
License identifier in SPDX format (e.g., MIT, Apache-2.0).
--http
boolean
Use HTTP transport instead of stdio. Adds a system_config.port entry to the manifest automatically.
--reference
boolean
Create a reference manifest only — no scaffolding, no entry point bundled. Use this to wrap npx/uvx commands or remote HTTP servers.
-y, --yes
boolean
Skip all interactive prompts and accept defaults.
--pm
string
Package manager to use. Node.js options: npm, pnpm, bun, yarn. Python options: uv, pip, poetry.
-e, --entry
string
Override the detected entry point. Useful when auto-detection picks the wrong file in an existing project.
--transport
string
Override the detected transport for an existing project. One of stdio or http.
-f, --force
boolean
Overwrite an existing manifest.json without prompting.
--verify
boolean
After generating the manifest, start the server and send an MCP initialize request to confirm the server responds correctly.

Reference mode options

These flags configure server.mcp_config in the manifest. Passing --command implies stdio reference mode; passing --url implies HTTP reference mode.
--command
string
Command to execute (e.g., npx, uvx). Implies stdio reference mode.
--args
string
Arguments for the command as a single space-separated string (e.g., "@anthropic/mcp-server --port 3000").
--env
string
Environment variable in KEY=VALUE format. Repeatable — pass the flag multiple times to set more than one variable.
--url
string
Remote HTTP MCP endpoint URL. Implies HTTP reference mode.
--header
string
HTTP header in KEY=VALUE format. Repeatable.
--oauth-client-id
string
Pre-registered OAuth client ID for HTTP servers.
--oauth-authorization-url
string
Custom OAuth authorization endpoint URL.
--oauth-token-url
string
Custom OAuth token endpoint URL.
--oauth-scopes
string
OAuth scopes to request, as a comma-separated string (e.g., "read,write").

Examples

# Interactive mode in current directory
tool init

# Create a Node.js MCP server
tool init my-tool -t node

# Create a Python MCP server
tool init my-tool -t python

# Skip prompts and use defaults
tool init my-tool -t node -y

# Use HTTP transport instead of stdio
tool init . --http

# Detect and migrate an existing MCP server
tool init existing-project

# Create a reference manifest only (no scaffolding)
tool init . --reference

# Use pnpm as the package manager
tool init . --pm pnpm

# Reference an external command (stdio reference mode)
tool init . --command npx --args "@anthropic/mcp-server"

# Reference a remote HTTP server
tool init . --url https://api.example.com/mcp/

# Remote HTTP server with OAuth
tool init . --url https://example.com --oauth-client-id abc

Bundled vs. reference mode

tool init produces one of two manifest shapes depending on how you use it. Bundled mode (the default) includes a server.entry_point that points to your code. When packed with tool pack, the entry point and its dependencies are bundled into the .mcpb archive. Use this for Node.js, Python, and binary servers that ship their own runtime code. Reference mode (--reference, --command, or --url) omits server.entry_point. The manifest points to an external executable or a remote URL instead. Nothing is bundled. Reference manifests produce .mcpbx archives rather than .mcpb because they use features beyond the base MCPB spec (HTTP transport, external commands, OAuth).
After scaffolding a bundled server, run tool build to install dependencies before using tool info or tool call.
Already have an MCP server? Run tool detect first to check what tool-cli finds, then run tool init to generate the manifest. See tool detect.

Build docs developers (and LLMs) love