@khanglvm/jira-mcp 1.3.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.
- package/LICENSE +21 -0
- package/README.md +126 -0
- package/dist/client.d.ts +287 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +235 -0
- package/dist/client.js.map +1 -0
- package/dist/config-fetcher.d.ts +30 -0
- package/dist/config-fetcher.d.ts.map +1 -0
- package/dist/config-fetcher.js +279 -0
- package/dist/config-fetcher.js.map +1 -0
- package/dist/config.d.ts +54 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +66 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +228 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-registry.d.ts +106 -0
- package/dist/mcp-registry.d.ts.map +1 -0
- package/dist/mcp-registry.js +168 -0
- package/dist/mcp-registry.js.map +1 -0
- package/dist/setup.d.ts +41 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +263 -0
- package/dist/setup.js.map +1 -0
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +10 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/issues.d.ts +364 -0
- package/dist/tools/issues.d.ts.map +1 -0
- package/dist/tools/issues.js +392 -0
- package/dist/tools/issues.js.map +1 -0
- package/dist/tools/projects.d.ts +70 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +101 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/search.d.ts +76 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +111 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/transitions.d.ts +99 -0
- package/dist/tools/transitions.d.ts.map +1 -0
- package/dist/tools/transitions.js +121 -0
- package/dist/tools/transitions.js.map +1 -0
- package/dist/tools/users.d.ts +70 -0
- package/dist/tools/users.d.ts.map +1 -0
- package/dist/tools/users.js +96 -0
- package/dist/tools/users.js.map +1 -0
- package/dist/types/mcp-config.d.ts +154 -0
- package/dist/types/mcp-config.d.ts.map +1 -0
- package/dist/types/mcp-config.js +7 -0
- package/dist/types/mcp-config.js.map +1 -0
- package/dist/utils/path-resolver.d.ts +16 -0
- package/dist/utils/path-resolver.d.ts.map +1 -0
- package/dist/utils/path-resolver.js +37 -0
- package/dist/utils/path-resolver.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file config-fetcher.ts
|
|
3
|
+
* @description HTTP config fetcher with hybrid caching (memory + file).
|
|
4
|
+
* Fetches remote MCP config from GitHub with offline fallback support.
|
|
5
|
+
*/
|
|
6
|
+
import type { McpConfigSchema, FetchOptions, ConfigFileType } from './types/mcp-config.js';
|
|
7
|
+
/**
|
|
8
|
+
* Detects config file type from extension.
|
|
9
|
+
*/
|
|
10
|
+
export declare function detectConfigFileType(filePath: string): ConfigFileType;
|
|
11
|
+
/**
|
|
12
|
+
* Main function to fetch MCP configuration.
|
|
13
|
+
* Cache hierarchy: memory -> remote -> file -> error
|
|
14
|
+
*/
|
|
15
|
+
export declare function fetchMcpConfig(options?: FetchOptions): Promise<McpConfigSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* Clears all caches (memory and file).
|
|
18
|
+
* Useful for testing or forcing fresh fetch.
|
|
19
|
+
*/
|
|
20
|
+
export declare function clearCache(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Gets current cache status.
|
|
23
|
+
* Useful for debugging and monitoring.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getCacheStatus(): {
|
|
26
|
+
memory: boolean;
|
|
27
|
+
file: boolean;
|
|
28
|
+
age?: number;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=config-fetcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-fetcher.d.ts","sourceRoot":"","sources":["../src/config-fetcher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EACR,eAAe,EACf,YAAY,EAEZ,cAAc,EACjB,MAAM,uBAAuB,CAAC;AA6G/B;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAarE;AAsGD;;;GAGG;AACH,wBAAsB,cAAc,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CA4CrF;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,IAAI,CAWjC;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAWjF"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file config-fetcher.ts
|
|
3
|
+
* @description HTTP config fetcher with hybrid caching (memory + file).
|
|
4
|
+
* Fetches remote MCP config from GitHub with offline fallback support.
|
|
5
|
+
*/
|
|
6
|
+
import * as fs from 'fs';
|
|
7
|
+
import * as path from 'path';
|
|
8
|
+
import * as os from 'os';
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
// Constants
|
|
11
|
+
const REMOTE_URL = 'https://raw.githubusercontent.com/khanglvm/aic/main/mcp/mcp-conf.json';
|
|
12
|
+
const CACHE_TTL = 60 * 1000; // 1 minute
|
|
13
|
+
const TIMEOUT = 10000; // 10 seconds
|
|
14
|
+
const DEFAULT_RETRIES = 3;
|
|
15
|
+
// In-memory cache entry
|
|
16
|
+
let memoryCache = null;
|
|
17
|
+
/**
|
|
18
|
+
* Zod schema for MCP config validation.
|
|
19
|
+
* Ensures remote JSON has required fields.
|
|
20
|
+
*/
|
|
21
|
+
const mcpConfigSchema = z.object({
|
|
22
|
+
$schema: z.string().optional(),
|
|
23
|
+
$id: z.string().optional(),
|
|
24
|
+
version: z.string(),
|
|
25
|
+
lastUpdated: z.string(),
|
|
26
|
+
description: z.string().optional(),
|
|
27
|
+
clients: z.record(z.object({
|
|
28
|
+
name: z.string(),
|
|
29
|
+
vendor: z.string().optional(),
|
|
30
|
+
description: z.string().optional(),
|
|
31
|
+
docsUrl: z.string().optional(),
|
|
32
|
+
configLocations: z.record(z.record(z.string())),
|
|
33
|
+
configFormat: z.object({
|
|
34
|
+
wrapperKey: z.enum(['mcpServers', 'mcp', 'servers', 'context_servers', 'mcp_servers']),
|
|
35
|
+
serverSchema: z.object({
|
|
36
|
+
command: z.any().optional(),
|
|
37
|
+
args: z.any().optional(),
|
|
38
|
+
url: z.any().optional(),
|
|
39
|
+
headers: z.any().optional(),
|
|
40
|
+
env: z.any().optional(),
|
|
41
|
+
environment: z.any().optional(),
|
|
42
|
+
}).passthrough(),
|
|
43
|
+
format: z.enum(['json', 'yaml', 'toml']).optional(),
|
|
44
|
+
}).passthrough(),
|
|
45
|
+
cli: z.any().optional(),
|
|
46
|
+
scopes: z.array(z.string()),
|
|
47
|
+
transportSupport: z.array(z.string()),
|
|
48
|
+
notes: z.array(z.string()).optional(),
|
|
49
|
+
})),
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Gets the cache file path for MCP config.
|
|
53
|
+
* Platform-specific: ~/.cache/jira-mcp/mcp-conf.json
|
|
54
|
+
*/
|
|
55
|
+
function getCacheFilePath() {
|
|
56
|
+
return path.join(os.homedir(), '.cache', 'jira-mcp', 'mcp-conf.json');
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Ensures cache directory exists with proper permissions.
|
|
60
|
+
*/
|
|
61
|
+
function ensureCacheDir() {
|
|
62
|
+
const cacheDir = path.dirname(getCacheFilePath());
|
|
63
|
+
if (!fs.existsSync(cacheDir)) {
|
|
64
|
+
fs.mkdirSync(cacheDir, { recursive: true, mode: 0o700 });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Persists config data to file cache.
|
|
69
|
+
* Uses secure permissions (0600 - owner read/write only).
|
|
70
|
+
*/
|
|
71
|
+
function persistToFile(data, etag) {
|
|
72
|
+
try {
|
|
73
|
+
ensureCacheDir();
|
|
74
|
+
const cacheEntry = {
|
|
75
|
+
data,
|
|
76
|
+
etag,
|
|
77
|
+
fetchedAt: Date.now(),
|
|
78
|
+
ttl: CACHE_TTL,
|
|
79
|
+
};
|
|
80
|
+
const filePath = getCacheFilePath();
|
|
81
|
+
fs.writeFileSync(filePath, JSON.stringify(cacheEntry, null, 2), { mode: 0o600 });
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
console.warn(`Warning: Failed to write cache file: ${error.message}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Reads config from file cache.
|
|
89
|
+
* Returns null if cache doesn't exist or is invalid.
|
|
90
|
+
*/
|
|
91
|
+
function readFromFile() {
|
|
92
|
+
try {
|
|
93
|
+
const filePath = getCacheFilePath();
|
|
94
|
+
if (!fs.existsSync(filePath)) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
98
|
+
const cacheEntry = JSON.parse(content);
|
|
99
|
+
// Validate cache entry structure
|
|
100
|
+
if (!cacheEntry.data || typeof cacheEntry.data !== 'object') {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
return cacheEntry.data;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
console.warn(`Warning: Failed to read cache file: ${error.message}`);
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Detects config file type from extension.
|
|
112
|
+
*/
|
|
113
|
+
export function detectConfigFileType(filePath) {
|
|
114
|
+
const ext = path.extname(filePath).toLowerCase();
|
|
115
|
+
switch (ext) {
|
|
116
|
+
case '.json':
|
|
117
|
+
return 'json';
|
|
118
|
+
case '.yaml':
|
|
119
|
+
case '.yml':
|
|
120
|
+
return 'yaml';
|
|
121
|
+
case '.toml':
|
|
122
|
+
return 'toml';
|
|
123
|
+
default:
|
|
124
|
+
return 'json'; // default
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Parses config file based on type (JSON or YAML).
|
|
129
|
+
* For YAML, attempts to load js-yaml package if available.
|
|
130
|
+
*/
|
|
131
|
+
async function parseConfigFile(filePath, content) {
|
|
132
|
+
const fileType = detectConfigFileType(filePath);
|
|
133
|
+
if (fileType === 'yaml') {
|
|
134
|
+
try {
|
|
135
|
+
// Try to load js-yaml dynamically (optional dependency)
|
|
136
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
137
|
+
const yamlModule = await import('js-yaml').catch(() => null);
|
|
138
|
+
if (!yamlModule) {
|
|
139
|
+
throw new Error('YAML parsing requires js-yaml package.\n' +
|
|
140
|
+
'Install it with: npm install js-yaml');
|
|
141
|
+
}
|
|
142
|
+
return yamlModule.load(content);
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
throw new Error(`Failed to parse YAML file: ${error.message}`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
// Default to JSON parsing
|
|
149
|
+
return JSON.parse(content);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Sleep utility for exponential backoff.
|
|
153
|
+
*/
|
|
154
|
+
function sleep(ms) {
|
|
155
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Fetches remote config with retry logic and timeout.
|
|
159
|
+
* Implements exponential backoff: 1s, 2s, 4s.
|
|
160
|
+
*/
|
|
161
|
+
async function fetchWithRetry(url, retries = DEFAULT_RETRIES) {
|
|
162
|
+
for (let attempt = 0; attempt < retries; attempt++) {
|
|
163
|
+
try {
|
|
164
|
+
const controller = new AbortController();
|
|
165
|
+
const timeoutId = setTimeout(() => controller.abort(), TIMEOUT);
|
|
166
|
+
const response = await fetch(url, {
|
|
167
|
+
signal: controller.signal,
|
|
168
|
+
headers: {
|
|
169
|
+
'Accept': 'application/json',
|
|
170
|
+
'User-Agent': '@khanglvm/jira-mcp',
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
clearTimeout(timeoutId);
|
|
174
|
+
if (!response.ok) {
|
|
175
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
data: await response.text(),
|
|
179
|
+
etag: response.headers.get('ETag') || undefined,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
if (error.name === 'AbortError') {
|
|
184
|
+
throw new Error(`Request timeout after ${TIMEOUT}ms`);
|
|
185
|
+
}
|
|
186
|
+
if (attempt === retries - 1) {
|
|
187
|
+
throw error;
|
|
188
|
+
}
|
|
189
|
+
const backoffMs = 1000 * Math.pow(2, attempt);
|
|
190
|
+
console.warn(`Fetch attempt ${attempt + 1} failed, retrying in ${backoffMs}ms...`);
|
|
191
|
+
await sleep(backoffMs);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
throw new Error('All fetch attempts failed');
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Validates MCP config schema using Zod.
|
|
198
|
+
*/
|
|
199
|
+
function validateConfig(data) {
|
|
200
|
+
const result = mcpConfigSchema.safeParse(data);
|
|
201
|
+
if (!result.success) {
|
|
202
|
+
const errors = result.error.errors
|
|
203
|
+
.map(e => ` - ${e.path.join('.')}: ${e.message}`)
|
|
204
|
+
.join('\n');
|
|
205
|
+
throw new Error(`Invalid MCP config schema:\n${errors}`);
|
|
206
|
+
}
|
|
207
|
+
return result.data;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Main function to fetch MCP configuration.
|
|
211
|
+
* Cache hierarchy: memory -> remote -> file -> error
|
|
212
|
+
*/
|
|
213
|
+
export async function fetchMcpConfig(options) {
|
|
214
|
+
const forceRefresh = options?.forceRefresh ?? false;
|
|
215
|
+
const retries = options?.retries ?? DEFAULT_RETRIES;
|
|
216
|
+
// 1. Check memory cache first
|
|
217
|
+
if (!forceRefresh && memoryCache && Date.now() - memoryCache.fetchedAt < memoryCache.ttl) {
|
|
218
|
+
return memoryCache.data;
|
|
219
|
+
}
|
|
220
|
+
// Clear expired cache
|
|
221
|
+
if (memoryCache) {
|
|
222
|
+
memoryCache = null;
|
|
223
|
+
}
|
|
224
|
+
// 2. Try remote fetch
|
|
225
|
+
if (options?.timeout === 0) {
|
|
226
|
+
throw new Error('Remote fetch disabled by configuration');
|
|
227
|
+
}
|
|
228
|
+
try {
|
|
229
|
+
const { data, etag } = await fetchWithRetry(REMOTE_URL, retries);
|
|
230
|
+
const validated = validateConfig(JSON.parse(data));
|
|
231
|
+
// Update caches
|
|
232
|
+
memoryCache = { data: validated, etag, fetchedAt: Date.now(), ttl: CACHE_TTL };
|
|
233
|
+
persistToFile(validated, etag);
|
|
234
|
+
return validated;
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
console.warn(`Remote fetch failed: ${error.message}`);
|
|
238
|
+
// 3. Fallback to file cache
|
|
239
|
+
const fileData = readFromFile();
|
|
240
|
+
if (fileData) {
|
|
241
|
+
console.info('Using cached configuration from file');
|
|
242
|
+
memoryCache = { data: fileData, fetchedAt: Date.now(), ttl: CACHE_TTL };
|
|
243
|
+
return fileData;
|
|
244
|
+
}
|
|
245
|
+
throw new Error('Failed to fetch MCP configuration and no cached data available.\n' +
|
|
246
|
+
'Please check your internet connection and try again.');
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Clears all caches (memory and file).
|
|
251
|
+
* Useful for testing or forcing fresh fetch.
|
|
252
|
+
*/
|
|
253
|
+
export function clearCache() {
|
|
254
|
+
memoryCache = null;
|
|
255
|
+
try {
|
|
256
|
+
const filePath = getCacheFilePath();
|
|
257
|
+
if (fs.existsSync(filePath)) {
|
|
258
|
+
fs.unlinkSync(filePath);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
catch (error) {
|
|
262
|
+
console.warn(`Warning: Failed to clear cache file: ${error.message}`);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Gets current cache status.
|
|
267
|
+
* Useful for debugging and monitoring.
|
|
268
|
+
*/
|
|
269
|
+
export function getCacheStatus() {
|
|
270
|
+
const memory = memoryCache !== null;
|
|
271
|
+
const filePath = getCacheFilePath();
|
|
272
|
+
const file = fs.existsSync(filePath);
|
|
273
|
+
let age;
|
|
274
|
+
if (memoryCache) {
|
|
275
|
+
age = Date.now() - memoryCache.fetchedAt;
|
|
276
|
+
}
|
|
277
|
+
return { memory, file, age };
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=config-fetcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-fetcher.js","sourceRoot":"","sources":["../src/config-fetcher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,YAAY;AACZ,MAAM,UAAU,GAAG,uEAAuE,CAAC;AAC3F,MAAM,SAAS,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;AACxC,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,aAAa;AACpC,MAAM,eAAe,GAAG,CAAC,CAAC;AAE1B,wBAAwB;AACxB,IAAI,WAAW,GAAsB,IAAI,CAAC;AAE1C;;;GAGG;AACH,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,GA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AM,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAErC,IAAI,GAAuB,CAAC;IAC5B,IAAI,WAAW,EAAE,CAAC;QACd,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,WAAW,CAAC,SAAS,CAAC;IAC7C,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACjC,CAAC"}
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file config.ts
|
|
3
|
+
* @description Configuration module for Jira MCP server.
|
|
4
|
+
* Handles environment variable parsing and validation.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
/**
|
|
8
|
+
* Environment variable schema for Jira configuration.
|
|
9
|
+
* Validates required and optional configuration values.
|
|
10
|
+
*/
|
|
11
|
+
declare const configSchema: z.ZodObject<{
|
|
12
|
+
/** Base URL of the Jira instance (e.g., http://jira.example.com:8080) */
|
|
13
|
+
JIRA_BASE_URL: z.ZodString;
|
|
14
|
+
/** Username for basic authentication */
|
|
15
|
+
JIRA_USERNAME: z.ZodString;
|
|
16
|
+
/** Password for basic authentication */
|
|
17
|
+
JIRA_PASSWORD: z.ZodString;
|
|
18
|
+
/** API version (defaults to "2") */
|
|
19
|
+
JIRA_API_VERSION: z.ZodDefault<z.ZodString>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
JIRA_BASE_URL: string;
|
|
22
|
+
JIRA_USERNAME: string;
|
|
23
|
+
JIRA_PASSWORD: string;
|
|
24
|
+
JIRA_API_VERSION: string;
|
|
25
|
+
}, {
|
|
26
|
+
JIRA_BASE_URL: string;
|
|
27
|
+
JIRA_USERNAME: string;
|
|
28
|
+
JIRA_PASSWORD: string;
|
|
29
|
+
JIRA_API_VERSION?: string | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Validated configuration type inferred from schema.
|
|
33
|
+
*/
|
|
34
|
+
export type JiraConfig = z.infer<typeof configSchema>;
|
|
35
|
+
/**
|
|
36
|
+
* Loads and validates configuration from environment variables.
|
|
37
|
+
* @returns Validated configuration object
|
|
38
|
+
* @throws Error if required environment variables are missing or invalid
|
|
39
|
+
*/
|
|
40
|
+
export declare function loadConfig(): JiraConfig;
|
|
41
|
+
/**
|
|
42
|
+
* Constructs the full REST API base URL.
|
|
43
|
+
* @param config - Validated configuration
|
|
44
|
+
* @returns Full API base URL (e.g., http://jira.example.com:8080/rest/api/2)
|
|
45
|
+
*/
|
|
46
|
+
export declare function getApiBaseUrl(config: JiraConfig): string;
|
|
47
|
+
/**
|
|
48
|
+
* Constructs the auth API base URL for session endpoints.
|
|
49
|
+
* @param config - Validated configuration
|
|
50
|
+
* @returns Full auth API base URL (e.g., http://jira.example.com:8080/rest/auth/1)
|
|
51
|
+
*/
|
|
52
|
+
export declare function getAuthBaseUrl(config: JiraConfig): string;
|
|
53
|
+
export {};
|
|
54
|
+
//# 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,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,QAAA,MAAM,YAAY;IACd,yEAAyE;;IAEzE,wCAAwC;;IAExC,wCAAwC;;IAExC,oCAAoC;;;;;;;;;;;;EAEtC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,UAAU,CAwBvC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAIxD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAGzD"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file config.ts
|
|
3
|
+
* @description Configuration module for Jira MCP server.
|
|
4
|
+
* Handles environment variable parsing and validation.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
/**
|
|
8
|
+
* Environment variable schema for Jira configuration.
|
|
9
|
+
* Validates required and optional configuration values.
|
|
10
|
+
*/
|
|
11
|
+
const configSchema = z.object({
|
|
12
|
+
/** Base URL of the Jira instance (e.g., http://jira.example.com:8080) */
|
|
13
|
+
JIRA_BASE_URL: z.string().url('JIRA_BASE_URL must be a valid URL'),
|
|
14
|
+
/** Username for basic authentication */
|
|
15
|
+
JIRA_USERNAME: z.string().min(1, 'JIRA_USERNAME is required'),
|
|
16
|
+
/** Password for basic authentication */
|
|
17
|
+
JIRA_PASSWORD: z.string().min(1, 'JIRA_PASSWORD is required'),
|
|
18
|
+
/** API version (defaults to "2") */
|
|
19
|
+
JIRA_API_VERSION: z.string().default('2'),
|
|
20
|
+
});
|
|
21
|
+
/**
|
|
22
|
+
* Loads and validates configuration from environment variables.
|
|
23
|
+
* @returns Validated configuration object
|
|
24
|
+
* @throws Error if required environment variables are missing or invalid
|
|
25
|
+
*/
|
|
26
|
+
export function loadConfig() {
|
|
27
|
+
const result = configSchema.safeParse({
|
|
28
|
+
JIRA_BASE_URL: process.env.JIRA_BASE_URL,
|
|
29
|
+
JIRA_USERNAME: process.env.JIRA_USERNAME,
|
|
30
|
+
JIRA_PASSWORD: process.env.JIRA_PASSWORD,
|
|
31
|
+
JIRA_API_VERSION: process.env.JIRA_API_VERSION ?? '2',
|
|
32
|
+
});
|
|
33
|
+
if (!result.success) {
|
|
34
|
+
const errors = result.error.errors
|
|
35
|
+
.map((e) => ` - ${e.path.join('.')}: ${e.message}`)
|
|
36
|
+
.join('\n');
|
|
37
|
+
throw new Error(`Jira MCP configuration error:\n${errors}\n\n` +
|
|
38
|
+
'Required environment variables:\n' +
|
|
39
|
+
' JIRA_BASE_URL - Base URL of Jira instance\n' +
|
|
40
|
+
' JIRA_USERNAME - Username for authentication\n' +
|
|
41
|
+
' JIRA_PASSWORD - Password for authentication\n' +
|
|
42
|
+
'\nOptional:\n' +
|
|
43
|
+
' JIRA_API_VERSION - API version (default: "2")');
|
|
44
|
+
}
|
|
45
|
+
return result.data;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Constructs the full REST API base URL.
|
|
49
|
+
* @param config - Validated configuration
|
|
50
|
+
* @returns Full API base URL (e.g., http://jira.example.com:8080/rest/api/2)
|
|
51
|
+
*/
|
|
52
|
+
export function getApiBaseUrl(config) {
|
|
53
|
+
// Remove trailing slash if present
|
|
54
|
+
const baseUrl = config.JIRA_BASE_URL.replace(/\/$/, '');
|
|
55
|
+
return `${baseUrl}/rest/api/${config.JIRA_API_VERSION}`;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Constructs the auth API base URL for session endpoints.
|
|
59
|
+
* @param config - Validated configuration
|
|
60
|
+
* @returns Full auth API base URL (e.g., http://jira.example.com:8080/rest/auth/1)
|
|
61
|
+
*/
|
|
62
|
+
export function getAuthBaseUrl(config) {
|
|
63
|
+
const baseUrl = config.JIRA_BASE_URL.replace(/\/$/, '');
|
|
64
|
+
return `${baseUrl}/rest/auth/1`;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1B,yEAAyE;IACzE,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,mCAAmC,CAAC;IAClE,wCAAwC;IACxC,aAAa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C,CAAC;IACxD,OAAO,GAAG,OAAO,aAAa,MAAM,CAAC,gBAAgB,EAAE,CAAC;AAC5D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,MAAkB;IAC7C,MAAM,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACxD,OAAO,GAAG,OAAO,cAAc,CAAC;AACpC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @file index.ts
|
|
4
|
+
* @description Main entry point for the Jira MCP server.
|
|
5
|
+
* Supports two modes:
|
|
6
|
+
* 1. MCP Server mode (default) - Runs as stdio MCP server for AI tools
|
|
7
|
+
* 2. Setup mode - Injects MCP configuration into AI tool config files
|
|
8
|
+
*/
|
|
9
|
+
export * from './types/mcp-config.js';
|
|
10
|
+
export { createRegistry, createRegistryFromConfig, McpRegistry } from './mcp-registry.js';
|
|
11
|
+
export { fetchMcpConfig, clearCache, getCacheStatus } from './config-fetcher.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAYH,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
|