affaan-m/ECC · error · Error

ECC_MEMORY_HARNESS must identify this MCP server with a lowe

Error message

ECC_MEMORY_HARNESS must identify this MCP server with a lowercase harness slug.

What it means

resolveServiceSecurity requires ECC_MEMORY_HARNESS (or an explicit harness option) to be a lowercase slug identifying the calling MCP client; it must match SLUG_REGEXP so per-harness namespacing stays safe. Missing, uppercase, or malformed values all fail here.

Source

Thrown at scripts/memory-mcp.mjs:169

  }
}

function isRecord(value) {
  return value !== null && typeof value === 'object' && !Array.isArray(value);
}

function isValidRequestId(value) {
  return (
    (typeof value === 'string' && value.length > 0 && value.length <= 128)
    || (typeof value === 'number' && Number.isSafeInteger(value))
  );
}

function resolveServiceSecurity(options = {}) {
  const env = isRecord(options.env) ? options.env : process.env;
  const harness = options.harness ?? env.ECC_MEMORY_HARNESS;
  if (typeof harness !== 'string' || !SLUG_REGEXP.test(harness)) {
    throw new Error(
      'ECC_MEMORY_HARNESS must identify this MCP server with a lowercase harness slug.'
    );
  }
  return Object.freeze({
    harness,
    allowUserScope: options.allowUserScope ?? env.ECC_MEMORY_ALLOW_USER_SCOPE === '1',
  });
}

function assertScopesAuthorized(scopes, security) {
  const requestedScopes = scopes || DEFAULT_RECALL_SCOPES;
  if (!security.allowUserScope && requestedScopes.includes('user')) {
    throw new JsonRpcError(
      -32602,
      'The user memory scope is disabled for this MCP server.'
    );
  }
  return requestedScopes;

View on GitHub (pinned to 06c5e118c4)

Solutions

  1. Review the constraint in the error message, correct the input accordingly, and re-run.
Defensive patterns

Strategy: validation

When it happens

Trigger: Triggered when memory-mcp.mjs rejects the current invocation: ECC_MEMORY_HARNESS must identify this MCP server with a lowercase harness slug.

Common situations: Occurs while running scripts/memory-mcp.mjs with invalid arguments, missing flags, or a failing external dependency; the guard at scripts/memory-mcp.mjs:169 aborts the command with this message.


AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18). Data as JSON: /api/errors/aacc7f63fa4ecee5. Report an issue: GitHub.