@crypto512/jicon-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 (103) hide show
  1. package/.env.example +9 -0
  2. package/.jicon.json.custom +21 -0
  3. package/.jicon.json.example +15 -0
  4. package/.jicon.json.readonly +15 -0
  5. package/CLAUDE.md +596 -0
  6. package/CONTRIBUTING.md +371 -0
  7. package/DEVELOPMENT.md +400 -0
  8. package/LICENSE +21 -0
  9. package/README.md +300 -0
  10. package/TOOL_LIST.md +435 -0
  11. package/dist/config/constants.d.ts +14 -0
  12. package/dist/config/constants.d.ts.map +1 -0
  13. package/dist/config/constants.js +18 -0
  14. package/dist/config/constants.js.map +1 -0
  15. package/dist/config/loader.d.ts +35 -0
  16. package/dist/config/loader.d.ts.map +1 -0
  17. package/dist/config/loader.js +108 -0
  18. package/dist/config/loader.js.map +1 -0
  19. package/dist/config/types.d.ts +130 -0
  20. package/dist/config/types.d.ts.map +1 -0
  21. package/dist/config/types.js +32 -0
  22. package/dist/config/types.js.map +1 -0
  23. package/dist/confluence/client.d.ts +30 -0
  24. package/dist/confluence/client.d.ts.map +1 -0
  25. package/dist/confluence/client.js +176 -0
  26. package/dist/confluence/client.js.map +1 -0
  27. package/dist/confluence/defaults.d.ts +23 -0
  28. package/dist/confluence/defaults.d.ts.map +1 -0
  29. package/dist/confluence/defaults.js +29 -0
  30. package/dist/confluence/defaults.js.map +1 -0
  31. package/dist/confluence/formatters.d.ts +22 -0
  32. package/dist/confluence/formatters.d.ts.map +1 -0
  33. package/dist/confluence/formatters.js +125 -0
  34. package/dist/confluence/formatters.js.map +1 -0
  35. package/dist/confluence/tools.d.ts +266 -0
  36. package/dist/confluence/tools.d.ts.map +1 -0
  37. package/dist/confluence/tools.js +376 -0
  38. package/dist/confluence/tools.js.map +1 -0
  39. package/dist/confluence/types.d.ts +122 -0
  40. package/dist/confluence/types.d.ts.map +1 -0
  41. package/dist/confluence/types.js +5 -0
  42. package/dist/confluence/types.js.map +1 -0
  43. package/dist/index.d.ts +6 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +161 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/jira/client.d.ts +46 -0
  48. package/dist/jira/client.d.ts.map +1 -0
  49. package/dist/jira/client.js +178 -0
  50. package/dist/jira/client.js.map +1 -0
  51. package/dist/jira/defaults.d.ts +19 -0
  52. package/dist/jira/defaults.d.ts.map +1 -0
  53. package/dist/jira/defaults.js +57 -0
  54. package/dist/jira/defaults.js.map +1 -0
  55. package/dist/jira/formatters.d.ts +22 -0
  56. package/dist/jira/formatters.d.ts.map +1 -0
  57. package/dist/jira/formatters.js +128 -0
  58. package/dist/jira/formatters.js.map +1 -0
  59. package/dist/jira/tools.d.ts +334 -0
  60. package/dist/jira/tools.d.ts.map +1 -0
  61. package/dist/jira/tools.js +372 -0
  62. package/dist/jira/tools.js.map +1 -0
  63. package/dist/jira/types.d.ts +110 -0
  64. package/dist/jira/types.d.ts.map +1 -0
  65. package/dist/jira/types.js +5 -0
  66. package/dist/jira/types.js.map +1 -0
  67. package/dist/permissions/filter.d.ts +30 -0
  68. package/dist/permissions/filter.d.ts.map +1 -0
  69. package/dist/permissions/filter.js +89 -0
  70. package/dist/permissions/filter.js.map +1 -0
  71. package/dist/permissions/tool-registry.d.ts +49 -0
  72. package/dist/permissions/tool-registry.d.ts.map +1 -0
  73. package/dist/permissions/tool-registry.js +111 -0
  74. package/dist/permissions/tool-registry.js.map +1 -0
  75. package/dist/tempo/client.d.ts +32 -0
  76. package/dist/tempo/client.d.ts.map +1 -0
  77. package/dist/tempo/client.js +125 -0
  78. package/dist/tempo/client.js.map +1 -0
  79. package/dist/tempo/formatters.d.ts +30 -0
  80. package/dist/tempo/formatters.d.ts.map +1 -0
  81. package/dist/tempo/formatters.js +172 -0
  82. package/dist/tempo/formatters.js.map +1 -0
  83. package/dist/tempo/tools.d.ts +184 -0
  84. package/dist/tempo/tools.d.ts.map +1 -0
  85. package/dist/tempo/tools.js +392 -0
  86. package/dist/tempo/tools.js.map +1 -0
  87. package/dist/tempo/types.d.ts +98 -0
  88. package/dist/tempo/types.d.ts.map +1 -0
  89. package/dist/tempo/types.js +5 -0
  90. package/dist/tempo/types.js.map +1 -0
  91. package/dist/types.d.ts +27 -0
  92. package/dist/types.d.ts.map +1 -0
  93. package/dist/types.js +6 -0
  94. package/dist/types.js.map +1 -0
  95. package/dist/utils/http-client.d.ts +22 -0
  96. package/dist/utils/http-client.d.ts.map +1 -0
  97. package/dist/utils/http-client.js +137 -0
  98. package/dist/utils/http-client.js.map +1 -0
  99. package/dist/utils/response-formatter.d.ts +8 -0
  100. package/dist/utils/response-formatter.d.ts.map +1 -0
  101. package/dist/utils/response-formatter.js +38 -0
  102. package/dist/utils/response-formatter.js.map +1 -0
  103. package/package.json +50 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tempo/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE;QACL,GAAG,EAAE,MAAM,CAAC;QACZ,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;IACF,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,UAAU,CAAC,EAAE;QACX,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;CAC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AI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tempo-specific types
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tempo/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Shared types for Jira and Confluence MCP Server
3
+ */
4
+ export interface ApiConfig {
5
+ url: string;
6
+ username?: string;
7
+ token: string;
8
+ authType?: "basic" | "bearer";
9
+ }
10
+ export interface ApiError {
11
+ error: boolean;
12
+ message: string;
13
+ statusCode?: number;
14
+ details?: unknown;
15
+ }
16
+ export interface ApiResponse<T> {
17
+ data?: T;
18
+ error?: ApiError;
19
+ }
20
+ export interface ToolResult {
21
+ content: Array<{
22
+ type: "text";
23
+ text: string;
24
+ }>;
25
+ isError?: boolean;
26
+ }
27
+ //# 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,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC/B;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
package/dist/types.js ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Shared types for Jira and Confluence MCP Server
3
+ */
4
+ export {};
5
+ // Note: This type is compatible with CallToolResult from @modelcontextprotocol/sdk
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;;AA6BH,mFAAmF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * HTTP client utility for API requests
3
+ */
4
+ import { AxiosRequestConfig } from "axios";
5
+ import type { ApiConfig } from "../types.js";
6
+ export declare class HttpClient {
7
+ private client;
8
+ constructor(config: ApiConfig);
9
+ /**
10
+ * Detect authentication type based on configuration
11
+ * If username is not provided, assume Bearer token
12
+ */
13
+ private detectAuthType;
14
+ get<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
15
+ post<T>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T>;
16
+ put<T>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T>;
17
+ delete<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
18
+ private handleError;
19
+ private getHttpStatusMessage;
20
+ private getAuthenticationHint;
21
+ }
22
+ //# sourceMappingURL=http-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-client.d.ts","sourceRoot":"","sources":["../../src/utils/http-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAc,EAAiB,kBAAkB,EAAc,MAAM,OAAO,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,aAAa,CAAC;AAEvD,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAgB;gBAElB,MAAM,EAAE,SAAS;IA4C7B;;;OAGG;IACH,OAAO,CAAC,cAAc;IAIhB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC;IAK5D,IAAI,CAAC,CAAC,EACV,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,OAAO,EACd,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,CAAC,CAAC;IAKP,GAAG,CAAC,CAAC,EACT,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,OAAO,EACd,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,CAAC,CAAC;IAKP,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,CAAC,CAAC;IAKrE,OAAO,CAAC,WAAW;IAiDnB,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,qBAAqB;CAU9B"}
@@ -0,0 +1,137 @@
1
+ /**
2
+ * HTTP client utility for API requests
3
+ */
4
+ import axios from "axios";
5
+ export class HttpClient {
6
+ client;
7
+ constructor(config) {
8
+ // Determine authentication type
9
+ // Default to "basic" for backward compatibility, unless authType is explicitly set
10
+ const authType = config.authType || this.detectAuthType(config);
11
+ const headers = {
12
+ "Content-Type": "application/json",
13
+ Accept: "application/json",
14
+ };
15
+ // Configure authentication based on type
16
+ const axiosConfig = {
17
+ baseURL: config.url,
18
+ headers,
19
+ timeout: 30000,
20
+ };
21
+ if (authType === "bearer") {
22
+ // Use Bearer token authentication (for Jira/Confluence Data Center with PAT)
23
+ headers.Authorization = `Bearer ${config.token}`;
24
+ }
25
+ else {
26
+ // Use Basic authentication (for Jira/Confluence Cloud or Server with username/password)
27
+ if (!config.username) {
28
+ throw new Error("Username is required for Basic authentication. For Bearer token authentication, set authType to 'bearer'.");
29
+ }
30
+ axiosConfig.auth = {
31
+ username: config.username,
32
+ password: config.token,
33
+ };
34
+ }
35
+ this.client = axios.create(axiosConfig);
36
+ // Add response interceptor for error handling
37
+ this.client.interceptors.response.use((response) => response, (error) => {
38
+ throw this.handleError(error);
39
+ });
40
+ }
41
+ /**
42
+ * Detect authentication type based on configuration
43
+ * If username is not provided, assume Bearer token
44
+ */
45
+ detectAuthType(config) {
46
+ return config.username ? "basic" : "bearer";
47
+ }
48
+ async get(url, config) {
49
+ const response = await this.client.get(url, config);
50
+ return response.data;
51
+ }
52
+ async post(url, data, config) {
53
+ const response = await this.client.post(url, data, config);
54
+ return response.data;
55
+ }
56
+ async put(url, data, config) {
57
+ const response = await this.client.put(url, data, config);
58
+ return response.data;
59
+ }
60
+ async delete(url, config) {
61
+ const response = await this.client.delete(url, config);
62
+ return response.data;
63
+ }
64
+ handleError(error) {
65
+ if (error.response) {
66
+ // Server responded with error status
67
+ const statusCode = error.response.status;
68
+ const contentType = error.response.headers["content-type"] || "";
69
+ // Handle HTML error responses (common for 401, 403, etc.)
70
+ if (contentType.includes("text/html")) {
71
+ return {
72
+ error: true,
73
+ message: this.getHttpStatusMessage(statusCode),
74
+ statusCode,
75
+ details: {
76
+ hint: this.getAuthenticationHint(statusCode),
77
+ },
78
+ };
79
+ }
80
+ // Handle JSON error responses
81
+ const errorMessage = error.response.data
82
+ ?.errorMessages?.[0] ||
83
+ error.response.data?.message ||
84
+ this.getHttpStatusMessage(statusCode);
85
+ return {
86
+ error: true,
87
+ message: errorMessage,
88
+ statusCode,
89
+ details: error.response.data,
90
+ };
91
+ }
92
+ else if (error.request) {
93
+ // Request made but no response
94
+ return {
95
+ error: true,
96
+ message: "No response from server",
97
+ statusCode: 0,
98
+ details: { originalError: error.message },
99
+ };
100
+ }
101
+ else {
102
+ // Error setting up request
103
+ return {
104
+ error: true,
105
+ message: error.message,
106
+ details: { originalError: error.message },
107
+ };
108
+ }
109
+ }
110
+ getHttpStatusMessage(statusCode) {
111
+ switch (statusCode) {
112
+ case 401:
113
+ return "Authentication failed: Invalid credentials or token";
114
+ case 403:
115
+ return "Access forbidden: Insufficient permissions";
116
+ case 404:
117
+ return "Resource not found";
118
+ case 400:
119
+ return "Bad request: Invalid parameters";
120
+ case 500:
121
+ return "Internal server error";
122
+ default:
123
+ return `HTTP ${statusCode} error`;
124
+ }
125
+ }
126
+ getAuthenticationHint(statusCode) {
127
+ switch (statusCode) {
128
+ case 401:
129
+ return "Check your credentials. For Jira/Confluence Cloud: use email + API token with Basic Auth. For Jira/Confluence Data Center 8.14+: use Personal Access Token (PAT) with Bearer Auth by setting authType='bearer' or omitting username.";
130
+ case 403:
131
+ return "Your credentials are valid but you don't have permission to access this resource.";
132
+ default:
133
+ return "";
134
+ }
135
+ }
136
+ }
137
+ //# sourceMappingURL=http-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-client.js","sourceRoot":"","sources":["../../src/utils/http-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAwD,MAAM,OAAO,CAAC;AAG7E,MAAM,OAAO,UAAU;IACb,MAAM,CAAgB;IAE9B,YAAY,MAAiB;QAC3B,gCAAgC;QAChC,mFAAmF;QACnF,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,c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AAsO,CAAC;YAChP,KAAK,GAAG;gBACN,OAAO,mFAAmF,CAAC;YAC7F;gBACE,OAAO,EAAE,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Response formatting utilities for MCP tools
3
+ */
4
+ import type { ToolResult, ApiError } from "../types.js";
5
+ export declare function formatSuccess(data: unknown): ToolResult;
6
+ export declare function formatError(error: ApiError | Error): ToolResult;
7
+ export declare function isApiError(error: unknown): error is ApiError;
8
+ //# sourceMappingURL=response-formatter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-formatter.d.ts","sourceRoot":"","sources":["../../src/utils/response-formatter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAExD,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CASvD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,GAAG,UAAU,CAmB/D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAO5D"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Response formatting utilities for MCP tools
3
+ */
4
+ export function formatSuccess(data) {
5
+ return {
6
+ content: [
7
+ {
8
+ type: "text",
9
+ text: JSON.stringify(data, null, 2),
10
+ },
11
+ ],
12
+ };
13
+ }
14
+ export function formatError(error) {
15
+ const errorObj = error instanceof Error
16
+ ? {
17
+ error: true,
18
+ message: error.message,
19
+ details: { stack: error.stack },
20
+ }
21
+ : error;
22
+ return {
23
+ content: [
24
+ {
25
+ type: "text",
26
+ text: JSON.stringify(errorObj, null, 2),
27
+ },
28
+ ],
29
+ isError: true,
30
+ };
31
+ }
32
+ export function isApiError(error) {
33
+ return (typeof error === "object" &&
34
+ error !== null &&
35
+ "error" in error &&
36
+ error.error === true);
37
+ }
38
+ //# sourceMappingURL=response-formatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response-formatter.js","sourceRoot":"","sources":["../../src/utils/response-formatter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,UAAU,aAAa,CAAC,IAAa;IACzC,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;aACpC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,QAAQ,GACZ,KAAK,YAAY,KAAK;QACpB,CAAC,CAAC;YACE,KAAK,EAAE,IAAI;YACX,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE;SAChC;QACH,CAAC,CAAC,KAAK,CAAC;IAEZ,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;aACxC;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,OAAO,IAAI,KAAK;QAChB,KAAK,CAAC,KAAK,KAAK,IAAI,CACrB,CAAC;AACJ,CAAC"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@crypto512/jicon-mcp",
3
+ "version": "0.1.0",
4
+ "description": "Model Context Protocol server for Jira and Confluence integration",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "jicon-mcp": "./dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "prepare": "npm run build",
13
+ "watch": "tsc --watch",
14
+ "test": "node --test",
15
+ "lint": "eslint src/**/*.ts",
16
+ "start": "node dist/index.js"
17
+ },
18
+ "keywords": [
19
+ "mcp",
20
+ "model-context-protocol",
21
+ "jira",
22
+ "confluence",
23
+ "atlassian",
24
+ "ai",
25
+ "claude"
26
+ ],
27
+ "author": "",
28
+ "license": "MIT",
29
+ "dependencies": {
30
+ "@modelcontextprotocol/sdk": "^1.0.0",
31
+ "axios": "^1.7.0",
32
+ "form-data": "^4.0.0",
33
+ "zod": "^3.23.0"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^22.0.0",
37
+ "typescript": "^5.6.0"
38
+ },
39
+ "engines": {
40
+ "node": ">=18.0.0"
41
+ },
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "https://github.com/crypto512/jicon"
45
+ },
46
+ "bugs": {
47
+ "url": "https://github.com/crypto512/jicon/issues"
48
+ },
49
+ "homepage": "https://github.com/crypto512/jicon#readme"
50
+ }