Host-OS wheels (nw-mcp-builder without a prior Linux build)¶
uvrunnw-mcp-builder-c<connector_id>
builds wheels for whatever OS/Python you are on (Windows → win_amd64, Linux → linux, etc.) and copies the newest .whl into out/<name>-mcp/wheels/. Those host wheels are fine for:
running the generated host locally (uv run python -m …)
MCP Inspector
ToolHive remote MCP servers when the remote runtime matches that OS
They are not suitable for the generated Linux Docker image used as a ToolHive local MCP server.
Generated MCP host projects (one folder per connector)
Generated hosts are thin wrappers around node-wire’s McpServer. Auth, telemetry, and connector logic stay in node-wire — the host only wires wheels, config, and env.
# Full run: build host-OS wheels + use/create fixture + generate project# For Toolhive testing proceed with the second command if you alread have linux based wheel files.# This command will be generating platform depended wheels filesuvrunnw-mcp-builder-c<connector_id>
# Exampleuvrunnw-mcp-builder-cgoogle_drive
# Reuse existing wheels (required after Linux build-packages.sh for ToolHive Docker)uvrunnw-mcp-builder-c<connector_id>--skip-build-wheels
# Exampleuvrunnw-mcp-builder-csalesforce--skip-build-wheels
# Replace an existing generated projectuvrunnw-mcp-builder-c<connector_id>--force-output
# Exampleuvrunnw-mcp-builder-cfhir_epic--force-output
# Regenerate fixture from connector sourceuvrunnw-mcp-builder-c<connector_id>--force-fixture
# Exampleuvrunnw-mcp-builder-cslack--force-fixture
cdout/<name>-mcp
# Examplecdout/google-drive-nw-mcp
cp.env.example.env# optional locally; or inject secrets via env (ToolHive)uvsync--python3.14# match wheel ABI (cp314 on many Windows builds)uvrunpython-m<module_name>
# Exampleuvrunpython-mgoogle_drive_nw_mcp
HTTP MCP (default) listens on port 8081. For stdio (e.g. Cursor / MCP Inspector):
ToolHive local MCP (Docker image from the generated host)¶
If you will run this as a local MCP server in ToolHive, build the Docker image from the generated project (after placing Linux wheels — see Platform and ToolHive):
Scope YAML files describe the MCP server metadata for connector mode. They are not used to codegen HTTP clients — node-wire dispatches tools at runtime from the connector wheel.
Auto-generated — scans logic.py (and sibling .py files) for action names when the fixture is missing or --force-fixture is set
Hand-maintained — files like fhir_epic_nw.yaml can include richer tool descriptions; existing fixtures are kept unless you pass --force-fixture
Every generated thin host prefers process environment (ToolHive secrets, Docker -e, K8s). If out/<name>-mcp/.env exists, it fills unset keys only (override=False). It does not load the node-wire monorepo or cwd .env. Vendored MCP/REST dotenv merge is disabled via NW_REST_LOAD_DOTENV=false. A missing project .env is OK when secrets/env are already injected.
Set these in .env (start from .env.example):
Variable
Default
Meaning
NW_MCP_TRANSPORT
streamable-http
stdio or streamable-http
NW_MCP_PORT
8081
HTTP port when using streamable-http
NW_ALLOWED_CONNECTORS
<connector_id>
Forced by the thin host
NW_MCP_AUTH_DISABLED
true
Local dev / MCP Inspector
NW_MCP_SCOPE_POLICY_DEFAULT
allow
Local dev tool access
NW_CONFIG_PATH
config/connectors.yaml
Connector registry config
Connector-specific secrets (any connector) are listed in .env.example when auto-detected from config/connectors.yaml and sample.env. Provide them via process env (ToolHive/Docker) or copy into the generated project.env for unset keys — do not rely on the monorepo .env.
Note: MCP Inspector “Bearer token” is for MCP server auth, not upstream API credentials. Put connector secrets in process env or the generated project’s .env.
The same connector-mode logic originated in the mcp-builder repo (mcp-builder from-connector). nw-mcp-builder is a minimal copy that lives inside node-wire so you can generate and run MCP hosts without checking out mcp-builder.