Skip to content

Bundle Configuration

The bundles array in nimblebrain.json declares which MCP server bundles to spawn at startup. Each entry can reference a bundle from the mpak registry by name, a local directory by path, or a remote MCP server by URL.

Bundles declared in the config file are merged with the default bundles (@nimblebraininc/bash) unless you set noDefaultBundles: true.

Every bundle entry must include exactly one of name, path, or url.

Install a bundle from the mpak registry by its scoped name.

{
"bundles": [
{ "name": "@nimblebraininc/tasks" },
{ "name": "@nimblebraininc/postgres" }
]
}

NimbleBrain downloads the bundle from mpak, reads its manifest, spawns the MCP server process, and registers its tools.

Point to a bundle directory on the local filesystem. Paths are resolved relative to the config file location.

{
"bundles": [
{ "path": "../mcp-servers/hello" },
{ "path": "/opt/bundles/my-custom-server" }
]
}

The directory must contain a valid MCPB manifest.json with an mcp_config section that tells NimbleBrain how to spawn the server process.

Connect to an MCP server running at a remote URL. You must provide a serverName for display and tool namespacing.

{
"bundles": [
{
"url": "https://mcp.example.com/mcp",
"serverName": "example",
"transport": {
"type": "streamable-http",
"auth": { "type": "bearer", "token": "sk-..." }
}
}
]
}

Remote bundles do not download or spawn a local process. Instead, NimbleBrain connects to the server over HTTP using the specified transport configuration.

These fields apply to all bundle types.

FieldTypeDefaultDescription
envobject{}Environment variables passed to the bundle process. Each key-value pair is a string.
protectedbooleanfalseWhen true, the bundle cannot be uninstalled via the nb__manage_bundle tool or the API.
trustScorenumber | nullnullMTF trust score (0—100) recorded at install time. Set automatically by the install flow.
uiobject | nullnullUI metadata from the bundle manifest. Set automatically at install time.

Use env to inject secrets or configuration into a bundle process:

{
"bundles": [
{
"name": "@nimblebraininc/postgres",
"env": {
"DATABASE_URL": "postgres://localhost:5432/mydb",
"PG_MAX_CONNECTIONS": "10"
},
"protected": true
}
]
}

The ui field is populated automatically when you install a bundle that declares UI metadata in its manifest. You do not need to set this manually.

{
"ui": {
"name": "Tasks",
"icon": "clipboard",
"primaryView": {
"resourceUri": "ui://tasks/index.html"
}
}
}
FieldTypeDescription
ui.namestringHuman-readable app name shown in the sidebar.
ui.iconstringEmoji or icon identifier.
ui.primaryView.resourceUristringui:// resource URI for the app’s full-page view.

Remote bundles accept a transport object that controls how NimbleBrain connects to the server.

{
"url": "https://mcp.example.com/mcp",
"serverName": "example",
"transport": {
"type": "streamable-http",
"auth": { "type": "bearer", "token": "sk-..." },
"headers": {
"X-Custom-Header": "value"
},
"reconnection": {
"maxRetries": 5,
"initialReconnectionDelay": 1000,
"maxReconnectionDelay": 30000
},
"sessionId": "resume-session-abc123"
}
}
FieldTypeDefaultDescription
type"streamable-http" | "sse""streamable-http"Transport protocol. Streamable HTTP is the default MCP transport. Use "sse" for servers that only support Server-Sent Events.
authobjectAuthentication method. See auth types.
headersobject{}Custom HTTP headers sent with every request. Keys and values are strings.
reconnectionobjectReconnection behavior. See reconnection.
sessionIdstringMCP session ID for resuming an existing session.
{
"auth": {
"type": "bearer",
"token": "sk-your-api-key"
}
}

Sends an Authorization: Bearer <token> header with every request.

Control how NimbleBrain handles dropped connections to remote servers.

FieldTypeDescription
maxRetriesnumberMaximum number of reconnection attempts before giving up.
initialReconnectionDelaynumberMilliseconds to wait before the first retry.
maxReconnectionDelaynumberMaximum milliseconds between retries (backs off exponentially up to this cap).

By default, NimbleBrain spawns @nimblebraininc/bash alongside your configured bundles. To disable this:

{
"noDefaultBundles": true,
"bundles": [
{ "name": "@nimblebraininc/tasks" }
]
}

A config file with all three bundle types:

{
"$schema": "https://schemas.nimblebrain.ai/nimblebrain.json",
"version": "1",
"bundles": [
{
"name": "@nimblebraininc/postgres",
"env": { "DATABASE_URL": "postgres://localhost:5432/mydb" },
"protected": true
},
{
"path": "./my-local-server"
},
{
"url": "https://mcp.example.com/mcp",
"serverName": "example-remote",
"transport": {
"type": "streamable-http",
"auth": { "type": "bearer", "token": "sk-..." },
"headers": { "X-Tenant": "acme" },
"reconnection": {
"maxRetries": 3,
"initialReconnectionDelay": 1000,
"maxReconnectionDelay": 10000
}
}
}
]
}