paperclipai/paperclip · error

Google Sheets service-account credentials are required. Set

Error message

Google Sheets service-account credentials are required. Set GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON or GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON_PATH.

What it means

Error "Google Sheets service-account credentials are required. Set GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON or GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON_PATH." thrown in paperclipai/paperclip.

Source

Thrown at packages/google-sheets-mcp-server/src/config.ts:94

function isLoopbackBindHost(host: string): boolean {
  const normalized = host.trim().toLowerCase().replace(/^\[(.*)\]$/, "$1");
  if (normalized === "localhost" || normalized === "::1") return true;
  if (isIP(normalized) === 4) {
    return normalized.split(".")[0] === "127";
  }
  return false;
}

function readServiceAccountJson(input: GoogleSheetsMcpConfigInput): { raw: string; source: string } {
  const explicitPath = input.serviceAccountJsonPath?.trim();
  if (explicitPath) {
    return { raw: readFileSync(explicitPath, "utf8"), source: explicitPath };
  }

  const inlineOrPath = input.serviceAccountJson?.trim();
  if (!inlineOrPath) {
    throw new Error(
      "Google Sheets service-account credentials are required. Set GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON or GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON_PATH.",
    );
  }

  if (inlineOrPath.startsWith("{")) {
    return { raw: inlineOrPath, source: "inline JSON" };
  }

  return { raw: readFileSync(inlineOrPath, "utf8"), source: inlineOrPath };
}

export function createGoogleSheetsMcpConfig(input: GoogleSheetsMcpConfigInput): GoogleSheetsMcpConfig {
  const allowedSpreadsheetIds = parseAllowedSpreadsheetIds(input.allowedSpreadsheetIds);
  if (allowedSpreadsheetIds.length === 0) {
    throw new Error("At least one allowed spreadsheet ID is required.");
  }

  const { raw, source } = readServiceAccountJson(input);

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Set GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON to the service-account JSON, or GOOGLE_SHEETS_SERVICE_ACCOUNT_JSON_PATH to a file containing it.

When it happens

Trigger: Thrown at packages/google-sheets-mcp-server/src/config.ts:94 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/79f06d7c9859284d. Report an issue: GitHub.