@intentdevelopers/mcp 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 (57) hide show
  1. package/dist/bin/intent-mcp.d.ts +9 -0
  2. package/dist/bin/intent-mcp.d.ts.map +1 -0
  3. package/dist/bin/intent-mcp.js +13 -0
  4. package/dist/bin/intent-mcp.js.map +1 -0
  5. package/dist/src/cache.d.ts +13 -0
  6. package/dist/src/cache.d.ts.map +1 -0
  7. package/dist/src/cache.js +33 -0
  8. package/dist/src/cache.js.map +1 -0
  9. package/dist/src/client.d.ts +29 -0
  10. package/dist/src/client.d.ts.map +1 -0
  11. package/dist/src/client.js +117 -0
  12. package/dist/src/client.js.map +1 -0
  13. package/dist/src/config.d.ts +13 -0
  14. package/dist/src/config.d.ts.map +1 -0
  15. package/dist/src/config.js +21 -0
  16. package/dist/src/config.js.map +1 -0
  17. package/dist/src/index.d.ts +16 -0
  18. package/dist/src/index.d.ts.map +1 -0
  19. package/dist/src/index.js +30 -0
  20. package/dist/src/index.js.map +1 -0
  21. package/dist/src/tools/export-spec.d.ts +7 -0
  22. package/dist/src/tools/export-spec.d.ts.map +1 -0
  23. package/dist/src/tools/export-spec.js +29 -0
  24. package/dist/src/tools/export-spec.js.map +1 -0
  25. package/dist/src/tools/get-epic.d.ts +7 -0
  26. package/dist/src/tools/get-epic.d.ts.map +1 -0
  27. package/dist/src/tools/get-epic.js +74 -0
  28. package/dist/src/tools/get-epic.js.map +1 -0
  29. package/dist/src/tools/get-project-context.d.ts +7 -0
  30. package/dist/src/tools/get-project-context.d.ts.map +1 -0
  31. package/dist/src/tools/get-project-context.js +99 -0
  32. package/dist/src/tools/get-project-context.js.map +1 -0
  33. package/dist/src/tools/get-status.d.ts +7 -0
  34. package/dist/src/tools/get-status.d.ts.map +1 -0
  35. package/dist/src/tools/get-status.js +58 -0
  36. package/dist/src/tools/get-status.js.map +1 -0
  37. package/dist/src/tools/get-story.d.ts +7 -0
  38. package/dist/src/tools/get-story.d.ts.map +1 -0
  39. package/dist/src/tools/get-story.js +77 -0
  40. package/dist/src/tools/get-story.js.map +1 -0
  41. package/dist/src/tools/index.d.ts +9 -0
  42. package/dist/src/tools/index.d.ts.map +1 -0
  43. package/dist/src/tools/index.js +22 -0
  44. package/dist/src/tools/index.js.map +1 -0
  45. package/dist/src/tools/list-projects.d.ts +7 -0
  46. package/dist/src/tools/list-projects.d.ts.map +1 -0
  47. package/dist/src/tools/list-projects.js +35 -0
  48. package/dist/src/tools/list-projects.js.map +1 -0
  49. package/dist/src/tools/search.d.ts +7 -0
  50. package/dist/src/tools/search.d.ts.map +1 -0
  51. package/dist/src/tools/search.js +46 -0
  52. package/dist/src/tools/search.js.map +1 -0
  53. package/dist/src/types.d.ts +117 -0
  54. package/dist/src/types.d.ts.map +1 -0
  55. package/dist/src/types.js +5 -0
  56. package/dist/src/types.js.map +1 -0
  57. package/package.json +50 -0
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Intent MCP Server CLI Entry Point
4
+ *
5
+ * Usage:
6
+ * INTENT_API_KEY=int_xxx npx @intentdev/mcp
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=intent-mcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent-mcp.d.ts","sourceRoot":"","sources":["../../bin/intent-mcp.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Intent MCP Server CLI Entry Point
4
+ *
5
+ * Usage:
6
+ * INTENT_API_KEY=int_xxx npx @intentdev/mcp
7
+ */
8
+ import { main } from "../src/index.js";
9
+ main().catch((err) => {
10
+ console.error("Fatal error:", err.message);
11
+ process.exit(1);
12
+ });
13
+ //# sourceMappingURL=intent-mcp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent-mcp.js","sourceRoot":"","sources":["../../bin/intent-mcp.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Simple in-memory TTL cache.
3
+ */
4
+ export declare class Cache {
5
+ private store;
6
+ private ttlMs;
7
+ constructor(ttlSeconds: number);
8
+ get<T>(key: string): T | undefined;
9
+ set<T>(key: string, data: T): void;
10
+ invalidate(key: string): void;
11
+ clear(): void;
12
+ }
13
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/cache.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,qBAAa,KAAK;IAChB,OAAO,CAAC,KAAK,CAA0C;IACvD,OAAO,CAAC,KAAK,CAAS;gBAEV,UAAU,EAAE,MAAM;IAI9B,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAUlC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI;IAOlC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B,KAAK,IAAI,IAAI;CAGd"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Simple in-memory TTL cache.
3
+ */
4
+ export class Cache {
5
+ store = new Map();
6
+ ttlMs;
7
+ constructor(ttlSeconds) {
8
+ this.ttlMs = ttlSeconds * 1000;
9
+ }
10
+ get(key) {
11
+ const entry = this.store.get(key);
12
+ if (!entry)
13
+ return undefined;
14
+ if (Date.now() > entry.expiresAt) {
15
+ this.store.delete(key);
16
+ return undefined;
17
+ }
18
+ return entry.data;
19
+ }
20
+ set(key, data) {
21
+ this.store.set(key, {
22
+ data,
23
+ expiresAt: Date.now() + this.ttlMs,
24
+ });
25
+ }
26
+ invalidate(key) {
27
+ this.store.delete(key);
28
+ }
29
+ clear() {
30
+ this.store.clear();
31
+ }
32
+ }
33
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/cache.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,MAAM,OAAO,KAAK;IACR,KAAK,GAAG,IAAI,GAAG,EAA+B,CAAC;IAC/C,KAAK,CAAS;IAEtB,YAAY,UAAkB;QAC5B,IAAI,CAAC,KAAK,GAAG,UAAU,GAAG,IAAI,CAAC;IACjC,CAAC;IAED,GAAG,CAAI,GAAW;QAChB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK;YAAE,OAAO,SAAS,CAAC;QAC7B,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;YACjC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACvB,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO,KAAK,CAAC,IAAS,CAAC;IACzB,CAAC;IAED,GAAG,CAAI,GAAW,EAAE,IAAO;QACzB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE;YAClB,IAAI;YACJ,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK;SACnC,CAAC,CAAC;IACL,CAAC;IAED,UAAU,CAAC,GAAW;QACpB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Intent API Client
3
+ *
4
+ * Thin fetch wrapper that authenticates with the Intent API using an API key.
5
+ */
6
+ import type { Config } from "./config.js";
7
+ import type { ExportSpecResponse, ImplementationStatusResponse, ProjectContextResponse, ProjectListResponse, SearchResponse } from "./types.js";
8
+ export declare class IntentClient {
9
+ private baseUrl;
10
+ private apiKey;
11
+ private cache;
12
+ private slugToUuid;
13
+ constructor(config: Config);
14
+ /**
15
+ * Resolve a project slug to its UUID. If the input is already a UUID, return it as-is.
16
+ */
17
+ private resolveProjectId;
18
+ private request;
19
+ private cachedRequest;
20
+ listProjects(): Promise<ProjectListResponse>;
21
+ getProjectContext(projectIdOrSlug: string): Promise<ProjectContextResponse>;
22
+ searchSpecs(query: string, projectId?: string): Promise<SearchResponse>;
23
+ getImplementationStatus(projectIdOrSlug: string): Promise<ImplementationStatusResponse>;
24
+ exportSpec(specId: string, format?: string): Promise<ExportSpecResponse>;
25
+ healthCheck(): Promise<{
26
+ status: string;
27
+ }>;
28
+ }
29
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EACV,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,UAAU,CAA6B;gBAEnC,MAAM,EAAE,MAAM;IAM1B;;OAEG;YACW,gBAAgB;YAmBhB,OAAO;YA2CP,aAAa;IASrB,YAAY,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAO5C,iBAAiB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAO3E,WAAW,CACf,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,cAAc,CAAC;IAUpB,uBAAuB,CAC3B,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,4BAA4B,CAAC;IAQlC,UAAU,CACd,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAAmB,GAC1B,OAAO,CAAC,kBAAkB,CAAC;IAWxB,WAAW,IAAI,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAGjD"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Intent API Client
3
+ *
4
+ * Thin fetch wrapper that authenticates with the Intent API using an API key.
5
+ */
6
+ import { Cache } from "./cache.js";
7
+ export class IntentClient {
8
+ baseUrl;
9
+ apiKey;
10
+ cache;
11
+ slugToUuid = new Map();
12
+ constructor(config) {
13
+ this.baseUrl = config.apiUrl.replace(/\/$/, "");
14
+ this.apiKey = config.apiKey;
15
+ this.cache = new Cache(config.cacheTtl);
16
+ }
17
+ /**
18
+ * Resolve a project slug to its UUID. If the input is already a UUID, return it as-is.
19
+ */
20
+ async resolveProjectId(idOrSlug) {
21
+ const uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
22
+ if (uuidPattern.test(idOrSlug))
23
+ return idOrSlug;
24
+ const cached = this.slugToUuid.get(idOrSlug);
25
+ if (cached)
26
+ return cached;
27
+ const { projects } = await this.listProjects();
28
+ for (const p of projects) {
29
+ this.slugToUuid.set(p.slug, p.id);
30
+ }
31
+ const resolved = this.slugToUuid.get(idOrSlug);
32
+ if (!resolved) {
33
+ throw new Error(`Project not found: "${idOrSlug}". Use intent_list_projects to see available projects.`);
34
+ }
35
+ return resolved;
36
+ }
37
+ async request(path, options) {
38
+ const url = `${this.baseUrl}${path}`;
39
+ const res = await fetch(url, {
40
+ ...options,
41
+ headers: {
42
+ "X-API-Key": this.apiKey,
43
+ "Content-Type": "application/json",
44
+ ...options?.headers,
45
+ },
46
+ });
47
+ if (!res.ok) {
48
+ const body = await res.text();
49
+ let message;
50
+ try {
51
+ const parsed = JSON.parse(body);
52
+ const detail = parsed.detail;
53
+ if (Array.isArray(detail)) {
54
+ message = detail.map((d) => d.msg || JSON.stringify(d)).join("; ");
55
+ }
56
+ else {
57
+ message = detail || parsed.message || body;
58
+ }
59
+ }
60
+ catch {
61
+ message = body;
62
+ }
63
+ switch (res.status) {
64
+ case 401:
65
+ throw new Error(`Authentication failed: ${message}. Check your INTENT_API_KEY.`);
66
+ case 403:
67
+ throw new Error(`Permission denied: ${message}. Ensure your API key has the required permissions (spec:read, project:read).`);
68
+ case 404:
69
+ throw new Error(`Not found: ${message}`);
70
+ default:
71
+ throw new Error(`API error (${res.status}): ${message}`);
72
+ }
73
+ }
74
+ return res.json();
75
+ }
76
+ async cachedRequest(cacheKey, path) {
77
+ const cached = this.cache.get(cacheKey);
78
+ if (cached)
79
+ return cached;
80
+ const data = await this.request(path);
81
+ this.cache.set(cacheKey, data);
82
+ return data;
83
+ }
84
+ async listProjects() {
85
+ return this.cachedRequest("projects", "/projects");
86
+ }
87
+ async getProjectContext(projectIdOrSlug) {
88
+ return this.cachedRequest(`context:${projectIdOrSlug}`, `/projects/${encodeURIComponent(projectIdOrSlug)}/context`);
89
+ }
90
+ async searchSpecs(query, projectId) {
91
+ const params = new URLSearchParams({ q: query });
92
+ if (projectId) {
93
+ const uuid = await this.resolveProjectId(projectId);
94
+ params.set("project_id", uuid);
95
+ }
96
+ // Don't cache search results
97
+ return this.request(`/search?${params}`);
98
+ }
99
+ async getImplementationStatus(projectIdOrSlug) {
100
+ const uuid = await this.resolveProjectId(projectIdOrSlug);
101
+ return this.cachedRequest(`status:${uuid}`, `/projects/${encodeURIComponent(uuid)}/implementation-status`);
102
+ }
103
+ async exportSpec(specId, format = "markdown") {
104
+ return this.request(`/export/spec/${specId}`, {
105
+ method: "POST",
106
+ body: JSON.stringify({
107
+ format,
108
+ include_screens: false,
109
+ include_images: false,
110
+ }),
111
+ });
112
+ }
113
+ async healthCheck() {
114
+ return this.request("/health");
115
+ }
116
+ }
117
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAUnC,MAAM,OAAO,YAAY;IACf,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,KAAK,CAAQ;IACb,UAAU,GAAG,IAAI,GAAG,EAAkB,CAAC;IAE/C,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAChD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,gBAAgB,CAAC,QAAgB;QAC7C,MAAM,WAAW,GAAG,iEAAiE,CAAC;QACtF,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC;YAAE,OAAO,QAAQ,CAAC;QAEhD,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,MAAM;YAAE,OAAO,MAAM,CAAC;QAE1B,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;QAC/C,KAAK,MAAM,CAAC,IAAI,QAAQ,EAAE,CAAC;YACzB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACpC,CAAC;QAED,MAAM,Q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S,EAAE,CAAC;YACd,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;YACpD,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QACjC,CAAC;QACD,6BAA6B;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAiB,WAAW,MAAM,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,uBAAuB,CAC3B,eAAuB;QAEvB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,aAAa,CACvB,UAAU,IAAI,EAAE,EAChB,aAAa,kBAAkB,CAAC,IAAI,CAAC,wBAAwB,CAC9D,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CACd,MAAc,EACd,SAAiB,UAAU;QAE3B,OAAO,IAAI,CAAC,OAAO,CAAqB,gBAAgB,MAAM,EAAE,EAAE;YAChE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,MAAM;gBACN,eAAe,EAAE,KAAK;gBACtB,cAAc,EAAE,KAAK;aACtB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,WAAW;QACf,OAAO,IAAI,CAAC,OAAO,CAAqB,SAAS,CAAC,CAAC;IACrD,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Configuration
3
+ *
4
+ * Reads settings from environment variables.
5
+ */
6
+ export interface Config {
7
+ apiKey: string;
8
+ apiUrl: string;
9
+ defaultProject: string | undefined;
10
+ cacheTtl: number;
11
+ }
12
+ export declare function loadConfig(): Config;
13
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,UAAU,IAAI,MAAM,CAkBnC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Configuration
3
+ *
4
+ * Reads settings from environment variables.
5
+ */
6
+ export function loadConfig() {
7
+ const apiKey = process.env.INTENT_API_KEY;
8
+ if (!apiKey) {
9
+ console.error("Error: INTENT_API_KEY environment variable is required.\n" +
10
+ "Create an API key at https://app.intent.dev/settings/mcp\n" +
11
+ "Then set it: INTENT_API_KEY=int_xxxxxxxx");
12
+ process.exit(1);
13
+ }
14
+ return {
15
+ apiKey,
16
+ apiUrl: process.env.INTENT_API_URL || "https://api.intent.dev/api/v1",
17
+ defaultProject: process.env.INTENT_PROJECT || undefined,
18
+ cacheTtl: parseInt(process.env.INTENT_CACHE_TTL || "300", 10),
19
+ };
20
+ }
21
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,MAAM,UAAU,UAAU;IACxB,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAC1C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CACX,2DAA2D;YACzD,4DAA4D;YAC5D,0CAA0C,CAC7C,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO;QACL,MAAM;QACN,MAAM,EACJ,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,+BAA+B;QAC/D,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,SAAS;QACvD,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,KAAK,EAAE,EAAE,CAAC;KAC9D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Intent MCP Server
3
+ *
4
+ * Exposes Intent product specifications as MCP tools so any AI coding agent
5
+ * (Claude Code, Cursor, Windsurf) can understand what to build.
6
+ */
7
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
8
+ export declare function createServer(): Promise<{
9
+ server: McpServer;
10
+ config: import("./config.js").Config;
11
+ }>;
12
+ export declare function main(): Promise<void>;
13
+ export { IntentClient } from "./client.js";
14
+ export { loadConfig } from "./config.js";
15
+ export type { Config } from "./config.js";
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMpE,wBAAsB,YAAY;;;GAYjC;AAED,wBAAsB,IAAI,kBAKzB;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Intent MCP Server
3
+ *
4
+ * Exposes Intent product specifications as MCP tools so any AI coding agent
5
+ * (Claude Code, Cursor, Windsurf) can understand what to build.
6
+ */
7
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
8
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
9
+ import { IntentClient } from "./client.js";
10
+ import { loadConfig } from "./config.js";
11
+ import { registerAllTools } from "./tools/index.js";
12
+ export async function createServer() {
13
+ const config = loadConfig();
14
+ const server = new McpServer({
15
+ name: "intent",
16
+ version: "0.1.0",
17
+ });
18
+ const client = new IntentClient(config);
19
+ registerAllTools(server, client, config.defaultProject);
20
+ return { server, config };
21
+ }
22
+ export async function main() {
23
+ const { server } = await createServer();
24
+ const transport = new StdioServerTransport();
25
+ await server.connect(transport);
26
+ console.error("Intent MCP server running on stdio");
27
+ }
28
+ export { IntentClient } from "./client.js";
29
+ export { loadConfig } from "./config.js";
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAE5B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IACxC,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;IAExD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI;IACxB,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,YAAY,EAAE,CAAC;IACxC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;AACtD,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * intent_export_spec — Export a full specification document.
3
+ */
4
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import type { IntentClient } from "../client.js";
6
+ export declare function registerExportSpec(server: McpServer, client: IntentClient): void;
7
+ //# sourceMappingURL=export-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-spec.d.ts","sourceRoot":"","sources":["../../../src/tools/export-spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QA8BzE"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * intent_export_spec — Export a full specification document.
3
+ */
4
+ import { z } from "zod";
5
+ export function registerExportSpec(server, client) {
6
+ server.tool("intent_export_spec", "Export a full specification document in markdown or AI-ready prompt format. Use intent_get_project_context first to find spec IDs.", {
7
+ spec_id: z.string().describe("Specification ID (UUID)"),
8
+ format: z
9
+ .enum(["markdown", "ai_prompt"])
10
+ .describe("Export format")
11
+ .default("markdown"),
12
+ }, async ({ spec_id, format }) => {
13
+ const result = await client.exportSpec(spec_id, format);
14
+ const header = [
15
+ `# ${result.specName}`,
16
+ `**Format:** ${result.format} | **Features:** ${result.featureCount} | **Screens:** ${result.screenCount}`,
17
+ `**Size:** ${(result.sizeBytes / 1024).toFixed(1)} KB`,
18
+ "",
19
+ "---",
20
+ "",
21
+ ].join("\n");
22
+ return {
23
+ content: [
24
+ { type: "text", text: header + result.content },
25
+ ],
26
+ };
27
+ });
28
+ }
29
+ //# sourceMappingURL=export-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-spec.js","sourceRoot":"","sources":["../../../src/tools/export-spec.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,kBAAkB,CAAC,MAAiB,EAAE,MAAoB;IACxE,MAAM,CAAC,IAAI,CACT,oBAAoB,EACpB,oIAAoI,EACpI;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yBAAyB,CAAC;QACvD,MAAM,EAAE,CAAC;aACN,IAAI,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;aAC/B,QAAQ,CAAC,eAAe,CAAC;aACzB,OAAO,CAAC,UAAU,CAAC;KACvB,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE;QAC5B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAExD,MAAM,MAAM,GAAG;YACb,KAAK,MAAM,CAAC,QAAQ,EAAE;YACtB,eAAe,MAAM,CAAC,MAAM,oBAAoB,MAAM,CAAC,YAAY,mBAAmB,MAAM,CAAC,WAAW,EAAE;YAC1G,aAAa,CAAC,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK;YACtD,EAAE;YACF,KAAK;YACL,EAAE;SACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEb,OAAO;YACL,OAAO,EAAE;gBACP,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,OAAO,EAAE;aACzD;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * intent_get_epic — Get details for a single epic from the project context.
3
+ */
4
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import type { IntentClient } from "../client.js";
6
+ export declare function registerGetEpic(server: McpServer, client: IntentClient, defaultProject?: string): void;
7
+ //# sourceMappingURL=get-epic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-epic.d.ts","sourceRoot":"","sources":["../../../src/tools/get-epic.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,YAAY,EACpB,cAAc,CAAC,EAAE,MAAM,QAkFxB"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * intent_get_epic — Get details for a single epic from the project context.
3
+ */
4
+ import { z } from "zod";
5
+ export function registerGetEpic(server, client, defaultProject) {
6
+ server.tool("intent_get_epic", "Get a single epic with its user stories and items. Use intent_get_project_context first to find epic IDs.", {
7
+ epic_id: z.string().describe("Epic ID (UUID)"),
8
+ project: z
9
+ .string()
10
+ .describe("Project ID or slug (uses default if set)")
11
+ .optional(),
12
+ }, async ({ epic_id, project }) => {
13
+ const projectId = project || defaultProject;
14
+ if (!projectId) {
15
+ return {
16
+ content: [
17
+ {
18
+ type: "text",
19
+ text: "Error: No project specified. Pass a project ID/slug or set INTENT_PROJECT.",
20
+ },
21
+ ],
22
+ isError: true,
23
+ };
24
+ }
25
+ // Get the full context and filter to the epic
26
+ const ctx = await client.getProjectContext(projectId);
27
+ const epic = ctx.epics.find((e) => e.id === epic_id);
28
+ if (!epic) {
29
+ return {
30
+ content: [
31
+ {
32
+ type: "text",
33
+ text: `Epic not found: ${epic_id}. Use intent_get_project_context to see available epics.`,
34
+ },
35
+ ],
36
+ isError: true,
37
+ };
38
+ }
39
+ const lines = [
40
+ `# Epic: ${epic.name}`,
41
+ `**Status:** ${epic.status}${epic.domain ? ` | **Domain:** ${epic.domain}` : ""}`,
42
+ `**Slug:** ${epic.slug}`,
43
+ "",
44
+ epic.description,
45
+ ];
46
+ if (epic.user_stories.length > 0) {
47
+ lines.push("\n## User Stories\n");
48
+ for (const story of epic.user_stories) {
49
+ lines.push(`### ${story.title}`);
50
+ lines.push(`As ${story.as_a}, I want ${story.i_want}, so that ${story.so_that}`);
51
+ lines.push(`**Priority:** ${story.priority} | **Status:** ${story.status}`);
52
+ if (story.acceptance_criteria.length > 0) {
53
+ lines.push("**Acceptance Criteria:**");
54
+ for (const ac of story.acceptance_criteria) {
55
+ const desc = ac.description || ac.criterion || JSON.stringify(ac);
56
+ lines.push(`- ${desc}`);
57
+ }
58
+ }
59
+ lines.push("");
60
+ }
61
+ }
62
+ if (epic.items.length > 0) {
63
+ lines.push("\n## Items\n");
64
+ for (const item of epic.items) {
65
+ lines.push(`- **${item.name}** (${item.technical_type}) — ${item.overall_status}`);
66
+ lines.push(` ${item.description}`);
67
+ }
68
+ }
69
+ return {
70
+ content: [{ type: "text", text: lines.join("\n") }],
71
+ };
72
+ });
73
+ }
74
+ //# sourceMappingURL=get-epic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-epic.js","sourceRoot":"","sources":["../../../src/tools/get-epic.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,eAAe,CAC7B,MAAiB,EACjB,MAAoB,EACpB,cAAuB;IAEvB,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,2GAA2G,EAC3G;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAC9C,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,CAAC,0CAA0C,CAAC;aACpD,QAAQ,EAAE;KACd,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7B,MAAM,SAAS,GAAG,OAAO,IAAI,cAAc,CAAC;QAC5C,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,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AK,CAAC,MAAM,EAAE,CAAC,CAAC;gBAC5E,IAAI,KAAK,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACzC,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;oBACvC,KAAK,MAAM,EAAE,IAAI,KAAK,CAAC,mBAAmB,EAAE,CAAC;wBAC3C,MAAM,IAAI,GAAI,EAA6B,CAAC,WAAW,IAAK,EAA6B,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;wBAC1H,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;oBAC1B,CAAC;gBACH,CAAC;gBACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjB,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAC3B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC9B,KAAK,CAAC,IAAI,CACR,OAAO,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,cAAc,OAAO,IAAI,CAAC,cAAc,EAAE,CACvE,CAAC;gBACF,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;SAC7D,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * intent_get_project_context — Get the full project context with all epics, stories, and items.
3
+ */
4
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import type { IntentClient } from "../client.js";
6
+ export declare function registerGetProjectContext(server: McpServer, client: IntentClient, defaultProject?: string): void;
7
+ //# sourceMappingURL=get-project-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-project-context.d.ts","sourceRoot":"","sources":["../../../src/tools/get-project-context.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAgEjD,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,YAAY,EACpB,cAAc,CAAC,EAAE,MAAM,QAuDxB"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * intent_get_project_context — Get the full project context with all epics, stories, and items.
3
+ */
4
+ import { z } from "zod";
5
+ function formatStory(story, indent = "") {
6
+ const lines = [
7
+ `${indent}### ${story.title}`,
8
+ `${indent}- **As** ${story.as_a}`,
9
+ `${indent}- **I want** ${story.i_want}`,
10
+ `${indent}- **So that** ${story.so_that}`,
11
+ `${indent}- **Priority:** ${story.priority} | **Status:** ${story.status}`,
12
+ ];
13
+ if (story.narrative) {
14
+ lines.push(`${indent}- **Narrative:** ${story.narrative}`);
15
+ }
16
+ if (story.acceptance_criteria.length > 0) {
17
+ lines.push(`${indent}- **Acceptance Criteria:**`);
18
+ for (const ac of story.acceptance_criteria) {
19
+ const desc = ac.description || ac.criterion || JSON.stringify(ac);
20
+ lines.push(`${indent} - ${desc}`);
21
+ }
22
+ }
23
+ return lines.join("\n");
24
+ }
25
+ function formatItem(item, indent = "") {
26
+ const lines = [
27
+ `${indent}- **${item.name}** (${item.technical_type}) — ${item.overall_status}`,
28
+ `${indent} ${item.description}`,
29
+ ];
30
+ if (item.dependencies.length > 0) {
31
+ lines.push(`${indent} Dependencies: ${item.dependencies.join(", ")}`);
32
+ }
33
+ return lines.join("\n");
34
+ }
35
+ function formatEpic(epic) {
36
+ const lines = [
37
+ `## ${epic.name}`,
38
+ `**Status:** ${epic.status}${epic.domain ? ` | **Domain:** ${epic.domain}` : ""}`,
39
+ epic.description,
40
+ ];
41
+ if (epic.user_stories.length > 0) {
42
+ lines.push("\n**User Stories:**");
43
+ for (const story of epic.user_stories) {
44
+ lines.push(formatStory(story));
45
+ }
46
+ }
47
+ if (epic.items.length > 0) {
48
+ lines.push("\n**Items:**");
49
+ for (const item of epic.items) {
50
+ lines.push(formatItem(item));
51
+ }
52
+ }
53
+ return lines.join("\n");
54
+ }
55
+ export function registerGetProjectContext(server, client, defaultProject) {
56
+ server.tool("intent_get_project_context", "Get the FULL project specification: vision, all epics, all user stories with acceptance criteria, and all items. This is the primary tool for understanding what to build.", { project: z.string().describe("Project ID or slug").optional() }, async ({ project }) => {
57
+ const projectId = project || defaultProject;
58
+ if (!projectId) {
59
+ return {
60
+ content: [
61
+ {
62
+ type: "text",
63
+ text: "Error: No project specified. Pass a project ID/slug or set INTENT_PROJECT env var. Use intent_list_projects to see available projects.",
64
+ },
65
+ ],
66
+ isError: true,
67
+ };
68
+ }
69
+ const ctx = await client.getProjectContext(projectId);
70
+ const header = [
71
+ `# ${ctx.name}`,
72
+ ctx.description ? `\n${ctx.description}` : "",
73
+ ctx.vision_statement ? `\n**Vision:** ${ctx.vision_statement}` : "",
74
+ ctx.target_user ? `**Target User:** ${ctx.target_user}` : "",
75
+ ctx.core_problem ? `**Core Problem:** ${ctx.core_problem}` : "",
76
+ ctx.design_principles
77
+ ? `**Design Principles:** ${ctx.design_principles}`
78
+ : "",
79
+ ]
80
+ .filter(Boolean)
81
+ .join("\n");
82
+ const epicSections = ctx.epics.map(formatEpic).join("\n\n---\n\n");
83
+ const specsList = ctx.specs.length > 0
84
+ ? "\n\n---\n\n## Specifications\n" +
85
+ ctx.specs
86
+ .map((s) => `- **${s.name}** (${s.slug}) — ${s.status}`)
87
+ .join("\n")
88
+ : "";
89
+ return {
90
+ content: [
91
+ {
92
+ type: "text",
93
+ text: `${header}\n\n---\n\n${epicSections}${specsList}`,
94
+ },
95
+ ],
96
+ };
97
+ });
98
+ }
99
+ //# sourceMappingURL=get-project-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-project-context.js","sourceRoot":"","sources":["../../../src/tools/get-project-context.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,SAAS,WAAW,CAAC,KAAuB,EAAE,SAAiB,EAAE;IAC/D,MAAM,KAAK,GAAG;QACZ,GAAG,MAAM,OAAO,KAAK,CAAC,KAAK,EAAE;QAC7B,GAAG,MAAM,YAAY,KAAK,CAAC,IAAI,EAAE;QACjC,GAAG,MAAM,gBAAgB,KAAK,CAAC,MAAM,EAAE;QACvC,GAAG,MAAM,iBAAiB,KAAK,CAAC,OAAO,EAAE;QACzC,GAAG,MAAM,mBAAmB,KAAK,CAAC,QAAQ,kBAAkB,KAAK,CAAC,MAAM,EAAE;KAC3E,CAAC;IAEF,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACpB,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,oBAAoB,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,IAAI,KAAK,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,4BAA4B,CAAC,CAAC;QAClD,KAAK,MAAM,EAAE,IAAI,KAAK,CAAC,mBAAmB,EAAE,CAAC;YAC3C,MAAM,IAAI,GAAI,EAA6B,CAAC,WAAW,IAAK,EAA6B,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;YAC1H,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,OAAO,IAAI,EAAE,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,UAAU,CAAC,IAAiB,EAAE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;SACP;aACE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,IAAI,CAAC,CAAC;QAEd,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAEnE,MAAM,SAAS,GACb,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YAClB,CAAC,CAAC,gCAAgC;gBAChC,GAAG,CAAC,KAAK;qBACN,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,EAAE,CAAC;qBACvD,IAAI,CAAC,IAAI,CAAC;YACf,CAAC,CAAC,EAAE,CAAC;QAET,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,GAAG,MAAM,cAAc,YAAY,GAAG,SAAS,EAAE;iBACxD;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * intent_get_implementation_status — Get implementation progress for a project.
3
+ */
4
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import type { IntentClient } from "../client.js";
6
+ export declare function registerGetStatus(server: McpServer, client: IntentClient, defaultProject?: string): void;
7
+ //# sourceMappingURL=get-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-status.d.ts","sourceRoot":"","sources":["../../../src/tools/get-status.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,YAAY,EACpB,cAAc,CAAC,EAAE,MAAM,QAkExB"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * intent_get_implementation_status — Get implementation progress for a project.
3
+ */
4
+ import { z } from "zod";
5
+ export function registerGetStatus(server, client, defaultProject) {
6
+ server.tool("intent_get_implementation_status", "Get implementation progress: what's built vs pending, progress percentage, and the next items to build.", {
7
+ project: z
8
+ .string()
9
+ .describe("Project ID or slug")
10
+ .optional(),
11
+ }, async ({ project }) => {
12
+ const projectId = project || defaultProject;
13
+ if (!projectId) {
14
+ return {
15
+ content: [
16
+ {
17
+ type: "text",
18
+ text: "Error: No project specified. Pass a project ID/slug or set INTENT_PROJECT.",
19
+ },
20
+ ],
21
+ isError: true,
22
+ };
23
+ }
24
+ const status = await client.getImplementationStatus(projectId);
25
+ const lines = [
26
+ `# Implementation Status`,
27
+ "",
28
+ `**Overall Progress:** ${status.overall_progress_percent}%`,
29
+ "",
30
+ `## Counts`,
31
+ `- **Epics:** ${status.total_epics}`,
32
+ `- **User Stories:** ${status.total_stories}`,
33
+ `- **Items:** ${status.total_items}`,
34
+ ];
35
+ if (Object.keys(status.items_by_status).length > 0) {
36
+ lines.push("", "## Items by Status");
37
+ for (const [s, count] of Object.entries(status.items_by_status)) {
38
+ lines.push(`- **${s}:** ${count}`);
39
+ }
40
+ }
41
+ if (Object.keys(status.stories_by_status).length > 0) {
42
+ lines.push("", "## Stories by Status");
43
+ for (const [s, count] of Object.entries(status.stories_by_status)) {
44
+ lines.push(`- **${s}:** ${count}`);
45
+ }
46
+ }
47
+ if (status.next_unimplemented.length > 0) {
48
+ lines.push("", "## Next Items to Build");
49
+ for (const item of status.next_unimplemented) {
50
+ lines.push(`- **${item.name}** (${item.technical_type}) — ${item.description}`);
51
+ }
52
+ }
53
+ return {
54
+ content: [{ type: "text", text: lines.join("\n") }],
55
+ };
56
+ });
57
+ }
58
+ //# sourceMappingURL=get-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-status.js","sourceRoot":"","sources":["../../../src/tools/get-status.ts"],"names":[],"mappings":"AAAA;;GAEG;AA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AC;QAED,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrD,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,sBAAsB,CAAC,CAAC;YACvC,KAAK,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC;gBAClE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;QAED,IAAI,MAAM,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,wBAAwB,CAAC,CAAC;YACzC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBAC7C,KAAK,CAAC,IAAI,CACR,OAAO,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,cAAc,OAAO,IAAI,CAAC,WAAW,EAAE,CACpE,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;SAC7D,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * intent_get_user_story — Get a single user story with acceptance criteria and linked items.
3
+ */
4
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import type { IntentClient } from "../client.js";
6
+ export declare function registerGetStory(server: McpServer, client: IntentClient, defaultProject?: string): void;
7
+ //# sourceMappingURL=get-story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-story.d.ts","sourceRoot":"","sources":["../../../src/tools/get-story.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,YAAY,EACpB,cAAc,CAAC,EAAE,MAAM,QAyFxB"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * intent_get_user_story — Get a single user story with acceptance criteria and linked items.
3
+ */
4
+ import { z } from "zod";
5
+ export function registerGetStory(server, client, defaultProject) {
6
+ server.tool("intent_get_user_story", "Get a single user story with its acceptance criteria and linked items. Use intent_get_project_context first to find story IDs.", {
7
+ story_id: z.string().describe("User story ID (UUID)"),
8
+ project: z
9
+ .string()
10
+ .describe("Project ID or slug (uses default if set)")
11
+ .optional(),
12
+ }, async ({ story_id, project }) => {
13
+ const projectId = project || defaultProject;
14
+ if (!projectId) {
15
+ return {
16
+ content: [
17
+ {
18
+ type: "text",
19
+ text: "Error: No project specified. Pass a project ID/slug or set INTENT_PROJECT.",
20
+ },
21
+ ],
22
+ isError: true,
23
+ };
24
+ }
25
+ const ctx = await client.getProjectContext(projectId);
26
+ // Search across all epics for the story
27
+ for (const epic of ctx.epics) {
28
+ const story = epic.user_stories.find((s) => s.id === story_id);
29
+ if (story) {
30
+ const lines = [
31
+ `# ${story.title}`,
32
+ "",
33
+ `**As** ${story.as_a}`,
34
+ `**I want** ${story.i_want}`,
35
+ `**So that** ${story.so_that}`,
36
+ "",
37
+ `**Priority:** ${story.priority} | **Status:** ${story.status}`,
38
+ `**Epic:** ${epic.name} (${epic.id})`,
39
+ ];
40
+ if (story.narrative) {
41
+ lines.push("", "## Narrative", story.narrative);
42
+ }
43
+ if (story.acceptance_criteria.length > 0) {
44
+ lines.push("", "## Acceptance Criteria");
45
+ for (const ac of story.acceptance_criteria) {
46
+ const desc = ac.description ||
47
+ ac.criterion ||
48
+ JSON.stringify(ac);
49
+ const type = ac.type || "";
50
+ lines.push(`- ${type ? `[${type}] ` : ""}${desc}`);
51
+ }
52
+ }
53
+ // Find items that implement this story
54
+ const implementingItems = epic.items.filter((item) => item.implements_stories.includes(story_id));
55
+ if (implementingItems.length > 0) {
56
+ lines.push("", "## Implementing Items");
57
+ for (const item of implementingItems) {
58
+ lines.push(`- **${item.name}** (${item.technical_type}) — ${item.overall_status}`);
59
+ }
60
+ }
61
+ return {
62
+ content: [{ type: "text", text: lines.join("\n") }],
63
+ };
64
+ }
65
+ }
66
+ return {
67
+ content: [
68
+ {
69
+ type: "text",
70
+ text: `User story not found: ${story_id}. Use intent_get_project_context to see available stories.`,
71
+ },
72
+ ],
73
+ isError: true,
74
+ };
75
+ });
76
+ }
77
+ //# sourceMappingURL=get-story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-story.js","sourceRoot":"","sources":["../../../src/tools/get-story.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,gBAAgB,CAC9B,MAAiB,EACjB,MAAoB,EACpB,cAAuB;IAEvB,MAAM,CAAC,IAAI,CACT,uBAAuB,EACvB,gIAAgI,EAChI;QACE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;QACrD,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,CAAC,0CAA0C,CAAC;aACpD,QAAQ,EAAE;KACd,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;QAC9B,MAAM,SAAS,GAAG,OAAO,IAAI,cAAc,CAAC;QAC5C,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,4EAA4E;qBACnF;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,GAAG,GAAG,MAAM,M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C,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;oBACrD,CAAC;gBACH,CAAC;gBAED,uCAAuC;gBACvC,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CACnD,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAC3C,CAAC;gBACF,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACjC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,uBAAuB,CAAC,CAAC;oBACxC,KAAK,MAAM,IAAI,IAAI,iBAAiB,EAAE,CAAC;wBACrC,KAAK,CAAC,IAAI,CACR,OAAO,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,cAAc,OAAO,IAAI,CAAC,cAAc,EAAE,CACvE,CAAC;oBACJ,CAAC;gBACH,CAAC;gBAED,OAAO;oBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;iBAC7D,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,yBAAyB,QAAQ,4DAA4D;iBACpG;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Tool Registration
3
+ *
4
+ * Registers all Intent MCP tools with the server.
5
+ */
6
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
7
+ import type { IntentClient } from "../client.js";
8
+ export declare function registerAllTools(server: McpServer, client: IntentClient, defaultProject?: string): void;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AASjD,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,YAAY,EACpB,cAAc,CAAC,EAAE,MAAM,GACtB,IAAI,CAQN"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Tool Registration
3
+ *
4
+ * Registers all Intent MCP tools with the server.
5
+ */
6
+ import { registerListProjects } from "./list-projects.js";
7
+ import { registerGetProjectContext } from "./get-project-context.js";
8
+ import { registerGetEpic } from "./get-epic.js";
9
+ import { registerGetStory } from "./get-story.js";
10
+ import { registerSearch } from "./search.js";
11
+ import { registerGetStatus } from "./get-status.js";
12
+ import { registerExportSpec } from "./export-spec.js";
13
+ export function registerAllTools(server, client, defaultProject) {
14
+ registerListProjects(server, client);
15
+ registerGetProjectContext(server, client, defaultProject);
16
+ registerGetEpic(server, client, defaultProject);
17
+ registerGetStory(server, client, defaultProject);
18
+ registerSearch(server, client, defaultProject);
19
+ registerGetStatus(server, client, defaultProject);
20
+ registerExportSpec(server, client);
21
+ }
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,UAAU,gBAAgB,CAC9B,MAAiB,EACjB,MAAoB,EACpB,cAAuB;IAEvB,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAC1D,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAChD,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IACjD,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAC/C,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IAClD,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * intent_list_projects — List all projects accessible via the API key.
3
+ */
4
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import type { IntentClient } from "../client.js";
6
+ export declare function registerListProjects(server: McpServer, client: IntentClient): void;
7
+ //# sourceMappingURL=list-projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-projects.d.ts","sourceRoot":"","sources":["../../../src/tools/list-projects.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,QAqC3E"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * intent_list_projects — List all projects accessible via the API key.
3
+ */
4
+ export function registerListProjects(server, client) {
5
+ server.tool("intent_list_projects", "List all Intent projects accessible with your API key. Returns project names, slugs, descriptions, and spec counts.", {}, async () => {
6
+ const data = await client.listProjects();
7
+ if (data.projects.length === 0) {
8
+ return {
9
+ content: [
10
+ {
11
+ type: "text",
12
+ text: "No projects found. Create a project at https://app.intent.dev first.",
13
+ },
14
+ ],
15
+ };
16
+ }
17
+ const lines = data.projects.map((p) => {
18
+ const parts = [`## ${p.name}`, `- **Slug:** ${p.slug}`, `- **ID:** ${p.id}`];
19
+ if (p.description)
20
+ parts.push(`- **Description:** ${p.description}`);
21
+ parts.push(`- **Specs:** ${p.specs_count}`);
22
+ parts.push(`- **Updated:** ${p.updated_at}`);
23
+ return parts.join("\n");
24
+ });
25
+ return {
26
+ content: [
27
+ {
28
+ type: "text",
29
+ text: `# Intent Projects (${data.total})\n\n${lines.join("\n\n")}`,
30
+ },
31
+ ],
32
+ };
33
+ });
34
+ }
35
+ //# sourceMappingURL=list-projects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-projects.js","sourceRoot":"","sources":["../../../src/tools/list-projects.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,MAAoB;IAC1E,MAAM,CAAC,IAAI,CACT,sBAAsB,EACtB,qHAAqH,EACrH,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;QAEzC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,sEAAsE;qBAC7E;iBACF;aACF,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACpC,MAAM,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,eAAe,CAAC,CAAC,IAAI,EAAE,EAAE,aAAa,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC7E,IAAI,CAAC,CAAC,WAAW;gBAAE,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;YACrE,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;YAC5C,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;YAC7C,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,sBAAsB,IAAI,CAAC,KAAK,QAAQ,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;iBACnE;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * intent_search — Search across epics, user stories, and items.
3
+ */
4
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import type { IntentClient } from "../client.js";
6
+ export declare function registerSearch(server: McpServer, client: IntentClient, defaultProject?: string): void;
7
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/tools/search.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,YAAY,EACpB,cAAc,CAAC,EAAE,MAAM,QAoDxB"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * intent_search — Search across epics, user stories, and items.
3
+ */
4
+ import { z } from "zod";
5
+ export function registerSearch(server, client, defaultProject) {
6
+ server.tool("intent_search", "Search across all specification entities (epics, user stories, items) by keyword. Returns matching results with context.", {
7
+ query: z.string().describe("Search query"),
8
+ project: z
9
+ .string()
10
+ .describe("Optional project ID or slug to scope search")
11
+ .optional(),
12
+ }, async ({ query, project }) => {
13
+ const projectId = project || defaultProject;
14
+ const results = await client.searchSpecs(query, projectId);
15
+ if (results.results.length === 0) {
16
+ return {
17
+ content: [
18
+ {
19
+ type: "text",
20
+ text: `No results found for "${query}".`,
21
+ },
22
+ ],
23
+ };
24
+ }
25
+ const lines = [
26
+ `# Search Results for "${query}" (${results.total} found)`,
27
+ "",
28
+ ];
29
+ for (const r of results.results) {
30
+ const typeLabel = r.entity_type === "user_story"
31
+ ? "User Story"
32
+ : r.entity_type.charAt(0).toUpperCase() + r.entity_type.slice(1);
33
+ lines.push(`## ${typeLabel}: ${r.name}`);
34
+ lines.push(`- **ID:** ${r.id}`);
35
+ lines.push(`- **Project:** ${r.project_name}`);
36
+ if (r.epic_name)
37
+ lines.push(`- **Epic:** ${r.epic_name}`);
38
+ lines.push(`- **Snippet:** ${r.snippet}`);
39
+ lines.push("");
40
+ }
41
+ return {
42
+ content: [{ type: "text", text: lines.join("\n") }],
43
+ };
44
+ });
45
+ }
46
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/tools/search.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,cAAc,CAC5B,MAAiB,EACjB,MAAoB,EACpB,cAAuB;IAEvB,MAAM,CAAC,IAAI,CACT,eAAe,EACf,0HAA0H,EAC1H;QACE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;QAC1C,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,CAAC,6CAA6C,CAAC;aACvD,QAAQ,EAAE;KACd,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;QAC3B,MAAM,SA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e,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;SAC7D,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * TypeScript types matching Intent API responses.
3
+ */
4
+ export interface ProjectSummary {
5
+ id: string;
6
+ name: string;
7
+ slug: string;
8
+ description: string | null;
9
+ github_repo_url: string | null;
10
+ specs_count: number;
11
+ default_spec_id: string | null;
12
+ created_at: string;
13
+ updated_at: string;
14
+ }
15
+ export interface ProjectListResponse {
16
+ projects: ProjectSummary[];
17
+ total: number;
18
+ }
19
+ export interface UserStoryContext {
20
+ id: string;
21
+ title: string;
22
+ as_a: string;
23
+ i_want: string;
24
+ so_that: string;
25
+ narrative: string | null;
26
+ acceptance_criteria: Record<string, unknown>[];
27
+ priority: string;
28
+ status: string;
29
+ implemented_by: string[];
30
+ }
31
+ export interface ItemContext {
32
+ id: string;
33
+ name: string;
34
+ description: string;
35
+ display_category: string;
36
+ technical_type: string;
37
+ overall_status: string;
38
+ implements_stories: string[];
39
+ dependencies: string[];
40
+ }
41
+ export interface EpicContext {
42
+ id: string;
43
+ name: string;
44
+ slug: string;
45
+ description: string;
46
+ status: string;
47
+ domain: string | null;
48
+ user_stories: UserStoryContext[];
49
+ items: ItemContext[];
50
+ }
51
+ export interface SpecSummary {
52
+ id: string;
53
+ name: string;
54
+ slug: string;
55
+ status: string;
56
+ format_id: string;
57
+ }
58
+ export interface ProjectContextResponse {
59
+ id: string;
60
+ name: string;
61
+ slug: string;
62
+ description: string | null;
63
+ vision_statement: string | null;
64
+ target_user: string | null;
65
+ core_problem: string | null;
66
+ design_principles: string | null;
67
+ epics: EpicContext[];
68
+ specs: SpecSummary[];
69
+ }
70
+ export interface SearchResult {
71
+ entity_type: string;
72
+ id: string;
73
+ name: string;
74
+ snippet: string;
75
+ project_id: string;
76
+ project_name: string;
77
+ epic_id: string | null;
78
+ epic_name: string | null;
79
+ }
80
+ export interface SearchResponse {
81
+ results: SearchResult[];
82
+ total: number;
83
+ query: string;
84
+ }
85
+ export interface ImplementationStatusResponse {
86
+ total_epics: number;
87
+ total_stories: number;
88
+ total_items: number;
89
+ items_by_status: Record<string, number>;
90
+ stories_by_status: Record<string, number>;
91
+ overall_progress_percent: number;
92
+ next_unimplemented: ItemContext[];
93
+ }
94
+ export interface ExportSpecResponse {
95
+ content: string;
96
+ format: string;
97
+ sizeBytes: number;
98
+ specId: string;
99
+ specName: string;
100
+ featureCount: number;
101
+ screenCount: number;
102
+ exportedAt: string;
103
+ }
104
+ export interface EpicDetailResponse {
105
+ id: string;
106
+ name: string;
107
+ slug: string;
108
+ description: string;
109
+ status: string;
110
+ domain: string | null;
111
+ user_stories: UserStoryContext[];
112
+ items: ItemContext[];
113
+ }
114
+ export interface UserStoryDetailResponse extends UserStoryContext {
115
+ epic_id: string;
116
+ }
117
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IAC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;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * TypeScript types matching Intent API responses.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@intentdevelopers/mcp",
3
+ "version": "0.1.0",
4
+ "description": "MCP server for Intent — share your product specifications with any AI coding agent",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "intent-mcp": "./dist/bin/intent-mcp.js"
9
+ },
10
+ "main": "./dist/src/index.js",
11
+ "types": "./dist/src/index.d.ts",
12
+ "files": [
13
+ "dist"
14
+ ],
15
+ "scripts": {
16
+ "build": "tsc",
17
+ "dev": "tsc --watch",
18
+ "start": "node dist/bin/intent-mcp.js",
19
+ "lint": "tsc --noEmit",
20
+ "prepublishOnly": "pnpm build"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/intentdev/intent"
28
+ },
29
+ "homepage": "https://intent.dev",
30
+ "keywords": [
31
+ "mcp",
32
+ "model-context-protocol",
33
+ "intent",
34
+ "product-specs",
35
+ "ai-coding",
36
+ "claude",
37
+ "cursor"
38
+ ],
39
+ "dependencies": {
40
+ "@modelcontextprotocol/sdk": "^1.12.0",
41
+ "zod": "^3.23.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^22.0.0",
45
+ "typescript": "^5.6.0"
46
+ },
47
+ "engines": {
48
+ "node": ">=18"
49
+ }
50
+ }