UNPKG

clickup-mcp-server

Version:

A Model Context Protocol (MCP) server that provides a standardized interface for AI assistants to interact with the ClickUp API

255 lines (254 loc) 7.36 kB
import { ClickUpClient } from './index.js'; export interface AuthorizedUser { id: number; username: string; email: string; color: string; profilePicture: string; } export interface Workspace { id: string; name: string; color: string; avatar: string; members: Array<{ user: { id: number; username: string; email: string; color: string; profilePicture: string; }; role: number; custom_role?: string; }>; } export declare class AuthClient { private client; constructor(client: ClickUpClient); /** * Get the authorized user's information * @returns The authorized user's information */ getAuthorizedUser(): Promise<AuthorizedUser>; /** * Get the workspaces (teams) that the authorized user belongs to * @returns A list of workspaces */ getWorkspaces(): Promise<{ teams: Workspace[]; }>; /** * Get the spaces in a workspace * @param workspaceId The ID of the workspace to get spaces from * @returns A list of spaces */ getSpaces(workspaceId: string): Promise<{ spaces: Array<{ id: string; name: string; private: boolean; statuses: Array<{ id: string; status: string; type: string; orderindex: number; color: string; }>; multiple_assignees: boolean; features: { due_dates: { enabled: boolean; start_date: boolean; remap_due_dates: boolean; remap_closed_due_date: boolean; }; time_tracking: { enabled: boolean; }; tags: { enabled: boolean; }; time_estimates: { enabled: boolean; }; checklists: { enabled: boolean; }; custom_fields: { enabled: boolean; }; remap_dependencies: { enabled: boolean; }; dependency_warning: { enabled: boolean; }; portfolios: { enabled: boolean; }; }; }>; }>; /** * Get the folders in a space * @param spaceId The ID of the space to get folders from * @returns A list of folders */ getFolders(spaceId: string): Promise<{ folders: Array<{ id: string; name: string; orderindex: number; override_statuses: boolean; hidden: boolean; space: { id: string; name: string; }; task_count: string; lists: Array<{ id: string; name: string; orderindex: number; status: { status: string; color: string; hide_label: boolean; }; priority: { priority: string; color: string; }; assignee: { id: number; username: string; color: string; initials: string; email: string; profilePicture: string; }; task_count: number; due_date: string; start_date: string; folder: { id: string; name: string; hidden: boolean; access: boolean; }; space: { id: string; name: string; access: boolean; }; archived: boolean; override_statuses: boolean; permission_level: string; }>; permission_level: string; }>; }>; /** * Get the lists in a folder * @param folderId The ID of the folder to get lists from * @returns A list of lists */ getLists(folderId: string): Promise<{ lists: Array<{ id: string; name: string; orderindex: number; status: { status: string; color: string; hide_label: boolean; }; priority: { priority: string; color: string; }; assignee: { id: number; username: string; color: string; initials: string; email: string; profilePicture: string; }; task_count: number; due_date: string; start_date: string; folder: { id: string; name: string; hidden: boolean; access: boolean; }; space: { id: string; name: string; access: boolean; }; archived: boolean; override_statuses: boolean; permission_level: string; }>; }>; /** * Get the lists in a space * @param spaceId The ID of the space to get lists from * @returns A list of lists */ getListsFromSpace(spaceId: string): Promise<{ lists: Array<{ id: string; name: string; orderindex: number; status: { status: string; color: string; hide_label: boolean; }; priority: { priority: string; color: string; }; assignee: { id: number; username: string; color: string; initials: string; email: string; profilePicture: string; }; task_count: number; due_date: string; start_date: string; space: { id: string; name: string; access: boolean; }; archived: boolean; override_statuses: boolean; permission_level: string; }>; }>; /** * Get the seats information for a workspace * @param workspaceId The ID of the workspace to get seats information for * @returns Seats information including used, total, and available seats */ getWorkspaceSeats(workspaceId: string): Promise<{ members: object; filled_members_seats: number; total_member_seats: number; empty_member_seats: number; guests: object; filled_guest_seats: number; total_guest_seats: number; empty_guest_seats: number; }>; } export declare const createAuthClient: (client: ClickUpClient) => AuthClient;