UNPKG

@alexdiazdecerio/fastmail-mcp-server

Version:

🚀 Professional MCP Server for Fastmail email management using JMAP API - Integrates seamlessly with Claude Desktop and other AI assistants

143 lines • 3.45 kB
interface Email { id: string; blobId: string; threadId: string; mailboxIds: Record<string, boolean>; keywords: Record<string, boolean>; size: number; receivedAt: string; subject?: string; from?: Array<{ email: string; name?: string; }>; to?: Array<{ email: string; name?: string; }>; cc?: Array<{ email: string; name?: string; }>; bcc?: Array<{ email: string; name?: string; }>; replyTo?: Array<{ email: string; name?: string; }>; sentAt?: string; hasAttachment: boolean; preview: string; bodyValues?: Record<string, { value: string; isEncodingProblem: boolean; }>; textBody?: Array<{ partId: string; type: string; }>; htmlBody?: Array<{ partId: string; type: string; }>; attachments?: Array<{ partId: string; blobId: string; size: number; name?: string; type: string; disposition?: string; }>; } interface Mailbox { id: string; name: string; parentId?: string; role?: string; sortOrder: number; totalEmails: number; unreadEmails: number; totalThreads: number; unreadThreads: number; myRights: { mayReadItems: boolean; mayAddItems: boolean; mayRemoveItems: boolean; maySetSeen: boolean; maySetKeywords: boolean; mayCreateChild: boolean; mayRename: boolean; mayDelete: boolean; maySubmit: boolean; }; isSubscribed: boolean; } export declare class FastmailClient { private email; private apiToken; private session; private accountId; constructor(email: string, apiToken: string); initialize(): Promise<void>; private makeRequest; getMailboxes(): Promise<Mailbox[]>; getEmails(options?: { mailboxId?: string; limit?: number; position?: number; filter?: { text?: string; from?: string; to?: string; subject?: string; after?: string; before?: string; hasAttachment?: boolean; isUnread?: boolean; }; }): Promise<{ emails: Email[]; total: number; }>; getEmail(emailId: string): Promise<Email | null>; sendEmail(options: { to: Array<{ email: string; name?: string; }>; cc?: Array<{ email: string; name?: string; }>; bcc?: Array<{ email: string; name?: string; }>; subject: string; textBody?: string; htmlBody?: string; attachments?: Array<{ blobId: string; name: string; type: string; }>; inReplyTo?: string; references?: string[]; }): Promise<{ emailId: string; sentAt: string; }>; markAsRead(emailId: string, read?: boolean): Promise<void>; moveEmail(emailId: string, targetMailboxId: string): Promise<void>; deleteEmail(emailId: string): Promise<void>; searchEmails(query: string, limit?: number): Promise<{ emails: Email[]; total: number; }>; private getDraftsMailbox; private getPrimaryIdentity; } export {}; //# sourceMappingURL=fastmail-client.d.ts.map