@crypto512/jicon-mcp 2.1.0 → 2.2.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/README.md +288 -15
  2. package/TOOL_LIST.md +390 -87
  3. package/dist/config/constants.d.ts +12 -0
  4. package/dist/config/constants.d.ts.map +1 -1
  5. package/dist/config/constants.js +13 -0
  6. package/dist/config/constants.js.map +1 -1
  7. package/dist/config/loader.d.ts +8 -0
  8. package/dist/config/loader.d.ts.map +1 -1
  9. package/dist/config/loader.js +27 -1
  10. package/dist/config/loader.js.map +1 -1
  11. package/dist/config/types.d.ts +93 -0
  12. package/dist/config/types.d.ts.map +1 -1
  13. package/dist/config/types.js +26 -0
  14. package/dist/config/types.js.map +1 -1
  15. package/dist/confluence/tools.d.ts +8 -1
  16. package/dist/confluence/tools.d.ts.map +1 -1
  17. package/dist/confluence/tools.js +61 -51
  18. package/dist/confluence/tools.js.map +1 -1
  19. package/dist/credentials/client-factory.d.ts +64 -0
  20. package/dist/credentials/client-factory.d.ts.map +1 -0
  21. package/dist/credentials/client-factory.js +110 -0
  22. package/dist/credentials/client-factory.js.map +1 -0
  23. package/dist/credentials/context.d.ts +25 -0
  24. package/dist/credentials/context.d.ts.map +1 -0
  25. package/dist/credentials/context.js +35 -0
  26. package/dist/credentials/context.js.map +1 -0
  27. package/dist/credentials/extractor.d.ts +21 -0
  28. package/dist/credentials/extractor.d.ts.map +1 -0
  29. package/dist/credentials/extractor.js +46 -0
  30. package/dist/credentials/extractor.js.map +1 -0
  31. package/dist/credentials/index.d.ts +9 -0
  32. package/dist/credentials/index.d.ts.map +1 -0
  33. package/dist/credentials/index.js +8 -0
  34. package/dist/credentials/index.js.map +1 -0
  35. package/dist/credentials/types.d.ts +21 -0
  36. package/dist/credentials/types.d.ts.map +1 -0
  37. package/dist/credentials/types.js +13 -0
  38. package/dist/credentials/types.js.map +1 -0
  39. package/dist/index.js +98 -75
  40. package/dist/index.js.map +1 -1
  41. package/dist/jira/activity-tools.d.ts +54 -1
  42. package/dist/jira/activity-tools.d.ts.map +1 -1
  43. package/dist/jira/activity-tools.js +737 -79
  44. package/dist/jira/activity-tools.js.map +1 -1
  45. package/dist/jira/client.d.ts +34 -2
  46. package/dist/jira/client.d.ts.map +1 -1
  47. package/dist/jira/client.js +119 -63
  48. package/dist/jira/client.js.map +1 -1
  49. package/dist/jira/tools.d.ts +58 -1
  50. package/dist/jira/tools.d.ts.map +1 -1
  51. package/dist/jira/tools.js +226 -27
  52. package/dist/jira/tools.js.map +1 -1
  53. package/dist/jira/types.d.ts +22 -0
  54. package/dist/jira/types.d.ts.map +1 -1
  55. package/dist/permissions/tool-registry.d.ts +10 -10
  56. package/dist/permissions/tool-registry.d.ts.map +1 -1
  57. package/dist/permissions/tool-registry.js +8 -4
  58. package/dist/permissions/tool-registry.js.map +1 -1
  59. package/dist/tempo/tools.d.ts +33 -1
  60. package/dist/tempo/tools.d.ts.map +1 -1
  61. package/dist/tempo/tools.js +141 -17
  62. package/dist/tempo/tools.js.map +1 -1
  63. package/dist/transport/http.d.ts +18 -0
  64. package/dist/transport/http.d.ts.map +1 -0
  65. package/dist/transport/http.js +66 -0
  66. package/dist/transport/http.js.map +1 -0
  67. package/dist/transport/index.d.ts +17 -0
  68. package/dist/transport/index.d.ts.map +1 -0
  69. package/dist/transport/index.js +32 -0
  70. package/dist/transport/index.js.map +1 -0
  71. package/dist/transport/types.d.ts +15 -0
  72. package/dist/transport/types.d.ts.map +1 -0
  73. package/dist/transport/types.js +12 -0
  74. package/dist/transport/types.js.map +1 -0
  75. package/dist/types.d.ts +10 -0
  76. package/dist/types.d.ts.map +1 -1
  77. package/dist/types.js +0 -1
  78. package/dist/types.js.map +1 -1
  79. package/dist/utils/buffer-pipeline/index.js +2 -2
  80. package/dist/utils/buffer-pipeline/index.js.map +1 -1
  81. package/dist/utils/buffer-pipeline/schema.d.ts +99 -99
  82. package/dist/utils/buffer-pipeline/schema.d.ts.map +1 -1
  83. package/dist/utils/buffer-tools.d.ts +91 -83
  84. package/dist/utils/buffer-tools.d.ts.map +1 -1
  85. package/dist/utils/buffer-tools.js +312 -139
  86. package/dist/utils/buffer-tools.js.map +1 -1
  87. package/dist/utils/jicon-help.d.ts +3 -3
  88. package/dist/utils/jicon-help.d.ts.map +1 -1
  89. package/dist/utils/jicon-help.js +141 -10
  90. package/dist/utils/jicon-help.js.map +1 -1
  91. package/dist/utils/json-structure.d.ts +11 -0
  92. package/dist/utils/json-structure.d.ts.map +1 -1
  93. package/dist/utils/json-structure.js +61 -0
  94. package/dist/utils/json-structure.js.map +1 -1
  95. package/dist/utils/plantuml/tools.d.ts +4 -4
  96. package/dist/utils/plantuml/tools.d.ts.map +1 -1
  97. package/dist/utils/plantuml/tools.js +29 -8
  98. package/dist/utils/plantuml/tools.js.map +1 -1
  99. package/dist/utils/plantuml/types.d.ts +4 -4
  100. package/dist/utils/response-formatter.d.ts.map +1 -1
  101. package/dist/utils/response-formatter.js +8 -4
  102. package/dist/utils/response-formatter.js.map +1 -1
  103. package/package.json +5 -2
package/README.md CHANGED
@@ -34,7 +34,7 @@ Once configured, just ask in natural language:
34
34
  - *"What happened on project ACME this week?"* (Activity digest)
35
35
  - *"Create a task for implementing user authentication"*
36
36
  - *"Move PROJ-123 to Done and add a comment that it's deployed"*
37
- - *"Show me the current sprint's progress"*
37
+ - *"Analyze the current sprint - any risks or blockers?"* (Sprint analysis)
38
38
  - *"Summarize recent discussions about authentication"* (Comment analysis)
39
39
  - *"Link PROJ-456 as blocking PROJ-789"*
40
40
 
@@ -140,6 +140,10 @@ All configuration is done through environment variables.
140
140
  | `JICON_CONFLUENCE_WRITE_HOME` | `true`\|`false` | `false` | Restrict Confluence writes to personal space |
141
141
  | `JICON_PLANTUML_SERVER_URL` | string | - | PlantUML server URL (e.g., `http://localhost:8080`) |
142
142
  | `JICON_MAX_OUTPUT` | number | `16000` | Maximum output characters |
143
+ | `JICON_TRANSPORT` | `stdio`\|`http` | `stdio` | Transport mode (use `http` for containers) |
144
+ | `JICON_HTTP_PORT` | number | `3000` | HTTP server port |
145
+ | `JICON_HTTP_HOST` | string | `0.0.0.0` | HTTP bind address |
146
+ | `JICON_HTTP_BASE_PATH` | string | `/mcp` | MCP endpoint path |
143
147
 
144
148
  **Note:** Tempo uses the same Jira credentials - no separate configuration needed.
145
149
 
@@ -224,20 +228,6 @@ PlantUML validation requires an external PlantUML server. If not configured, Pla
224
228
 
225
229
  You can use the public PlantUML server (`http://www.plantuml.com/plantuml`) or run your own with Docker: `docker run -d -p 8080:8080 plantuml/plantuml-server:jetty`.
226
230
 
227
- ### PlantUML Include Expansion
228
-
229
- C4-PlantUML, AWS icons, and Azure diagrams require `!include` directives. By default, Jicon expands these includes client-side before validation and sending to Confluence.
230
-
231
- **Whitelisted URLs:**
232
- - `https://raw.githubusercontent.com/plantuml-stdlib/` - C4, Azure, Kubernetes, etc.
233
- - `https://raw.githubusercontent.com/plantuml/` - Official PlantUML stdlib
234
- - `https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/` - AWS icons
235
-
236
- **Disable include expansion** (if you encounter issues):
237
- ```json
238
- { "plantumlInclude": false }
239
- ```
240
-
241
231
  ## Authentication
242
232
 
243
233
  ### Atlassian Cloud
@@ -261,6 +251,289 @@ C4-PlantUML, AWS icons, and Azure diagrams require `!include` directives. By def
261
251
  - **Tempo** (optional) Timesheets plugin
262
252
  - **PlantUML Server** (optional) External server for diagram validation
263
253
 
254
+ ## Docker Deployment
255
+
256
+ Jicon supports two transport modes:
257
+
258
+ | Mode | Use Case | Protocol |
259
+ |------|----------|----------|
260
+ | **stdio** (default) | Local usage with `npx`, Claude Desktop, Claude Code | Standard I/O |
261
+ | **http** | Containers, Kubernetes, remote servers | HTTP with StreamableHTTP |
262
+
263
+ For containerized deployments, use HTTP mode which exposes the MCP protocol over HTTP.
264
+
265
+ ### Running with Docker
266
+
267
+ **1. Build the image:**
268
+
269
+ ```bash
270
+ docker build -t jicon-mcp .
271
+ ```
272
+
273
+ **2. Run the container:**
274
+
275
+ ```bash
276
+ docker run -d -p 3000:3000 \
277
+ -e JIRA_URL=https://jira.example.com \
278
+ -e JIRA_API_TOKEN=your-api-token \
279
+ -e CONFLUENCE_URL=https://confluence.example.com \
280
+ -e CONFLUENCE_API_TOKEN=your-api-token \
281
+ --name jicon-mcp \
282
+ jicon-mcp
283
+ ```
284
+
285
+ The container automatically uses HTTP transport (`JICON_TRANSPORT=http`).
286
+
287
+ **3. Verify it's running:**
288
+
289
+ ```bash
290
+ curl http://localhost:3000/health
291
+ # Returns: {"status":"ok"}
292
+ ```
293
+
294
+ ### Running with Docker Compose
295
+
296
+ **1. Create a `.env` file with your credentials:**
297
+
298
+ ```bash
299
+ cat > .env << 'EOF'
300
+ JIRA_URL=https://jira.example.com
301
+ JIRA_API_TOKEN=your-api-token
302
+ CONFLUENCE_URL=https://confluence.example.com
303
+ CONFLUENCE_API_TOKEN=your-api-token
304
+ EOF
305
+ ```
306
+
307
+ **2. Start the service:**
308
+
309
+ ```bash
310
+ docker-compose up -d
311
+ ```
312
+
313
+ **3. View logs:**
314
+
315
+ ```bash
316
+ docker-compose logs -f
317
+ ```
318
+
319
+ ### HTTP Transport Configuration
320
+
321
+ | Variable | Default | Description |
322
+ |----------|---------|-------------|
323
+ | `JICON_TRANSPORT` | `stdio` | Transport mode: `stdio` or `http` |
324
+ | `JICON_HTTP_PORT` | `3000` | HTTP server port |
325
+ | `JICON_HTTP_HOST` | `0.0.0.0` | HTTP bind address |
326
+ | `JICON_HTTP_BASE_PATH` | `/mcp` | MCP endpoint path |
327
+
328
+ ### HTTP Endpoints
329
+
330
+ | Endpoint | Method | Description |
331
+ |----------|--------|-------------|
332
+ | `/health` | GET | Health check - returns `{"status":"ok"}` |
333
+ | `/ready` | GET | Readiness check - returns `{"status":"ready"}` |
334
+ | `/mcp` | ALL | MCP protocol endpoint (StreamableHTTP) |
335
+
336
+ ### Connecting MCP Clients
337
+
338
+ Once the HTTP server is running, connect your MCP client to `http://localhost:3000/mcp`:
339
+
340
+ ```bash
341
+ # Using MCP Inspector
342
+ npx @modelcontextprotocol/inspector --url http://localhost:3000/mcp
343
+ ```
344
+
345
+ ### Running HTTP Mode Locally (without Docker)
346
+
347
+ For development or testing, you can run HTTP mode directly:
348
+
349
+ ```bash
350
+ # Using npm script
351
+ npm run start:http
352
+
353
+ # Or with environment variables
354
+ JICON_TRANSPORT=http \
355
+ JIRA_URL=https://jira.example.com \
356
+ JIRA_API_TOKEN=your-token \
357
+ npm start
358
+ ```
359
+
360
+ ### Kubernetes Deployment
361
+
362
+ ```yaml
363
+ apiVersion: v1
364
+ kind: Secret
365
+ metadata:
366
+ name: jicon-secrets
367
+ type: Opaque
368
+ stringData:
369
+ jira-url: "https://jira.example.com"
370
+ jira-token: "your-api-token"
371
+ ---
372
+ apiVersion: apps/v1
373
+ kind: Deployment
374
+ metadata:
375
+ name: jicon-mcp
376
+ spec:
377
+ replicas: 1
378
+ selector:
379
+ matchLabels:
380
+ app: jicon-mcp
381
+ template:
382
+ metadata:
383
+ labels:
384
+ app: jicon-mcp
385
+ spec:
386
+ containers:
387
+ - name: jicon-mcp
388
+ image: jicon-mcp:latest
389
+ ports:
390
+ - containerPort: 3000
391
+ env:
392
+ - name: JICON_TRANSPORT
393
+ value: "http"
394
+ - name: JIRA_URL
395
+ valueFrom:
396
+ secretKeyRef:
397
+ name: jicon-secrets
398
+ key: jira-url
399
+ - name: JIRA_API_TOKEN
400
+ valueFrom:
401
+ secretKeyRef:
402
+ name: jicon-secrets
403
+ key: jira-token
404
+ livenessProbe:
405
+ httpGet:
406
+ path: /health
407
+ port: 3000
408
+ initialDelaySeconds: 5
409
+ periodSeconds: 30
410
+ readinessProbe:
411
+ httpGet:
412
+ path: /ready
413
+ port: 3000
414
+ initialDelaySeconds: 5
415
+ periodSeconds: 10
416
+ resources:
417
+ requests:
418
+ memory: "128Mi"
419
+ cpu: "100m"
420
+ limits:
421
+ memory: "256Mi"
422
+ cpu: "500m"
423
+ ---
424
+ apiVersion: v1
425
+ kind: Service
426
+ metadata:
427
+ name: jicon-mcp
428
+ spec:
429
+ selector:
430
+ app: jicon-mcp
431
+ ports:
432
+ - port: 3000
433
+ targetPort: 3000
434
+ ```
435
+
436
+ ### LibreChat Integration
437
+
438
+ [LibreChat](https://www.librechat.ai/) supports MCP servers via the `streamable-http` transport type. This allows LibreChat to connect to jicon running in a container.
439
+
440
+ **Basic configuration in `librechat.yaml`:**
441
+
442
+ ```yaml
443
+ mcpServers:
444
+ jicon:
445
+ type: streamable-http
446
+ url: http://jicon-mcp:3000/mcp
447
+ timeout: 60000
448
+ initTimeout: 10000
449
+ serverInstructions: |
450
+ Jicon MCP server provides access to Jira, Confluence, and Tempo.
451
+ Use jicon_help tool to learn about available workflows.
452
+ ```
453
+
454
+ **With environment variables for credentials:**
455
+
456
+ Jicon reads credentials from its own environment variables. When running with Docker Compose, pass them to the jicon container:
457
+
458
+ ```yaml
459
+ # docker-compose.yml
460
+ version: "3.8"
461
+
462
+ services:
463
+ jicon-mcp:
464
+ build: .
465
+ environment:
466
+ - JICON_TRANSPORT=http
467
+ - JIRA_URL=${JIRA_URL}
468
+ - JIRA_API_TOKEN=${JIRA_API_TOKEN}
469
+ - CONFLUENCE_URL=${CONFLUENCE_URL}
470
+ - CONFLUENCE_API_TOKEN=${CONFLUENCE_API_TOKEN}
471
+ - JICON_PERMISSIONS_MODE=${JICON_PERMISSIONS_MODE:-readonly}
472
+
473
+ librechat:
474
+ image: ghcr.io/danny-avila/librechat:latest
475
+ depends_on:
476
+ - jicon-mcp
477
+ volumes:
478
+ - ./librechat.yaml:/app/librechat.yaml
479
+ # ... other LibreChat configuration
480
+ ```
481
+
482
+ **Per-user credentials with `customUserVars`:**
483
+
484
+ Each LibreChat user can use their own Jira/Confluence credentials via HTTP headers. Configure `customUserVars` in LibreChat to prompt users for their credentials:
485
+
486
+ ```yaml
487
+ # librechat.yaml
488
+ mcpServers:
489
+ jicon:
490
+ type: streamable-http
491
+ url: http://jicon-mcp:3000/mcp
492
+ timeout: 60000
493
+ initTimeout: 10000
494
+ headers:
495
+ X-Jira-Url: "{{JIRA_URL}}"
496
+ X-Jira-Token: "{{JIRA_TOKEN}}"
497
+ X-Confluence-Url: "{{CONFLUENCE_URL}}"
498
+ X-Confluence-Token: "{{CONFLUENCE_TOKEN}}"
499
+ customUserVars:
500
+ JIRA_URL:
501
+ title: "Jira URL"
502
+ description: "Your Jira instance URL (e.g., https://jira.example.com)"
503
+ JIRA_TOKEN:
504
+ title: "Jira Token"
505
+ description: "Your Jira Personal Access Token"
506
+ CONFLUENCE_URL:
507
+ title: "Confluence URL"
508
+ description: "Your Confluence instance URL"
509
+ CONFLUENCE_TOKEN:
510
+ title: "Confluence Token"
511
+ description: "Your Confluence Personal Access Token"
512
+ serverInstructions: |
513
+ Jicon MCP server provides access to Jira, Confluence, and Tempo.
514
+ Use jicon_help tool to learn about available workflows.
515
+ ```
516
+
517
+ **Per-user credential headers:**
518
+
519
+ | Header | Description |
520
+ |--------|-------------|
521
+ | `X-Jira-Url` | Jira instance URL |
522
+ | `X-Jira-Token` | Jira API token (PAT) |
523
+ | `X-Confluence-Url` | Confluence instance URL |
524
+ | `X-Confluence-Token` | Confluence API token (PAT) |
525
+
526
+ Both URL and Token headers must be provided together for each service. Per-request credentials take priority over environment variables.
527
+
528
+ **Timeout recommendations:**
529
+
530
+ | Setting | Value | Description |
531
+ |---------|-------|-------------|
532
+ | `timeout` | `60000` | Request timeout (60s) - allows for large searches |
533
+ | `initTimeout` | `10000` | Initialization timeout (10s) - jicon starts quickly |
534
+
535
+ For more details, see [LibreChat MCP documentation](https://www.librechat.ai/docs/features/mcp).
536
+
264
537
  ## API Limitations
265
538
 
266
539
  ### Confluence Draft Limitations (Data Center REST API)