paperclipai/paperclip · error
Invalid port: ${raw}
Error message
Invalid port: ${raw} What it means
Error "Invalid port: ${raw}" thrown in paperclipai/paperclip.
Source
Thrown at packages/google-sheets-mcp-server/src/config.ts:68
};
if (arg === "--service-account-json") input.serviceAccountJson = readValue();
if (arg === "--service-account-json-path") input.serviceAccountJsonPath = readValue();
if (arg === "--allowed-spreadsheet-ids") input.allowedSpreadsheetIds = readValue();
}
return input;
}
function parseAllowedSpreadsheetIds(raw: string | string[] | null | undefined): string[] {
const values = Array.isArray(raw) ? raw : String(raw ?? "").split(/[\n,]/g);
const ids = values.map((value) => value.trim()).filter(Boolean);
return Array.from(new Set(ids));
}
function parsePort(raw: string | number | null | undefined): number {
if (raw === null || raw === undefined || raw === "") return 8849;
const port = typeof raw === "number" ? raw : Number.parseInt(raw, 10);
if (!Number.isInteger(port) || port < 0 || port > 65535) {
throw new Error(`Invalid port: ${raw}`);
}
return port;
}
function normalizeBindHost(raw: string | null | undefined): string {
return raw?.trim() || "127.0.0.1";
}
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 } {View on GitHub (pinned to 120ae5428f)
Solutions
- Provide a valid integer TCP port (1-65535) for the port argument/env var.
When it happens
Trigger: Thrown at packages/google-sheets-mcp-server/src/config.ts:68 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/ae825609f4d82036.
Report an issue: GitHub.