@nylas/helix-mcp-server 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 (41) hide show
  1. package/dist/cli.d.ts +10 -0
  2. package/dist/cli.d.ts.map +1 -0
  3. package/dist/cli.js +233 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/html-to-markdown.d.ts +15 -0
  6. package/dist/html-to-markdown.d.ts.map +1 -0
  7. package/dist/html-to-markdown.js +234 -0
  8. package/dist/html-to-markdown.js.map +1 -0
  9. package/dist/index.d.ts +9 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +7 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/server.d.ts +49 -0
  14. package/dist/server.d.ts.map +1 -0
  15. package/dist/server.js +323 -0
  16. package/dist/server.js.map +1 -0
  17. package/dist/shape-response.d.ts +19 -0
  18. package/dist/shape-response.d.ts.map +1 -0
  19. package/dist/shape-response.js +172 -0
  20. package/dist/shape-response.js.map +1 -0
  21. package/dist/tools/calendar.d.ts +3 -0
  22. package/dist/tools/calendar.d.ts.map +1 -0
  23. package/dist/tools/calendar.js +46 -0
  24. package/dist/tools/calendar.js.map +1 -0
  25. package/dist/tools/contacts.d.ts +3 -0
  26. package/dist/tools/contacts.d.ts.map +1 -0
  27. package/dist/tools/contacts.js +23 -0
  28. package/dist/tools/contacts.js.map +1 -0
  29. package/dist/tools/email.d.ts +3 -0
  30. package/dist/tools/email.d.ts.map +1 -0
  31. package/dist/tools/email.js +54 -0
  32. package/dist/tools/email.js.map +1 -0
  33. package/dist/tools/identity.d.ts +3 -0
  34. package/dist/tools/identity.d.ts.map +1 -0
  35. package/dist/tools/identity.js +18 -0
  36. package/dist/tools/identity.js.map +1 -0
  37. package/dist/tools/types.d.ts +10 -0
  38. package/dist/tools/types.d.ts.map +1 -0
  39. package/dist/tools/types.js +2 -0
  40. package/dist/tools/types.js.map +1 -0
  41. package/package.json +48 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/tools/email.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,eAAO,MAAM,UAAU,EAAE,cAAc,EAuDtC,CAAA"}
@@ -0,0 +1,54 @@
1
+ import { z } from 'zod';
2
+ export const emailTools = [
3
+ {
4
+ name: 'email_search',
5
+ description: "Search the user's email by query, sender, recipient, or date range. Returns matching messages with subject, sender, date, and snippet.",
6
+ inputSchema: z.object({
7
+ query: z.string().optional().describe('Free-text search query'),
8
+ from: z.string().optional().describe('Filter by sender email address'),
9
+ to: z.string().optional().describe('Filter by recipient email address'),
10
+ subject: z.string().optional().describe('Filter by subject line'),
11
+ after: z.string().optional().describe('Return emails after this ISO-8601 date'),
12
+ before: z.string().optional().describe('Return emails before this ISO-8601 date'),
13
+ unread: z.boolean().optional().describe('Filter by unread status'),
14
+ limit: z.number().min(1).max(50).default(10).describe('Maximum results to return'),
15
+ }),
16
+ requiredScopes: ['email.read'],
17
+ category: 'email',
18
+ },
19
+ {
20
+ name: 'email_read',
21
+ description: 'Read the full body and metadata of a specific email message by its ID.',
22
+ inputSchema: z.object({
23
+ message_id: z.string().describe('The ID of the email message to read'),
24
+ }),
25
+ requiredScopes: ['email.read'],
26
+ category: 'email',
27
+ },
28
+ {
29
+ name: 'email_send',
30
+ description: 'Compose and send an email. Subject to the user\'s approval policy — may return a pending_approval status instead of sending immediately.',
31
+ inputSchema: z.object({
32
+ to: z.array(z.object({
33
+ email: z.string().email(),
34
+ name: z.string().optional(),
35
+ })).min(1).describe('Recipients'),
36
+ subject: z.string().describe('Email subject line'),
37
+ body: z.string().describe('Email body (plain text or HTML)'),
38
+ reply_to_message_id: z.string().optional().describe('Message ID to reply to (for threading)'),
39
+ }),
40
+ requiredScopes: ['email.send'],
41
+ category: 'email',
42
+ },
43
+ {
44
+ name: 'email_reply',
45
+ description: "Reply to an existing email thread. The AI identity will match the user's communication style.",
46
+ inputSchema: z.object({
47
+ thread_id: z.string().describe('Thread ID to reply to'),
48
+ body: z.string().describe('Reply body'),
49
+ }),
50
+ requiredScopes: ['email.send'],
51
+ category: 'email',
52
+ },
53
+ ];
54
+ //# sourceMappingURL=email.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email.js","sourceRoot":"","sources":["../../src/tools/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,MAAM,CAAC,MAAM,UAAU,GAAqB;IAC3C;QACC,IAAI,EAAE,cAAc;QACpB,WAAW,EACV,wIAAwI;QACzI,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;YAC/D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;YACtE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;YACvE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;YACjE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;YAC/E,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;YACjF,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;YAClE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC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;YACvD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;SACvC,CAAC;QACF,cAAc,EAAE,CAAC,YAAY,CAAC;QAC9B,QAAQ,EAAE,OAAO;KACjB;CACD,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { ToolDefinition } from './types.js';
2
+ export declare const identityTools: ToolDefinition[];
3
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/tools/identity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,eAAO,MAAM,aAAa,EAAE,cAAc,EAiBzC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ export const identityTools = [
3
+ {
4
+ name: 'identity_get_context',
5
+ description: "Get the user's AI identity context: preferences, communication style, timezone, and recent activity summary. Use this to understand how the user prefers to communicate before drafting emails or scheduling.",
6
+ inputSchema: z.object({}),
7
+ requiredScopes: ['identity.read'],
8
+ category: 'identity',
9
+ },
10
+ {
11
+ name: 'meta_whoami',
12
+ description: 'Get information about the authenticated integration: user email, granted scopes, and rate limit status.',
13
+ inputSchema: z.object({}),
14
+ requiredScopes: ['identity.read'],
15
+ category: 'identity',
16
+ },
17
+ ];
18
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/tools/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,MAAM,CAAC,MAAM,aAAa,GAAqB;IAC9C;QACC,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EACV,+MAA+M;QAChN,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,cAAc,EAAE,CAAC,eAAe,CAAC;QACjC,QAAQ,EAAE,UAAU;KACpB;IACD;QACC,IAAI,EAAE,aAAa;QACnB,WAAW,EACV,yGAAyG;QAC1G,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,cAAc,EAAE,CAAC,eAAe,CAAC;QACjC,QAAQ,EAAE,UAAU;KACpB;CACD,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { z } from 'zod';
2
+ export type ToolCategory = 'email' | 'calendar' | 'contacts' | 'identity';
3
+ export interface ToolDefinition {
4
+ name: string;
5
+ description: string;
6
+ inputSchema: z.ZodType;
7
+ requiredScopes: string[];
8
+ category: ToolCategory;
9
+ }
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAE5B,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAA;AAEzE,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,CAAC,CAAC,OAAO,CAAA;IACtB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,QAAQ,EAAE,YAAY,CAAA;CACtB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tools/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@nylas/helix-mcp-server",
3
+ "version": "0.1.0",
4
+ "description": "MCP server and CLI for Nylas Helix — email, calendar, contacts, and identity context for AI agents.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "helix-mcp-server": "./dist/cli.js"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsc",
22
+ "prepack": "pnpm run build",
23
+ "lint": "biome check src/",
24
+ "test": "vitest run"
25
+ },
26
+ "keywords": [
27
+ "mcp",
28
+ "nylas",
29
+ "helix",
30
+ "ai",
31
+ "email",
32
+ "calendar",
33
+ "identity"
34
+ ],
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/nylas/helix"
38
+ },
39
+ "license": "MIT",
40
+ "dependencies": {
41
+ "@modelcontextprotocol/sdk": "^1.12.0",
42
+ "zod": "^3.25.0"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "^25.5.0",
46
+ "typescript": "^5.8.0"
47
+ }
48
+ }