BloopAI/vibe-kanban · error

Missing required field at path: ${mcp_config.servers_path.jo

Error message

Missing required field at path: ${mcp_config.servers_path.join('.')}

What it means

While walking servers_path in validateFullConfig, if current[key] is undefined the required segment is absent from the full config, so this error is thrown. The MCP servers section expected at that path does not exist in the loaded config file.

Source

Thrown at packages/web-core/src/shared/lib/mcpStrategies.ts:43

      const lastKey = cfg.servers_path[cfg.servers_path.length - 1];
      current[lastKey] = cfg.servers;
    }
    return fullConfig;
  }
  static validateFullConfig(
    mcp_config: McpConfig,
    full_config: JsonValue
  ): void {
    let current: JsonValue = full_config;
    for (const key of mcp_config.servers_path) {
      if (!isJsonObject(current)) {
        throw new Error(
          `Expected object at path: ${mcp_config.servers_path.join('.')}`
        );
      }
      current = current[key];
      if (current === undefined) {
        throw new Error(
          `Missing required field at path: ${mcp_config.servers_path.join('.')}`
        );
      }
    }
    if (!isJsonObject(current)) {
      throw new Error('Servers configuration must be an object');
    }
  }
  static extractServersForApi(
    mcp_config: McpConfig,
    full_config: JsonValue
  ): JsonObject {
    let current: JsonValue = full_config;
    for (const key of mcp_config.servers_path) {
      if (!isJsonObject(current)) {
        throw new Error(
          `Expected object at path: ${mcp_config.servers_path.join('.')}`
        );

View on GitHub (pinned to 4deb7eca8f)

Solutions

  1. Call McpConfigStrategyGeneral.createFullConfig(cfg) to build a config that contains the servers_path structure, then validate that.
  2. Or merge missing intermediate objects into full_config before validation.
  3. Verify you loaded the correct config file for this strategy (right app, right path).
  4. Check servers_path in the McpConfig matches the target tool's documented schema.

Example fix

// before: validating an empty config
validateFullConfig(cfg, {}); // throws
// after: construct the structure first
const full = McpConfigStrategyGeneral.createFullConfig(cfg);
validateFullConfig(cfg, full);
Defensive patterns

Strategy: validation

Validate before calling

function pathExists(full, path) {
  let cur = full;
  for (const k of path) {
    if (typeof cur !== 'object' || cur === null || !(k in cur)) return false;
    cur = cur[k];
  }
  return true;
}
if (!pathExists(fullConfig, cfg.servers_path)) {
  fullConfig = McpConfigStrategyGeneral.createFullConfig(cfg);
}

Type guard

function hasServersPath(full: unknown, path: string[]): boolean {
  let cur: unknown = full;
  for (const k of path) {
    if (typeof cur !== 'object' || cur === null || Array.isArray(cur)) return false;
    cur = (cur as Record<string, unknown>)[k];
  }
  return cur !== undefined;
}

Try / catch

try {
  McpConfigStrategyGeneral.validateFullConfig(cfg, fullConfig);
} catch (e) {
  if (e instanceof Error && e.message.startsWith('Missing required field at path')) {
    fullConfig = McpConfigStrategyGeneral.createFullConfig(cfg); // seed missing sections
  } else throw e;
}

Prevention

When it happens

Trigger: full_config lacks one of the intermediate/last keys of servers_path — e.g. path ['mcp','servers'] but the config has no 'mcp' key at all, or has 'mcp' without 'servers'; a freshly created/empty config file; wrong strategy's servers_path applied to this config.

Common situations: First run before the tool has ever written its config; user deleted keys by hand; switching between MCP clients (e.g. Claude Desktop vs Cursor) whose config shapes differ.

Related errors


AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29). Data as JSON: /api/errors/0725bf6f53c62163. Report an issue: GitHub.