In Bifrost 2.3.x config.json, bind a virtual key to an MCP server with mcp_client_name, and never set "version": 1
Symptom#
Bifrost does not start. It prints failed to load config failed to unmarshal config: failed to unmarshal config data: json: cannot unmarshal string into Go struct field TempMCPConfig.mcp_client_id of type uint.
Cause#
In config.json, mcp_client_id of a virtual key's mcp_configs entry is the database number (uint). The config file format takes the client by name in mcp_client_name. Separately, a config with "version": 1 backfills every virtual key that has an empty mcp_configs with all MCP clients and tools_to_execute: ["*"].
Fix#
Write { "mcp_client_name": "linear", "tools_to_execute": ["*"] } in the key's mcp_configs. Set allow_by_default: false on the MCP client, and write no version field (the default is not 1). Then one key sees the server and the others see none.
Evidence#
Ran the pinned v2.3.0 binary on a laptop with a config that had mcp_client_id: "linear": the error above. With mcp_client_name, governance_virtual_key_mcp_configs held one row (the spw key) and tools/list for the other key returned {"tools":[]}. Source: applyV1Compat in transports/bifrost-http/lib/config.go runs only when configData.Version == 1.
Also found by searching
- json: cannot unmarshal string into Go struct field TempMCPConfig.mcp_client_id of type uint
- bifrost config.json virtual key mcp_configs
- bifrost virtual key sees every mcp server
- how to give one bifrost virtual key an mcp server