@kbzowski/mcp-inbox 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +396 -0
  3. package/dist/cache/db.d.ts +34 -0
  4. package/dist/cache/idle.d.ts +32 -0
  5. package/dist/cache/queries.d.ts +66 -0
  6. package/dist/cache/schema.d.ts +456 -0
  7. package/dist/cache/sync.d.ts +38 -0
  8. package/dist/config/env.d.ts +103 -0
  9. package/dist/errors/mapper.d.ts +10 -0
  10. package/dist/errors/types.d.ts +25 -0
  11. package/dist/formatters/markdown.d.ts +13 -0
  12. package/dist/imap/client.d.ts +37 -0
  13. package/dist/imap/folders.d.ts +19 -0
  14. package/dist/imap/mime-builder.d.ts +32 -0
  15. package/dist/imap/search.d.ts +28 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +2572 -0
  18. package/dist/index.js.map +7 -0
  19. package/dist/migrations/0000_mean_the_santerians.sql +49 -0
  20. package/dist/migrations/0001_wooden_doomsday.sql +2 -0
  21. package/dist/migrations/meta/0000_snapshot.json +337 -0
  22. package/dist/migrations/meta/0001_snapshot.json +224 -0
  23. package/dist/migrations/meta/_journal.json +20 -0
  24. package/dist/server.d.ts +8 -0
  25. package/dist/smtp/client.d.ts +28 -0
  26. package/dist/tools/attachments/get-attachment.d.ts +43 -0
  27. package/dist/tools/define-tool.d.ts +61 -0
  28. package/dist/tools/drafts/create-draft.d.ts +11 -0
  29. package/dist/tools/drafts/get-draft.d.ts +10 -0
  30. package/dist/tools/drafts/list-drafts.d.ts +11 -0
  31. package/dist/tools/drafts/update-draft.d.ts +12 -0
  32. package/dist/tools/emails/delete-email.d.ts +6 -0
  33. package/dist/tools/emails/get-email.d.ts +10 -0
  34. package/dist/tools/emails/list-emails.d.ts +14 -0
  35. package/dist/tools/emails/mark-read.d.ts +9 -0
  36. package/dist/tools/emails/move-to-folder.d.ts +6 -0
  37. package/dist/tools/emails/search-emails.d.ts +17 -0
  38. package/dist/tools/emails/shared.d.ts +74 -0
  39. package/dist/tools/folders/list-folders.d.ts +7 -0
  40. package/dist/tools/registry.d.ts +21 -0
  41. package/dist/tools/send/forward.d.ts +11 -0
  42. package/dist/tools/send/reply.d.ts +12 -0
  43. package/dist/tools/send/send-draft.d.ts +5 -0
  44. package/dist/tools/send/send-email.d.ts +10 -0
  45. package/dist/tools/send/shared.d.ts +40 -0
  46. package/dist/utils/logger.d.ts +40 -0
  47. package/package.json +90 -0
@@ -0,0 +1,61 @@
1
+ import type { z } from 'zod';
2
+ import type { AppConfig } from '../config/env';
3
+ import type { CacheDb } from '../cache/db';
4
+ import type { ImapClient } from '../imap/client';
5
+ import type { SmtpClient } from '../smtp/client';
6
+ /**
7
+ * Runtime context passed to every tool handler. Tools receive the live
8
+ * DB handle, the shared IMAP client, and the cache config. They must
9
+ * not hold onto these references past the call - the server owns
10
+ * their lifetime.
11
+ */
12
+ export interface ToolContext {
13
+ db: CacheDb;
14
+ imap: ImapClient;
15
+ smtp: SmtpClient;
16
+ cacheConfig: AppConfig['cache'];
17
+ /** Default sender + smtp config for tools that compose messages. */
18
+ defaults: {
19
+ fromAddress: string;
20
+ };
21
+ /** Injectable clock so tests can pin the time. */
22
+ now: () => number;
23
+ }
24
+ /**
25
+ * MCP annotation hints. These drive client-side behavior like
26
+ * destructive-action confirmation dialogs. `openWorldHint: true` is
27
+ * a constant for this server because every tool hits the network.
28
+ */
29
+ export interface ToolAnnotations {
30
+ readOnlyHint: boolean;
31
+ destructiveHint: boolean;
32
+ idempotentHint: boolean;
33
+ openWorldHint: true;
34
+ }
35
+ /**
36
+ * Shape returned by a tool handler. Mirrors the MCP SDK's CallToolResult
37
+ * but narrowed to text content plus optional structured data.
38
+ */
39
+ export interface ToolResult {
40
+ content: {
41
+ type: 'text';
42
+ text: string;
43
+ }[];
44
+ /** Typed payload for clients that can consume it. Mirrors the text. */
45
+ structuredContent?: unknown;
46
+ /** Set when the tool returned an expected error (auth failure, etc). */
47
+ isError?: boolean;
48
+ }
49
+ export interface ToolDefinition<TInput extends z.ZodTypeAny = z.ZodTypeAny> {
50
+ name: string;
51
+ description: string;
52
+ annotations: ToolAnnotations;
53
+ inputSchema: TInput;
54
+ handler: (args: z.infer<TInput>, ctx: ToolContext) => Promise<ToolResult>;
55
+ }
56
+ /**
57
+ * Identity helper that preserves the generic `TInput` through the
58
+ * tool definition, so `handler` sees the correctly-typed args without
59
+ * needing an explicit annotation at every call site.
60
+ */
61
+ export declare function defineTool<TInput extends z.ZodTypeAny>(def: ToolDefinition<TInput>): ToolDefinition<TInput>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export declare const createDraftTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
4
+ subject: z.ZodString;
5
+ body: z.ZodOptional<z.ZodString>;
6
+ html: z.ZodOptional<z.ZodString>;
7
+ cc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
8
+ bcc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
9
+ from: z.ZodOptional<z.ZodString>;
10
+ folder: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>>;
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const getDraftTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ uid: z.ZodNumber;
4
+ folder: z.ZodOptional<z.ZodString>;
5
+ max_staleness_seconds: z.ZodDefault<z.ZodNumber>;
6
+ response_format: z.ZodDefault<z.ZodEnum<{
7
+ json: "json";
8
+ markdown: "markdown";
9
+ }>>;
10
+ }, z.core.$strip>>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export declare const listDraftsTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ folder: z.ZodOptional<z.ZodString>;
4
+ limit: z.ZodDefault<z.ZodNumber>;
5
+ offset: z.ZodDefault<z.ZodNumber>;
6
+ max_staleness_seconds: z.ZodDefault<z.ZodNumber>;
7
+ response_format: z.ZodDefault<z.ZodEnum<{
8
+ json: "json";
9
+ markdown: "markdown";
10
+ }>>;
11
+ }, z.core.$strip>>;
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const updateDraftTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ uid: z.ZodNumber;
4
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
5
+ subject: z.ZodString;
6
+ body: z.ZodOptional<z.ZodString>;
7
+ html: z.ZodOptional<z.ZodString>;
8
+ cc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
9
+ bcc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
10
+ from: z.ZodOptional<z.ZodString>;
11
+ folder: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const deleteEmailTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ folder: z.ZodString;
4
+ uid: z.ZodNumber;
5
+ hard_delete: z.ZodDefault<z.ZodBoolean>;
6
+ }, z.core.$strip>>;
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const getEmailTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ folder: z.ZodString;
4
+ uid: z.ZodNumber;
5
+ max_staleness_seconds: z.ZodDefault<z.ZodNumber>;
6
+ response_format: z.ZodDefault<z.ZodEnum<{
7
+ json: "json";
8
+ markdown: "markdown";
9
+ }>>;
10
+ }, z.core.$strip>>;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const listEmailsTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ folder: z.ZodDefault<z.ZodString>;
4
+ limit: z.ZodDefault<z.ZodNumber>;
5
+ offset: z.ZodDefault<z.ZodNumber>;
6
+ unseen_only: z.ZodDefault<z.ZodBoolean>;
7
+ since_date: z.ZodOptional<z.ZodString>;
8
+ before_date: z.ZodOptional<z.ZodString>;
9
+ max_staleness_seconds: z.ZodDefault<z.ZodNumber>;
10
+ response_format: z.ZodDefault<z.ZodEnum<{
11
+ json: "json";
12
+ markdown: "markdown";
13
+ }>>;
14
+ }, z.core.$strip>>;
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const markReadTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ folder: z.ZodString;
4
+ uid: z.ZodNumber;
5
+ }, z.core.$strip>>;
6
+ export declare const markUnreadTool: import("../define-tool").ToolDefinition<z.ZodObject<{
7
+ folder: z.ZodString;
8
+ uid: z.ZodNumber;
9
+ }, z.core.$strip>>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const moveToFolderTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ folder: z.ZodString;
4
+ uid: z.ZodNumber;
5
+ destination: z.ZodString;
6
+ }, z.core.$strip>>;
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare const searchEmailsTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ folder: z.ZodDefault<z.ZodString>;
4
+ subject: z.ZodOptional<z.ZodString>;
5
+ from: z.ZodOptional<z.ZodString>;
6
+ to: z.ZodOptional<z.ZodString>;
7
+ body: z.ZodOptional<z.ZodString>;
8
+ unseen: z.ZodOptional<z.ZodBoolean>;
9
+ since_date: z.ZodOptional<z.ZodString>;
10
+ before_date: z.ZodOptional<z.ZodString>;
11
+ limit: z.ZodDefault<z.ZodNumber>;
12
+ max_staleness_seconds: z.ZodDefault<z.ZodNumber>;
13
+ response_format: z.ZodDefault<z.ZodEnum<{
14
+ json: "json";
15
+ markdown: "markdown";
16
+ }>>;
17
+ }, z.core.$strip>>;
@@ -0,0 +1,74 @@
1
+ import type { ToolContext } from '../define-tool';
2
+ import { type ListEmailsOptions } from '../../cache/queries';
3
+ import type { Email } from '../../cache/schema';
4
+ import { type SpecialUseAttr } from '../../imap/folders';
5
+ /**
6
+ * Sync a folder if its cache is older than `maxStalenessSec`. Returns
7
+ * true iff a sync actually ran, so callers can decorate their response
8
+ * with `served_from: "cache" | "sync"`.
9
+ */
10
+ export declare function syncIfStale(ctx: ToolContext, folder: string, maxStalenessSec: number): Promise<boolean>;
11
+ /**
12
+ * Read envelopes from the cache with pagination. `syncIfStale` should
13
+ * be called first if the caller wants fresh data.
14
+ */
15
+ export declare function readEnvelopes(ctx: ToolContext, folder: string, opts: ListEmailsOptions): {
16
+ rows: Email[];
17
+ total: number;
18
+ hasMore: boolean;
19
+ nextOffset: number | null;
20
+ };
21
+ /**
22
+ * Resolve a special-use folder to its mailbox path, falling back to an
23
+ * explicit override when the server lacks RFC 6154 SPECIAL-USE.
24
+ */
25
+ export declare function resolveSpecialFolder(ctx: ToolContext, attr: SpecialUseAttr, explicitOverride?: string): Promise<string>;
26
+ /**
27
+ * Metadata view of an attachment part. We deliberately do NOT surface
28
+ * the bytes or a download path - the goal is to let the agent *describe*
29
+ * attachments, not to cache sensitive content outside the user's mail
30
+ * client. If the user wants the file, they open their mail client.
31
+ */
32
+ export interface AttachmentInfo {
33
+ filename: string | null;
34
+ content_type: string;
35
+ size_bytes: number;
36
+ }
37
+ /**
38
+ * Ensure a single message's body is cached, fetching it lazily from the
39
+ * server on first access. Stores both plain-text and HTML parts when the
40
+ * message has them. Idempotent - calling twice does a single fetch.
41
+ *
42
+ * Also returns attachment metadata (filename + content-type + size) so
43
+ * tools can describe what's attached without downloading bytes. The
44
+ * metadata itself is re-derived on each call since it's small and the
45
+ * canonical source is the live message.
46
+ */
47
+ export declare function ensureBodyCached(ctx: ToolContext, folder: string, uid: number): Promise<{
48
+ bodyText: string | null;
49
+ bodyHtml: string | null;
50
+ attachments: AttachmentInfo[];
51
+ }>;
52
+ /**
53
+ * Ensure an envelope is cached for (folder, uid). If missing - or if
54
+ * the folder cache is stale per `maxStalenessSec` - triggers a sync
55
+ * first. Returns the cached Email or throws IMAP_MESSAGE_NOT_FOUND.
56
+ */
57
+ export declare function ensureEnvelopeCached(ctx: ToolContext, folder: string, uid: number, maxStalenessSec: number): Promise<Email>;
58
+ /**
59
+ * Project an Email row to the public tool response shape.
60
+ * Hides internal fields (envelope_json blob, modseq, cache timestamps).
61
+ */
62
+ export declare function projectEmailSummary(e: Email): {
63
+ uid: number;
64
+ folder: string;
65
+ message_id: string | null;
66
+ subject: string | null;
67
+ from: string | null;
68
+ to: string[] | null;
69
+ cc: string[] | null;
70
+ date: string | null;
71
+ flags: string[];
72
+ has_attachments: boolean;
73
+ unseen: boolean;
74
+ };
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const listFoldersTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ response_format: z.ZodDefault<z.ZodEnum<{
4
+ json: "json";
5
+ markdown: "markdown";
6
+ }>>;
7
+ }, z.core.$strip>>;
@@ -0,0 +1,21 @@
1
+ import type { ToolDefinition } from './define-tool';
2
+ /**
3
+ * Every tool that exists. Adding a tool means importing it here and
4
+ * appending the reference. The MCP dispatcher iterates this array to
5
+ * populate ListTools responses and to route CallTool requests - no
6
+ * other wiring needed.
7
+ */
8
+ export declare const tools: readonly ToolDefinition[];
9
+ export declare function findTool(name: string): ToolDefinition | undefined;
10
+ /**
11
+ * Shape each tool for the MCP ListTools response. `inputSchema` is a
12
+ * JSON Schema derived from the tool's Zod schema - single source of
13
+ * truth, no hand-written JSON Schema duplication.
14
+ */
15
+ export interface McpToolEntry {
16
+ name: string;
17
+ description: string;
18
+ inputSchema: Record<string, unknown>;
19
+ annotations: ToolDefinition['annotations'];
20
+ }
21
+ export declare function listToolEntries(): McpToolEntry[];
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ export declare const forwardTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ folder: z.ZodString;
4
+ uid: z.ZodNumber;
5
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
6
+ body: z.ZodOptional<z.ZodString>;
7
+ cc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
8
+ bcc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
9
+ from: z.ZodOptional<z.ZodString>;
10
+ max_staleness_seconds: z.ZodDefault<z.ZodNumber>;
11
+ }, z.core.$strip>>;
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const replyTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ folder: z.ZodString;
4
+ uid: z.ZodNumber;
5
+ body: z.ZodOptional<z.ZodString>;
6
+ html: z.ZodOptional<z.ZodString>;
7
+ cc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
8
+ bcc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
9
+ reply_all: z.ZodDefault<z.ZodBoolean>;
10
+ from: z.ZodOptional<z.ZodString>;
11
+ max_staleness_seconds: z.ZodDefault<z.ZodNumber>;
12
+ }, z.core.$strip>>;
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const sendDraftTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ uid: z.ZodNumber;
4
+ folder: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strip>>;
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const sendEmailTool: import("../define-tool").ToolDefinition<z.ZodObject<{
3
+ to: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
4
+ subject: z.ZodString;
5
+ body: z.ZodOptional<z.ZodString>;
6
+ html: z.ZodOptional<z.ZodString>;
7
+ cc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
8
+ bcc: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
9
+ from: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>>;
@@ -0,0 +1,40 @@
1
+ import type { ToolContext } from '../define-tool';
2
+ /**
3
+ * Normalize an address field (which the Zod schema accepts as
4
+ * `string | string[]`) to the flat string[] that SMTP envelope wants.
5
+ */
6
+ export declare function normalizeAddrs(value: string | string[] | undefined): string[];
7
+ /**
8
+ * Send a pre-built raw RFC 2822 message and (best-effort) append a copy
9
+ * to the \Sent folder so the user's mail client shows it.
10
+ *
11
+ * SMTP failure is fatal and propagates up. Sent-folder append failure
12
+ * logs a warning but does not fail the tool call - the message was
13
+ * delivered; missing a backup copy is a minor degradation, not a bug
14
+ * worth retrying or erroring on.
15
+ */
16
+ export declare function sendRawAndAppendSent(ctx: ToolContext, raw: Buffer, envelope: {
17
+ from: string;
18
+ to: string[];
19
+ cc?: string[];
20
+ bcc?: string[];
21
+ }): Promise<{
22
+ messageId: string | null;
23
+ sentFolder: string | null;
24
+ sentSaveError: string | null;
25
+ }>;
26
+ /**
27
+ * Convenience helper for tools whose address fields are strings or
28
+ * string arrays at the Zod schema level.
29
+ */
30
+ export declare function flattenCompose(args: {
31
+ from?: string;
32
+ to: string | string[];
33
+ cc?: string | string[];
34
+ bcc?: string | string[];
35
+ }): {
36
+ fromOrDefault: (defaultFrom: string) => string;
37
+ to: string[];
38
+ cc: string[];
39
+ bcc: string[];
40
+ };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Structured stderr-only logger.
3
+ *
4
+ * MCP's stdio transport owns stdout for protocol frames - any `console.log`
5
+ * corrupts the stream. All diagnostic output here must go to stderr, and the
6
+ * `no-console` ESLint rule enforces this at the code level.
7
+ *
8
+ * Namespaces follow the `debug` convention: set DEBUG="mcp-inbox:*" to enable
9
+ * everything, or DEBUG="mcp-inbox:cache,mcp-inbox:imap" to enable specific
10
+ * namespaces.
11
+ *
12
+ * All logger state is encapsulated in `LoggerContext`. The module exposes a
13
+ * shared default context for production use; tests construct isolated
14
+ * contexts to avoid cross-test leakage.
15
+ */
16
+ type Level = 'debug' | 'info' | 'warn' | 'error';
17
+ export interface Logger {
18
+ debug: (msg: string, meta?: Record<string, unknown>) => void;
19
+ info: (msg: string, meta?: Record<string, unknown>) => void;
20
+ warn: (msg: string, meta?: Record<string, unknown>) => void;
21
+ error: (msg: string, meta?: Record<string, unknown>) => void;
22
+ child: (subNamespace: string) => Logger;
23
+ }
24
+ export declare class LoggerContext {
25
+ #private;
26
+ configure(opts: {
27
+ debug?: string;
28
+ level?: Level;
29
+ }): void;
30
+ shouldEmit(level: Level, namespace: string): boolean;
31
+ emit(level: Level, namespace: string, msg: string, meta?: Record<string, unknown>): void;
32
+ logger(namespace: string): Logger;
33
+ }
34
+ export declare function configureLogger(opts: {
35
+ debug?: string;
36
+ level?: Level;
37
+ }): void;
38
+ export declare function createLogger(namespace: string, context?: LoggerContext): Logger;
39
+ export declare const rootLogger: Logger;
40
+ export {};
package/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "@kbzowski/mcp-inbox",
3
+ "version": "0.1.0",
4
+ "description": "MCP server exposing IMAP/SMTP email over a fast local cache. Read, search, compose, and manage email from any IMAP provider with near-instant response times via background sync and IDLE push.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "mcp-inbox": "./dist/index.js"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "LICENSE",
14
+ "README.md"
15
+ ],
16
+ "keywords": [
17
+ "mcp",
18
+ "mcp-server",
19
+ "model-context-protocol",
20
+ "claude",
21
+ "anthropic",
22
+ "email",
23
+ "imap",
24
+ "smtp",
25
+ "mail",
26
+ "inbox",
27
+ "gmail",
28
+ "outlook",
29
+ "fastmail",
30
+ "ai-tools",
31
+ "llm-tools"
32
+ ],
33
+ "author": "Krzysztof Bzowski",
34
+ "license": "MIT",
35
+ "homepage": "https://github.com/kbzowski/mcp-inbox#readme",
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/kbzowski/mcp-inbox.git"
39
+ },
40
+ "bugs": {
41
+ "url": "https://github.com/kbzowski/mcp-inbox/issues"
42
+ },
43
+ "engines": {
44
+ "node": ">=24.0.0"
45
+ },
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "scripts": {
50
+ "build": "node scripts/build.mjs && tsc -p tsconfig.build.json",
51
+ "dev": "tsx src/index.ts",
52
+ "test": "vitest run",
53
+ "test:watch": "vitest",
54
+ "test:integration": "vitest run --config vitest.integration.config.ts",
55
+ "typecheck": "tsc --noEmit",
56
+ "lint": "eslint src",
57
+ "lint:fix": "eslint src --fix",
58
+ "format": "prettier --write .",
59
+ "format:check": "prettier --check .",
60
+ "db:generate": "drizzle-kit generate",
61
+ "prepublishOnly": "npm run typecheck && npm run lint && npm run test && npm run build",
62
+ "release": "changeset publish"
63
+ },
64
+ "dependencies": {
65
+ "@modelcontextprotocol/sdk": "^1.20.0",
66
+ "better-sqlite3": "^12.9.0",
67
+ "drizzle-orm": "^0.45.2",
68
+ "imapflow": "^1.0.180",
69
+ "mailparser": "^3.7.2",
70
+ "nodemailer": "^8.0.5",
71
+ "zod": "^4.0.0"
72
+ },
73
+ "devDependencies": {
74
+ "@changesets/cli": "^2.27.10",
75
+ "@types/better-sqlite3": "^7.6.13",
76
+ "@types/mailparser": "^3.4.5",
77
+ "@types/node": "^24.0.0",
78
+ "@types/nodemailer": "^6.4.17",
79
+ "drizzle-kit": "^0.31.10",
80
+ "esbuild": "^0.25.0",
81
+ "eslint": "^9.18.0",
82
+ "eslint-config-prettier": "^10.0.0",
83
+ "prettier": "^3.4.0",
84
+ "testcontainers": "^11.14.0",
85
+ "tsx": "^4.19.0",
86
+ "typescript": "^5.7.0",
87
+ "typescript-eslint": "^8.20.0",
88
+ "vitest": "^3.0.0"
89
+ }
90
+ }