paperclipai/paperclip · error
companyId is required because PAPERCLIP_COMPANY_ID is not…
Error message
companyId is required because PAPERCLIP_COMPANY_ID is not set
What it means
Error "companyId is required because PAPERCLIP_COMPANY_ID is not set" thrown in paperclipai/paperclip.
Solutions
- Set PAPERCLIP_COMPANY_ID or pass companyId explicitly to the tool call.
When it happens
Trigger: Thrown at packages/mcp-server/src/client.ts:65 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/061ea49187a2f05d.
Report an issue: GitHub.
Appendix: source
Thrown at packages/mcp-server/src/client.ts:65
return text;
}
}
export class PaperclipApiClient {
constructor(private readonly config: PaperclipMcpConfig) {}
get defaults() {
return {
companyId: this.config.companyId,
agentId: this.config.agentId,
runId: this.config.runId,
};
}
resolveCompanyId(companyId?: string | null): string {
const resolved = companyId?.trim() || this.config.companyId;
if (!resolved) {
throw new Error("companyId is required because PAPERCLIP_COMPANY_ID is not set");
}
return resolved;
}
resolveAgentId(agentId?: string | null): string {
const resolved = agentId?.trim() || this.config.agentId;
if (!resolved) {
throw new Error("agentId is required because PAPERCLIP_AGENT_ID is not set");
}
return resolved;
}
async requestJson<T>(method: string, path: string, options: JsonRequestOptions = {}): Promise<T> {
if (!path.startsWith("/")) {
throw new Error(`API path must start with "/": ${path}`);
}
const url = new URL(path.slice(1), `${this.config.apiUrl}/`);View on GitHub (pinned to 120ae5428f)