@crypto512/jicon-mcp 0.7.0 → 0.7.1

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/CLAUDE.md DELETED
@@ -1,947 +0,0 @@
1
- # Jira, Confluence, and Tempo MCP Server
2
-
3
- ## Overview
4
-
5
- A Model Context Protocol (MCP) server that provides seamless integration with Atlassian Jira, Confluence, and Tempo Server/Data Center instances. This server enables AI assistants to interact with Jira issues, projects, boards, Confluence pages, spaces, content, and Tempo time tracking through a comprehensive set of tools.
6
-
7
- ## Features
8
-
9
- ### Jira Integration
10
- - **Issue Management**: Search, create, update, and transition issues
11
- - **Project Operations**: List projects, components, and versions
12
- - **Agile Support**: Access boards, sprints, and backlogs
13
- - **Comments & Collaboration**: Add and retrieve comments on issues
14
- - **Issue Linking**: Create and manage relationships between issues
15
- - **Advanced Search**: Execute JQL queries for complex issue searches
16
- - **Recursive Worklogs**: Sum worklogs for an issue and all its children (sub-tasks, Epic children)
17
-
18
- ### Confluence Integration
19
- - **Content Management**: Create, read, update Confluence pages
20
- - **Search Capabilities**: Execute CQL queries to find content
21
- - **Space Operations**: List and manage Confluence spaces
22
- - **Page Hierarchy**: Navigate parent-child page relationships
23
- - **Attachments**: Upload and retrieve file attachments
24
- - **Comments**: Add and view page comments
25
-
26
- ### Tempo Integration
27
- - **Time Tracking**: Log, view, and manage work time
28
- - **Worklog Management**: Create, update, and delete worklogs
29
- - **Team Tracking**: Access team worklogs and time tracking data
30
- - **Epic Worklogs**: Get all worklogs for an Epic and its children in one call
31
- - **Account Management**: View and manage Tempo accounts
32
- - **User Info**: Retrieve user time tracking information
33
- - **v4 API**: Uses Tempo v4 API with automatic key-to-ID conversion
34
-
35
- ## Installation
36
-
37
- ```bash
38
- # Install globally
39
- npm install -g @crypto512/jicon-mcp
40
-
41
- # Or run directly with npx
42
- npx @crypto512/jicon-mcp
43
- ```
44
-
45
- ## Configuration
46
-
47
- The server supports multiple authentication methods depending on your Atlassian instance type.
48
-
49
- ### Jira/Confluence Cloud (Basic Auth)
50
-
51
- For Cloud instances, use email + API token with Basic authentication:
52
-
53
- ```bash
54
- # Jira Configuration
55
- JIRA_URL=https://your-domain.atlassian.net
56
- JIRA_USERNAME=your-email@example.com
57
- JIRA_API_TOKEN=your-jira-api-token
58
-
59
- # Confluence Configuration
60
- CONFLUENCE_URL=https://your-domain.atlassian.net/wiki
61
- CONFLUENCE_USERNAME=your-email@example.com
62
- CONFLUENCE_API_TOKEN=your-confluence-api-token
63
- ```
64
-
65
- ### Jira/Confluence Data Center 8.14+ (Bearer Auth with PAT)
66
-
67
- For Data Center instances version 8.14 and later (including 9.x), use Personal Access Tokens (PAT) with Bearer authentication. Simply omit the `USERNAME` variable or set `AUTH_TYPE=bearer`:
68
-
69
- ```bash
70
- # Jira Configuration (PAT - recommended for Data Center)
71
- JIRA_URL=https://jira.example.com
72
- JIRA_API_TOKEN=your-personal-access-token
73
- JIRA_AUTH_TYPE=bearer
74
-
75
- # Confluence Configuration (PAT - recommended for Data Center)
76
- CONFLUENCE_URL=https://confluence.example.com
77
- CONFLUENCE_API_TOKEN=your-personal-access-token
78
- CONFLUENCE_AUTH_TYPE=bearer
79
- ```
80
-
81
- **Note**: To generate a Personal Access Token in Jira/Confluence Data Center:
82
- 1. Click your avatar → Profile
83
- 2. Select "Personal access tokens" in the left menu
84
- 3. Create a new token with appropriate permissions
85
-
86
- ### Tempo Configuration
87
-
88
- Tempo uses the same authentication as Jira (same URL and credentials). This server uses **Tempo v4 API**, which requires issueId and projectId (integers) instead of string keys. The server automatically converts user-friendly keys (e.g., "PROJ-123") to the numeric IDs required by the v4 API.
89
-
90
- **Requirements:**
91
- - Tempo 3.x or later (which provides v4 API)
92
- - Same Jira credentials for authentication
93
-
94
- ### Claude Desktop Configuration
95
-
96
- #### For Jira/Confluence Cloud:
97
-
98
- **MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
99
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
100
-
101
- ```json
102
- {
103
- "mcpServers": {
104
- "jicon": {
105
- "command": "npx",
106
- "args": ["-y", "@crypto512/jicon-mcp"],
107
- "env": {
108
- "JIRA_URL": "https://your-domain.atlassian.net",
109
- "JIRA_USERNAME": "your-email@example.com",
110
- "JIRA_API_TOKEN": "your-jira-api-token",
111
- "CONFLUENCE_URL": "https://your-domain.atlassian.net/wiki",
112
- "CONFLUENCE_USERNAME": "your-email@example.com",
113
- "CONFLUENCE_API_TOKEN": "your-confluence-api-token"
114
- }
115
- }
116
- }
117
- }
118
- ```
119
-
120
- #### For Jira/Confluence Data Center 8.14+ with PAT:
121
-
122
- ```json
123
- {
124
- "mcpServers": {
125
- "jicon": {
126
- "command": "npx",
127
- "args": ["-y", "@crypto512/jicon-mcp"],
128
- "env": {
129
- "JIRA_URL": "https://jira.example.com",
130
- "JIRA_API_TOKEN": "your-personal-access-token",
131
- "JIRA_AUTH_TYPE": "bearer",
132
- "CONFLUENCE_URL": "https://confluence.example.com",
133
- "CONFLUENCE_API_TOKEN": "your-personal-access-token",
134
- "CONFLUENCE_AUTH_TYPE": "bearer"
135
- }
136
- }
137
- }
138
- }
139
- ```
140
-
141
- ## Tools
142
-
143
- ### Jira Tools
144
-
145
- #### `jira_jql_help`
146
- Get JQL (Jira Query Language) syntax guide and examples on-demand.
147
-
148
- Returns a comprehensive JQL reference including operators, common examples, and tips. Use this when you need help constructing JQL queries.
149
-
150
- **Parameters:** None
151
-
152
- #### `jira_search_issues`
153
- Search for Jira issues using JQL (Jira Query Language).
154
-
155
- Automatically fetches ALL matching results (up to 5000) with buffering. Large responses are automatically buffered - use buffer_get_chunk or buffer_grep to access.
156
-
157
- **Parameters:**
158
- - `jql` (string, required): JQL query string
159
- - `fields` (string[], optional): Specific fields to return
160
-
161
- **Example:**
162
- ```typescript
163
- {
164
- "jql": "project = PROJ AND status = 'In Progress'",
165
- "fields": ["summary", "status", "assignee"]
166
- }
167
- ```
168
-
169
- #### `jira_get_issue`
170
- Get detailed information about a specific Jira issue.
171
-
172
- **Parameters:**
173
- - `issueKey` (string, required): Issue key (e.g., "PROJ-123")
174
- - `fields` (string[], optional): Specific fields to return
175
- - `expand` (string[], optional): Additional data to expand (e.g., "changelog", "renderedFields")
176
-
177
- **Example:**
178
- ```typescript
179
- {
180
- "issueKey": "PROJ-123",
181
- "expand": ["changelog"]
182
- }
183
- ```
184
-
185
- #### `jira_create_issue`
186
- Create a new Jira issue.
187
-
188
- **Parameters:**
189
- - `projectKey` (string, required): Project key
190
- - `issueType` (string, required): Issue type (e.g., "Bug", "Story", "Task")
191
- - `summary` (string, required): Issue summary
192
- - `description` (string, optional): Issue description
193
- - `priority` (string, optional): Priority name
194
- - `assignee` (string, optional): Assignee username
195
- - `labels` (string[], optional): Array of labels
196
- - `components` (string[], optional): Array of component names
197
- - `customFields` (object, optional): Custom field values
198
-
199
- **Example:**
200
- ```typescript
201
- {
202
- "projectKey": "PROJ",
203
- "issueType": "Bug",
204
- "summary": "Login button not responding",
205
- "description": "When clicking the login button, nothing happens",
206
- "priority": "High",
207
- "labels": ["ui", "authentication"]
208
- }
209
- ```
210
-
211
- #### `jira_update_issue`
212
- Update an existing Jira issue.
213
-
214
- **Parameters:**
215
- - `issueKey` (string, required): Issue key
216
- - `fields` (object, required): Fields to update
217
- - `notifyUsers` (boolean, optional): Send notifications (default: true)
218
-
219
- **Example:**
220
- ```typescript
221
- {
222
- "issueKey": "PROJ-123",
223
- "fields": {
224
- "summary": "Updated summary",
225
- "priority": { "name": "Critical" }
226
- }
227
- }
228
- ```
229
-
230
- #### `jira_transition_issue`
231
- Transition an issue to a different status.
232
-
233
- **Parameters:**
234
- - `issueKey` (string, required): Issue key
235
- - `transitionName` (string, required): Transition name (e.g., "In Progress", "Done")
236
- - `comment` (string, optional): Comment to add with transition
237
- - `fields` (object, optional): Fields to update during transition
238
-
239
- **Example:**
240
- ```typescript
241
- {
242
- "issueKey": "PROJ-123",
243
- "transitionName": "Done",
244
- "comment": "Completed and tested"
245
- }
246
- ```
247
-
248
- #### `jira_add_comment`
249
- Add a comment to a Jira issue.
250
-
251
- **Parameters:**
252
- - `issueKey` (string, required): Issue key
253
- - `comment` (string, required): Comment text (supports Jira markdown)
254
- - `visibility` (object, optional): Visibility restrictions
255
-
256
- **Example:**
257
- ```typescript
258
- {
259
- "issueKey": "PROJ-123",
260
- "comment": "This has been fixed in the latest build"
261
- }
262
- ```
263
-
264
- #### `jira_get_issue_comments`
265
- Retrieve all comments from a Jira issue.
266
-
267
- Returns all comments for the issue. If the response is large, it will be automatically buffered.
268
-
269
- **Parameters:**
270
- - `issueKey` (string, required): Issue key
271
- - `orderBy` (string, optional): Sort order ("created" or "-created")
272
-
273
- #### `jira_get_issue_worklogs`
274
- Retrieve all worklogs from a Jira issue.
275
-
276
- Use this tool to analyze time logged against a specific issue. Returns worklog entries with author, date, time spent, and a total time summary.
277
-
278
- Example: Get worklogs for PROJ-123 to see how much time was logged.
279
-
280
- Large responses are automatically buffered - use buffer_get_chunk or buffer_grep to access.
281
-
282
- **Parameters:**
283
- - `issueKey` (string, required): Issue key (e.g., "PROJ-123")
284
-
285
- **Example:**
286
- ```typescript
287
- {
288
- "issueKey": "PROJ-123"
289
- }
290
- ```
291
-
292
- #### `jira_get_total_worklogs`
293
- Get total worklogs for an issue and all its children recursively.
294
-
295
- Calculates the sum of all time logged on:
296
- - The specified issue
297
- - All sub-tasks
298
- - All issues in the Epic (if the issue is an Epic)
299
-
300
- Returns a breakdown by issue and a grand total. Automatically detects the Epic Link field in your Jira instance.
301
-
302
- **Parameters:**
303
- - `issueKey` (string, required): Issue key (e.g., "PROJ-123")
304
-
305
- **Example:**
306
- ```typescript
307
- {
308
- "issueKey": "PROJ-100"
309
- }
310
- ```
311
-
312
- **Response:**
313
- ```json
314
- {
315
- "rootIssue": "PROJ-100",
316
- "totalTimeSpentSeconds": 86400,
317
- "totalTimeSpent": "24h",
318
- "totalWorklogCount": 15,
319
- "issueCount": 5,
320
- "breakdown": [
321
- {
322
- "issueKey": "PROJ-100",
323
- "summary": "Epic: Implement feature X",
324
- "issueType": "Epic",
325
- "timeSpentSeconds": 3600,
326
- "timeSpent": "1h",
327
- "worklogCount": 2
328
- }
329
- ]
330
- }
331
- ```
332
-
333
- #### `jira_list_projects`
334
- List all accessible Jira projects.
335
-
336
- **Parameters:**
337
- - `recent` (boolean, optional): Only return recent projects
338
- - `expand` (string[], optional): Additional data to expand
339
-
340
- #### `jira_get_project`
341
- Get detailed information about a specific project.
342
-
343
- **Parameters:**
344
- - `projectKey` (string, required): Project key
345
- - `expand` (string[], optional): Additional data to expand
346
-
347
- #### `jira_get_transitions`
348
- Get available transitions for an issue.
349
-
350
- **Parameters:**
351
- - `issueKey` (string, required): Issue key
352
-
353
- #### `jira_link_issues`
354
- Create a link between two issues.
355
-
356
- **Parameters:**
357
- - `issueKey` (string, required): Source issue key
358
- - `linkedIssueKey` (string, required): Target issue key
359
- - `linkType` (string, required): Link type (e.g., "Blocks", "Relates to")
360
- - `comment` (string, optional): Comment for the link
361
-
362
- **Example:**
363
- ```typescript
364
- {
365
- "issueKey": "PROJ-123",
366
- "linkedIssueKey": "PROJ-456",
367
- "linkType": "Blocks"
368
- }
369
- ```
370
-
371
- #### `jira_get_board`
372
- Get information about an Agile board.
373
-
374
- **Parameters:**
375
- - `boardId` (number, required): Board ID
376
-
377
- #### `jira_get_sprints`
378
- List all sprints for a board.
379
-
380
- Returns all sprints for the board. If the response is large, it will be automatically buffered.
381
-
382
- **Parameters:**
383
- - `boardId` (number, required): Board ID
384
- - `state` (string, optional): Sprint state filter ("active", "future", "closed")
385
-
386
- #### `jira_get_sprint_issues`
387
- Get all issues in a specific sprint.
388
-
389
- Returns all issues for the sprint. If the response is large, it will be automatically buffered.
390
-
391
- **Parameters:**
392
- - `sprintId` (number, required): Sprint ID
393
-
394
- ### Confluence Tools
395
-
396
- #### `confluence_cql_help`
397
- Get CQL (Confluence Query Language) syntax guide and examples on-demand.
398
-
399
- Returns a comprehensive CQL reference including operators, common examples, critical warnings about invalid syntax (like not using `content~` or `body~`), and tips. Use this when you need help constructing CQL queries.
400
-
401
- **Parameters:** None
402
-
403
- #### `confluence_search_content`
404
- Search Confluence content using CQL (Confluence Query Language).
405
-
406
- **Parameters:**
407
- - `cql` (string, required): CQL query string
408
- - `limit` (number, optional): Maximum results per page (default: 25). When fetchAll=true, max total results (default: 5000)
409
- - `expand` (string[], optional): Additional data to expand
410
- - `start` (number, optional): Index of first result (0-based). Ignored when fetchAll=true
411
- - `fetchAll` (boolean, optional): Automatically fetch all results across pages (default: false, max: 5000)
412
-
413
- **Example:**
414
- ```typescript
415
- {
416
- "cql": "type=page AND space=DOCS AND title~'API'",
417
- "fetchAll": true,
418
- "limit": 100
419
- }
420
- ```
421
-
422
- #### `confluence_get_page`
423
- Get a Confluence page by ID.
424
-
425
- **Parameters:**
426
- - `pageId` (string, required): Page ID
427
- - `expand` (string[], optional): Additional data to expand (e.g., "body.storage", "version")
428
-
429
- **Example:**
430
- ```typescript
431
- {
432
- "pageId": "123456",
433
- "expand": ["body.storage", "version", "ancestors"]
434
- }
435
- ```
436
-
437
- #### `confluence_get_page_by_title`
438
- Get a Confluence page by title and space.
439
-
440
- **Parameters:**
441
- - `spaceKey` (string, required): Space key
442
- - `title` (string, required): Page title
443
- - `expand` (string[], optional): Additional data to expand
444
-
445
- **Example:**
446
- ```typescript
447
- {
448
- "spaceKey": "DOCS",
449
- "title": "API Documentation"
450
- }
451
- ```
452
-
453
- #### `confluence_create_page`
454
- Create a new Confluence page.
455
-
456
- **Parameters:**
457
- - `spaceKey` (string, required): Space key
458
- - `title` (string, required): Page title
459
- - `content` (string, required): Page content (Confluence storage format or HTML)
460
- - `parentId` (string, optional): Parent page ID
461
- - `labels` (string[], optional): Array of labels
462
-
463
- **Example:**
464
- ```typescript
465
- {
466
- "spaceKey": "DOCS",
467
- "title": "New Feature Documentation",
468
- "content": "<p>This page describes the new feature...</p>",
469
- "labels": ["api", "v2"]
470
- }
471
- ```
472
-
473
- #### `confluence_update_page`
474
- Update an existing Confluence page.
475
-
476
- **Parameters:**
477
- - `pageId` (string, required): Page ID
478
- - `title` (string, optional): New title
479
- - `content` (string, optional): New content
480
- - `version` (number, required): Current version number (for optimistic locking)
481
- - `minorEdit` (boolean, optional): Whether this is a minor edit
482
-
483
- **Example:**
484
- ```typescript
485
- {
486
- "pageId": "123456",
487
- "content": "<p>Updated content...</p>",
488
- "version": 5
489
- }
490
- ```
491
-
492
- #### `confluence_delete_page`
493
- Delete a Confluence page.
494
-
495
- **Parameters:**
496
- - `pageId` (string, required): Page ID
497
-
498
- #### `confluence_list_spaces`
499
- List all accessible Confluence spaces.
500
-
501
- Returns all spaces accessible to the current user. If the response is large, it will be automatically buffered.
502
-
503
- **Parameters:**
504
- - `type` (string, optional): Space type filter ("global" or "personal")
505
-
506
- #### `confluence_get_space`
507
- Get detailed information about a space.
508
-
509
- **Parameters:**
510
- - `spaceKey` (string, required): Space key
511
- - `expand` (string[], optional): Additional data to expand
512
-
513
- #### `confluence_get_page_children`
514
- Get all child pages of a page.
515
-
516
- Returns all child pages for the given parent page. If the response is large, it will be automatically buffered.
517
-
518
- **Parameters:**
519
- - `pageId` (string, required): Parent page ID
520
- - `expand` (string[], optional): Additional data to expand
521
-
522
- #### `confluence_add_comment`
523
- Add a comment to a Confluence page.
524
-
525
- **Parameters:**
526
- - `pageId` (string, required): Page ID
527
- - `comment` (string, required): Comment text (HTML format)
528
-
529
- #### `confluence_get_comments`
530
- Get all comments on a Confluence page.
531
-
532
- Returns all comments for the given page. If the response is large, it will be automatically buffered.
533
-
534
- **Parameters:**
535
- - `pageId` (string, required): Page ID
536
-
537
- #### `confluence_upload_attachment`
538
- Upload an attachment to a Confluence page.
539
-
540
- **Parameters:**
541
- - `pageId` (string, required): Page ID
542
- - `filePath` (string, required): Local file path
543
- - `comment` (string, optional): Attachment comment
544
-
545
- #### `confluence_list_attachments`
546
- List all attachments on a Confluence page.
547
-
548
- Returns all attachments for the given page. If the response is large, it will be automatically buffered.
549
-
550
- **Parameters:**
551
- - `pageId` (string, required): Page ID
552
-
553
- ### Utility Tools
554
-
555
- #### `workload_convert`
556
- Convert workload time between different units (seconds, hours, days).
557
-
558
- Pure computation tool that helps with time tracking calculations. Automatically included as a dependency when using any Jira, Confluence, or Tempo tool.
559
-
560
- **Parameters:**
561
- - `value` (number, required): The time value to convert
562
- - `unit` (string, required): The unit of the input value ("seconds", "hours", or "days")
563
- - `hoursPerDay` (number, optional): Hours per work day (default: 8)
564
-
565
- **Example:**
566
- ```typescript
567
- {
568
- "value": 28800,
569
- "unit": "seconds"
570
- }
571
- ```
572
-
573
- **Response:**
574
- ```json
575
- {
576
- "seconds": 28800,
577
- "hours": 8,
578
- "days": 1,
579
- "formatted": "1d"
580
- }
581
- ```
582
-
583
- #### `workload_sum`
584
- Sum multiple workload values with mixed units.
585
-
586
- Pure computation tool for aggregating time from multiple sources. Automatically included as a dependency when using any Jira, Confluence, or Tempo tool.
587
-
588
- **Parameters:**
589
- - `values` (array, required): Array of objects with `value` and `unit` properties
590
- - `hoursPerDay` (number, optional): Hours per work day (default: 8)
591
-
592
- **Example:**
593
- ```typescript
594
- {
595
- "values": [
596
- { "value": 3600, "unit": "seconds" },
597
- { "value": 2, "unit": "hours" },
598
- { "value": 0.5, "unit": "days" }
599
- ]
600
- }
601
- ```
602
-
603
- **Response:**
604
- ```json
605
- {
606
- "itemCount": 3,
607
- "seconds": 25200,
608
- "hours": 7,
609
- "days": 0.875,
610
- "formatted": "7.0h"
611
- }
612
- ```
613
-
614
- ## Authentication
615
-
616
- The server supports multiple authentication methods depending on your Atlassian instance:
617
-
618
- ### Basic Authentication (Jira/Confluence Cloud)
619
- For Cloud instances, use API tokens with Basic Auth:
620
- - **Username**: Your email address (e.g., user@example.com)
621
- - **Token**: API token generated from your Atlassian account settings
622
- - **Method**: Basic Auth (automatically used when username is provided)
623
-
624
- Generate Cloud API tokens at: https://id.atlassian.com/manage-profile/security/api-tokens
625
-
626
- ### Bearer Token Authentication (Jira/Confluence Data Center 8.14+)
627
- For Data Center instances version 8.14 and later (including 9.x), use Personal Access Tokens (PAT):
628
- - **Token**: Personal Access Token generated from your Jira/Confluence profile
629
- - **Method**: Bearer Auth (automatically used when username is omitted or `authType=bearer` is set)
630
- - **Recommended for**: Jira 9.x, Confluence 7.9+
631
-
632
- To generate a PAT:
633
- 1. Log into your Jira/Confluence Data Center instance
634
- 2. Click your avatar → Profile
635
- 3. Select "Personal access tokens" from the left menu
636
- 4. Click "Create token" and set appropriate permissions
637
- 5. Copy the token immediately (it won't be shown again)
638
-
639
- ### Authentication Auto-Detection
640
- The server automatically detects the authentication method:
641
- - If `username` is provided → uses **Basic Auth**
642
- - If `username` is omitted → uses **Bearer Auth**
643
- - If `authType` is explicitly set → uses the specified method
644
-
645
- ## Error Handling
646
-
647
- All tools return structured error responses:
648
-
649
- ```typescript
650
- {
651
- "error": true,
652
- "message": "Description of the error",
653
- "statusCode": 401,
654
- "details": { /* Additional error context */ }
655
- }
656
- ```
657
-
658
- Common error scenarios:
659
- - **401 Unauthorized**: Invalid credentials or token
660
- - **403 Forbidden**: Insufficient permissions
661
- - **404 Not Found**: Resource doesn't exist
662
- - **400 Bad Request**: Invalid parameters
663
- - **500 Internal Server Error**: Server-side issue
664
-
665
- ## Best Practices
666
-
667
- ### Security
668
- - **Never commit credentials to version control** - Use .gitignore to exclude .jicon.json and .env files
669
- - **Use environment variables or secure credential storage** - Leverage hierarchical config (project > user > env)
670
- - **Start with read-only mode** - Use `"mode": "readonly"` for exploration and reporting tasks
671
- - **API tokens should have minimal required permissions** - Create tokens with only the necessary scopes
672
- - **Regularly rotate API tokens** - Set expiration dates and rotate every 90 days
673
- - **Use Personal Access Tokens (PAT) for Data Center** - More secure than username/password for DC 8.14+
674
- - **Monitor write operations** - Enable audit logging in your Atlassian instances
675
- - **Review permission configurations** - Regularly audit your .jicon.json whitelist/blacklist settings
676
-
677
- ### Automatic Response Buffering
678
-
679
- All tools return complete data automatically. When a response exceeds the size limit (default: 16000 characters), it is automatically buffered:
680
-
681
- - **Automatic buffering** - Large responses are stored in a buffer and return a `bufferId`
682
- - **Use `buffer_get_chunk`** - Retrieve content in chunks using the provided `bufferId`
683
- - **Use `buffer_grep`** - Search within buffered content using regex patterns (large results are also buffered)
684
- - **Configure limit** - Set `JICON_MAX_OUTPUT` environment variable to adjust the size limit
685
- - **Use a sub-agent for analysis** - For complex analysis of large buffered data, spawn a sub-agent (Task tool) to process the buffer efficiently without consuming main conversation context
686
-
687
- **Example buffered response:**
688
- ```json
689
- {
690
- "_pagination": true,
691
- "status": "SUCCESS - Data retrieved and buffered",
692
- "bufferId": "buf_abc123",
693
- "totalSize": 45000,
694
- "hasMore": true,
695
- "next_action": {
696
- "tool": "buffer_get_chunk",
697
- "args": { "bufferId": "buf_abc123", "offset": 0, "limit": 5000 }
698
- }
699
- }
700
- ```
701
-
702
- **Recommended approach for large data:**
703
- 1. Use `buffer_grep` to search for specific patterns
704
- 2. For complex analysis, spawn a sub-agent with the `bufferId` to process data without bloating main context
705
-
706
- ### Performance Considerations
707
- - **Filter queries narrowly** - Specific JQL/CQL queries are faster than broad searches
708
- - **Request only needed fields** - Use the `fields` parameter to reduce response size
709
- - **Respect API rate limits** - Atlassian Cloud has rate limits; space out bulk operations
710
- - **Use narrow date ranges for Tempo** - Tempo Server/DC doesn't support pagination, so use focused date filters
711
- - **Use `buffer_grep` for large responses** - Search within buffered content instead of retrieving everything
712
-
713
- ## Development
714
-
715
- ### Project Structure
716
- ```
717
- jicon/
718
- ├── src/
719
- │ ├── index.ts # MCP server entry point
720
- │ ├── types.ts # Shared type definitions
721
- │ │
722
- │ ├── config/ # Configuration system
723
- │ │ ├── loader.ts # Config hierarchy loader
724
- │ │ ├── types.ts # Config schemas with Zod
725
- │ │ └── constants.ts # Config constants
726
- │ │
727
- │ ├── permissions/ # Security & access control
728
- │ │ ├── tool-registry.ts # Tool categorization
729
- │ │ └── filter.ts # Permission filtering
730
- │ │
731
- │ ├── utils/ # Shared utilities
732
- │ │ ├── http-client.ts # HTTP/Auth wrapper
733
- │ │ ├── response-formatter.ts # MCP response formatting
734
- │ │ ├── content-buffer.ts # Content buffering for large responses
735
- │ │ ├── buffer-tools.ts # Buffer management tools
736
- │ │ └── workload-tools.ts # Time calculation utilities
737
- │ │
738
- │ ├── jira/ # Jira integration (19 tools)
739
- │ │ ├── client.ts # Jira API client
740
- │ │ ├── tools.ts # Tool definitions
741
- │ │ ├── formatters.ts # Response formatting
742
- │ │ ├── types.ts # TypeScript types
743
- │ │ └── defaults.ts # Default field configs
744
- │ │
745
- │ ├── confluence/ # Confluence integration (14 tools)
746
- │ │ ├── client.ts # Confluence API client
747
- │ │ ├── tools.ts # Tool definitions
748
- │ │ ├── formatters.ts # Response formatting
749
- │ │ ├── types.ts # TypeScript types
750
- │ │ └── defaults.ts # Default field configs
751
- │ │
752
- │ └── tempo/ # Tempo integration (12 tools)
753
- │ ├── client.ts # Tempo API client
754
- │ ├── tools.ts # Tool definitions
755
- │ ├── formatters.ts # Response formatting
756
- │ └── types.ts # TypeScript types
757
-
758
- ├── tests/ # Test suite (146 tests)
759
- │ ├── permissions/ # Permission system tests
760
- │ ├── jira/ # Jira client tests
761
- │ ├── confluence/ # Confluence client tests
762
- │ └── utils/ # Utility tests
763
-
764
- ├── .jicon.json.example # Example full-access config
765
- ├── .jicon.json.readonly # Example read-only config
766
- ├── .jicon.json.custom # Example custom permissions
767
- ├── package.json
768
- ├── tsconfig.json
769
- └── README.md
770
- ```
771
-
772
- ### Building
773
- ```bash
774
- npm install
775
- npm run build
776
- ```
777
-
778
- ### Testing
779
-
780
- Tests are written in TypeScript and use Node.js built-in test runner with tsx:
781
-
782
- ```bash
783
- # Run all tests with tsx
784
- npx tsx --test tests/**/*.test.ts
785
-
786
- # Run specific test file
787
- npx tsx --test tests/utils/content-buffer.test.ts
788
-
789
- # Legacy command (requires compiled dist/)
790
- npm test
791
- npm run test:integration
792
- ```
793
-
794
- **Note:** Tests import from `dist/`, so run `npm run build` first if testing against compiled output.
795
-
796
- ## Roadmap
797
-
798
- ### v1.0 (Current)
799
- - ✅ Core Jira issue operations
800
- - ✅ Core Confluence page operations
801
- - ✅ Basic search capabilities
802
- - ✅ Authentication support
803
-
804
- ### v1.1 (Planned)
805
- - Advanced filtering and sorting
806
- - Bulk operations
807
- - Webhooks support
808
- - Custom field templates
809
-
810
- ### v1.2 (Future)
811
- - Jira Automation integration
812
- - Confluence templates
813
- - Analytics and reporting
814
- - Multi-instance support
815
-
816
- ## Contributing
817
-
818
- Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
819
-
820
- ## License
821
-
822
- MIT License - see LICENSE file for details
823
-
824
- ## Security Best Practices
825
-
826
- ### Deployment Security
827
-
828
- #### 1. Credential Management
829
- - **Use hierarchical configuration**: Project config (.jicon.json) > User config (~/.config/jicon/jicon.json) > Environment variables
830
- - **Never commit credentials**: Ensure .jicon.json is in .gitignore
831
- - **Use PAT for Data Center**: Personal Access Tokens are more secure than username/password for DC 8.14+
832
- - **Rotate tokens regularly**: Set 90-day expiration and rotate before expiry
833
-
834
- #### 2. Permission Configuration
835
-
836
- **Permission Modes:**
837
- - `readonly`: All read tools (Jira read + Confluence read + Tempo read)
838
- - `full`: All tools including write operations
839
- - `custom`: Whitelist/blacklist specific virtual actions
840
-
841
- **Default Configuration:** `custom` mode with `jira_read` + `confluence_read` (Tempo disabled by default)
842
-
843
- **Auto-included Dependencies:** (not configurable separately)
844
- - Buffer read tools (buffer_get_chunk, buffer_grep, etc.) → included with read actions
845
- - Buffer write tools (buffer_edit) → included with write actions
846
- - Workload tools (workload_convert, workload_sum) → included with any Jira/Confluence/Tempo tool
847
-
848
- **Virtual Actions (9 total):**
849
- | Action | Description |
850
- |--------|-------------|
851
- | `jira_read` | 14 Jira read tools (includes jira_jql_help) |
852
- | `jira_write` | 5 Jira write tools |
853
- | `jira_all` | All 19 Jira tools |
854
- | `confluence_read` | 9 Confluence read tools (includes confluence_cql_help) |
855
- | `confluence_write` | 5 Confluence write tools |
856
- | `confluence_all` | All 14 Confluence tools |
857
- | `tempo_read` | 9 Tempo read tools |
858
- | `tempo_write` | 3 Tempo write tools |
859
- | `tempo_all` | All 12 Tempo tools |
860
-
861
- - **Example default configuration** (Jira + Confluence read only):
862
- ```json
863
- {
864
- "permissions": {
865
- "mode": "custom",
866
- "whitelist": ["jira_read", "confluence_read"]
867
- }
868
- }
869
- ```
870
- - **Example read-only configuration** (all read tools including Tempo):
871
- ```json
872
- {
873
- "permissions": {
874
- "mode": "readonly"
875
- }
876
- }
877
- ```
878
- - **Example custom configuration with Tempo**:
879
- ```json
880
- {
881
- "permissions": {
882
- "mode": "custom",
883
- "whitelist": ["jira_read", "confluence_read", "tempo_read"]
884
- }
885
- }
886
- ```
887
-
888
- #### 3. Network Security
889
- - **Use HTTPS only**: Atlassian Cloud enforces HTTPS; ensure Data Center uses HTTPS
890
- - **Network isolation**: Run MCP server in isolated network segments when possible
891
- - **Firewall rules**: Restrict outbound connections to Atlassian instance IPs only
892
-
893
- #### 4. Monitoring & Auditing
894
- - **Enable Atlassian audit logs**: Monitor API usage in your Atlassian instances
895
- - **Review permission denials**: Check logs for unauthorized access attempts
896
- - **Monitor write operations**: Track issue creation, updates, and deletions
897
- - **Set up alerts**: Configure notifications for suspicious API activity
898
-
899
- #### 5. Input Validation
900
- - **Be cautious with JQL/CQL queries**: Complex queries can impact performance
901
- - **Validate user inputs**: When building tools that generate JQL/CQL, validate inputs
902
- - **Use parameterized searches**: Prefer specific field filters over broad text searches
903
-
904
- #### 6. Token Permissions
905
- - **Principle of least privilege**: Grant tokens only necessary permissions
906
- - **Jira Cloud token permissions**:
907
- - Read: View issues, projects, boards
908
- - Write: Create/update issues (only if needed)
909
- - Admin: Avoid granting admin permissions
910
- - **Data Center PAT scopes**:
911
- - Read: READ scope only for read-only operations
912
- - Write: WRITE scope only when modifications needed
913
-
914
- ### Threat Model
915
-
916
- #### Protected Against
917
- - ✅ **Unauthorized write operations**: Permission system blocks write tools in readonly mode
918
- - ✅ **Credential exposure**: .gitignore prevents credential commits
919
- - ✅ **Man-in-the-middle**: HTTPS encryption for all API calls
920
- - ✅ **Authentication bypass**: Double-check permission enforcement
921
-
922
- #### Security Considerations
923
- - ⚠️ **JQL/CQL injection**: While APIs handle parsing, avoid user-generated queries when possible
924
- - ⚠️ **Rate limiting**: No built-in rate limiting; respect Atlassian API limits manually
925
- - ⚠️ **Data exfiltration**: Read-only mode can still read all accessible data
926
- - ⚠️ **Privilege escalation**: Ensure API tokens don't have excessive permissions
927
-
928
- ### Incident Response
929
-
930
- If credentials are compromised:
931
- 1. **Immediately revoke** the API token in Atlassian settings
932
- 2. **Review audit logs** for unauthorized activity
933
- 3. **Generate new tokens** with appropriate permissions
934
- 4. **Update configurations** with new tokens
935
- 5. **Investigate** how credentials were exposed
936
- 6. **Implement preventive measures** to avoid future exposure
937
-
938
- ## Support
939
-
940
- - GitHub Issues: https://github.com/crypto512/jicon/issues
941
- - Documentation: https://github.com/crypto512/jicon
942
- - Community: https://github.com/crypto512/jicon/discussions
943
-
944
- ## Acknowledgments
945
-
946
- Built on the [Model Context Protocol](https://modelcontextprotocol.io) by Anthropic.
947
- - Use buffer management if tool response is too large.