@iflow-mcp/tom28881-mcp-jira-server 1.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 (52) hide show
  1. package/.env.example +18 -0
  2. package/.github/workflows/ci.yml +36 -0
  3. package/CHANGELOG.md +70 -0
  4. package/CONTRIBUTING.md +102 -0
  5. package/LICENSE +21 -0
  6. package/QUICKSTART.md +107 -0
  7. package/README.md +416 -0
  8. package/SECURITY.md +44 -0
  9. package/articles/devto-article.md +401 -0
  10. package/assets/README.md +25 -0
  11. package/claude_settings.json +14 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +192 -0
  14. package/dist/prompts/jira-prompts.d.ts.map +1 -0
  15. package/dist/resources/jira-resources.d.ts.map +1 -0
  16. package/dist/tools/issue-tools.d.ts.map +1 -0
  17. package/dist/types/jira.d.ts.map +1 -0
  18. package/dist/utils/adf-converter.d.ts.map +1 -0
  19. package/dist/utils/config.d.ts.map +1 -0
  20. package/dist/utils/date-parser.d.ts.map +1 -0
  21. package/dist/utils/field-detector.d.ts.map +1 -0
  22. package/dist/utils/formatter.d.ts.map +1 -0
  23. package/dist/utils/jira-client.d.ts.map +1 -0
  24. package/dist/utils/logger.d.ts.map +1 -0
  25. package/dist/utils/retry.d.ts.map +1 -0
  26. package/examples/claude-settings.json +18 -0
  27. package/examples/usage-examples.md +222 -0
  28. package/glama.json +6 -0
  29. package/language.json +1 -0
  30. package/package.json +1 -0
  31. package/package_name +1 -0
  32. package/push_info.json +5 -0
  33. package/reddit-posts/r-mcp-post.md +74 -0
  34. package/reddit-posts/r-modelcontextprotocol-post.md +143 -0
  35. package/run.sh +20 -0
  36. package/setup.sh +88 -0
  37. package/src/index.ts +225 -0
  38. package/src/prompts/jira-prompts.ts +193 -0
  39. package/src/resources/jira-resources.ts +155 -0
  40. package/src/tools/issue-tools.ts +2131 -0
  41. package/src/types/jira.ts +114 -0
  42. package/src/utils/adf-converter.ts +149 -0
  43. package/src/utils/config.ts +109 -0
  44. package/src/utils/date-parser.ts +166 -0
  45. package/src/utils/field-detector.ts +176 -0
  46. package/src/utils/formatter.ts +180 -0
  47. package/src/utils/jira-client.ts +478 -0
  48. package/src/utils/logger.ts +49 -0
  49. package/src/utils/retry.ts +41 -0
  50. package/submissions/cline-marketplace-submission.md +52 -0
  51. package/submissions/mcp-so-submission.md +38 -0
  52. package/tsconfig.json +25 -0
package/.env.example ADDED
@@ -0,0 +1,18 @@
1
+ # Jira Configuration
2
+ JIRA_HOST=https://your-company.atlassian.net
3
+ JIRA_EMAIL=your-email@company.com
4
+ JIRA_API_TOKEN=your-jira-api-token
5
+
6
+ # Project Configuration
7
+ JIRA_DEFAULT_PROJECT=YOUR_PROJECT_KEY
8
+
9
+ # Optional: Custom Field IDs
10
+ JIRA_FIELD_STORY_POINTS=customfield_10001
11
+ JIRA_FIELD_ACCEPTANCE_CRITERIA=customfield_10002
12
+ JIRA_FIELD_EPIC_LINK=customfield_10003
13
+
14
+ # Optional: Auto-create test tickets for stories
15
+ AUTO_CREATE_TEST_TICKETS=false
16
+
17
+ # Optional: Default assignee
18
+ DEFAULT_ASSIGNEE=
@@ -0,0 +1,36 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+
13
+ strategy:
14
+ matrix:
15
+ node-version: [18.x, 20.x]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v3
19
+
20
+ - name: Use Node.js ${{ matrix.node-version }}
21
+ uses: actions/setup-node@v3
22
+ with:
23
+ node-version: ${{ matrix.node-version }}
24
+ cache: 'npm'
25
+
26
+ - name: Install dependencies
27
+ run: npm ci
28
+
29
+ - name: Build
30
+ run: npm run build
31
+
32
+ - name: Type check
33
+ run: npm run typecheck
34
+
35
+ - name: Lint
36
+ run: npm run lint
package/CHANGELOG.md ADDED
@@ -0,0 +1,70 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Fixed
11
+ - Fixed "Unexpected end of JSON input" error for transition-issue
12
+ - Fixed "Cannot read properties of undefined" error for create-issue
13
+ - Improved handling of empty API responses
14
+ - Better error messages with context
15
+ - Fixed link-issues with case-insensitive matching
16
+ - Better handling of fields not available for certain issue types
17
+ - Fixed subtask creation by properly using parent field
18
+ - Fixed Epic-Story linking with proper error handling and guidance
19
+ - Fixed linkTypes.map error by handling different API response structures
20
+ - Fixed issue type validation for localized Jira instances
21
+
22
+ ### Added
23
+ - Comprehensive logging system with DEBUG support
24
+ - Automatic retry with exponential backoff (3 attempts)
25
+ - Connection testing on startup
26
+ - Atlassian Document Format (ADF) support for rich text
27
+ - Convenient run.sh script for easier execution
28
+ - Input validation with detailed error messages
29
+ - Robust error handling for all edge cases
30
+ - New `get-link-types` tool to list available issue link types
31
+ - New `get-fields` tool to show available fields for project/issue type
32
+ - New `create-epic-with-subtasks` tool for creating epics with multiple subtasks
33
+ - New `diagnose-fields` tool to find correct custom field IDs
34
+ - New `create-task-for-epic` tool optimized for Czech Jira
35
+ - Smart link type matching with fallback to available types
36
+ - Parent field support for creating subtasks
37
+ - Detection and guidance for Epic-Story system link attempts
38
+ - Full localization support for issue types and priorities
39
+ - Issue type mapping for multiple languages
40
+
41
+ ### Improved
42
+ - More informative startup messages
43
+ - Better handling of test ticket creation failures
44
+ - Enhanced transition handling with available options display
45
+ - Enhanced debug logging for create-issue payloads
46
+ - Link-issues now shows available types on error
47
+ - Automatic fallback to tasks when subtasks under epics fail
48
+ - Better handling of Czech and localized error messages
49
+ - Issue type schema now accepts any string value for localized names
50
+ - Priority schema now accepts any string value for localized names
51
+
52
+ ## [1.0.0] - 2024-12-19
53
+
54
+ ### Added
55
+ - Initial release with full Jira integration
56
+ - 7 tools for issue management (create, update, search, transition, link, comment)
57
+ - 5 prompts for common workflows (standup, sprint planning, bug triage, release notes, epic status)
58
+ - 5 resources for read-only data access
59
+ - Support for custom fields (story points, acceptance criteria, epic links)
60
+ - Automatic test ticket creation for stories
61
+ - Comprehensive error handling and user-friendly messages
62
+ - TypeScript implementation with full type safety
63
+ - Environment-based configuration
64
+ - Setup script for easy installation
65
+ - Extensive documentation and examples
66
+
67
+ ### Security
68
+ - API token authentication
69
+ - Environment variable configuration
70
+ - No hardcoded credentials
@@ -0,0 +1,102 @@
1
+ # Contributing to MCP Jira Server
2
+
3
+ Thank you for your interest in contributing! This guide will help you get started.
4
+
5
+ ## Getting Started
6
+
7
+ 1. Fork the repository
8
+ 2. Clone your fork
9
+ 3. Create a feature branch (`git checkout -b feature/amazing-feature`)
10
+ 4. Make your changes
11
+ 5. Run tests and ensure everything passes
12
+ 6. Commit your changes (`git commit -m 'Add amazing feature'`)
13
+ 7. Push to your branch (`git push origin feature/amazing-feature`)
14
+ 8. Open a Merge Request
15
+
16
+ ## Development Setup
17
+
18
+ ```bash
19
+ # Install dependencies
20
+ npm install
21
+
22
+ # Build the project
23
+ npm run build
24
+
25
+ # Run type checking
26
+ npm run typecheck
27
+
28
+ # Run linting
29
+ npm run lint
30
+ ```
31
+
32
+ ## Code Style
33
+
34
+ - Use TypeScript for all new code
35
+ - Follow existing code patterns
36
+ - Add types for all function parameters and returns
37
+ - Use meaningful variable and function names
38
+ - Keep functions small and focused
39
+
40
+ ## Adding New Features
41
+
42
+ ### Adding a New Tool
43
+
44
+ 1. Create a new function in `src/tools/issue-tools.ts`
45
+ 2. Add Zod schema for input validation
46
+ 3. Implement the handler function
47
+ 4. Add to the exported tools object
48
+
49
+ Example:
50
+ ```typescript
51
+ const MyNewToolSchema = z.object({
52
+ param1: z.string(),
53
+ param2: z.number().optional()
54
+ });
55
+
56
+ 'my-new-tool': {
57
+ description: 'Description of what this tool does',
58
+ inputSchema: zodToJsonSchema(MyNewToolSchema) as any,
59
+ handler: async (args: unknown) => {
60
+ const params = MyNewToolSchema.parse(args);
61
+ // Implementation
62
+ }
63
+ }
64
+ ```
65
+
66
+ ### Adding a New Prompt
67
+
68
+ 1. Add to `src/prompts/jira-prompts.ts`
69
+ 2. Create input schema
70
+ 3. Return appropriate prompt messages
71
+
72
+ ### Adding a New Resource
73
+
74
+ 1. Add to `src/resources/jira-resources.ts`
75
+ 2. Implement the handler function
76
+ 3. Return data in appropriate format
77
+
78
+ ## Testing
79
+
80
+ Currently manual testing is used. To test your changes:
81
+
82
+ 1. Build the project: `npm run build`
83
+ 2. Run the test script: `node test-server.js`
84
+ 3. Test with Claude Code: `claude --mcp "node dist/index.js"`
85
+
86
+ ## Documentation
87
+
88
+ - Update README.md if adding new features
89
+ - Add JSDoc comments to new functions
90
+ - Include examples in documentation
91
+
92
+ ## Commit Messages
93
+
94
+ Use clear, descriptive commit messages:
95
+ - `feat: Add support for bulk issue updates`
96
+ - `fix: Handle empty search results correctly`
97
+ - `docs: Update installation instructions`
98
+ - `refactor: Simplify error handling in JiraClient`
99
+
100
+ ## Questions?
101
+
102
+ Feel free to open an issue for any questions or discussions!
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 MCP Jira Server Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/QUICKSTART.md ADDED
@@ -0,0 +1,107 @@
1
+ # Quick Start Guide for Claude Code
2
+
3
+ ## 1. Install and Build
4
+
5
+ ```bash
6
+ # Clone the repository
7
+ git clone https://github.com/yourusername/mcp-jira-server.git
8
+ cd mcp-jira-server
9
+
10
+ # Install dependencies
11
+ npm install
12
+
13
+ # Build the project
14
+ npm run build
15
+ ```
16
+
17
+ ## 2. Configure
18
+
19
+ ```bash
20
+ # Run the setup script
21
+ ./setup.sh
22
+
23
+ # Or manually create .env file
24
+ cp .env.example .env
25
+ # Edit .env with your Jira credentials
26
+ ```
27
+
28
+ ## 3. Run with Claude Code
29
+
30
+ ### Quick Test
31
+ ```bash
32
+ # From the mcp-jira-server directory
33
+ claude --mcp "node dist/index.js"
34
+ ```
35
+
36
+ ### Permanent Setup
37
+
38
+ Add to `~/.claude/settings.json`:
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": [
43
+ {
44
+ "name": "jira",
45
+ "command": "node",
46
+ "args": ["/absolute/path/to/mcp-jira-server/dist/index.js"]
47
+ }
48
+ ]
49
+ }
50
+ ```
51
+
52
+ Then run:
53
+ ```bash
54
+ claude --mcp jira
55
+ ```
56
+
57
+ ## 4. Example Commands
58
+
59
+ Once connected, try these commands in Claude Code:
60
+
61
+ ### Creating Issues
62
+ ```
63
+ Create a bug in project PROJ with high priority about login failure
64
+ ```
65
+
66
+ ### Searching Issues
67
+ ```
68
+ Find all open bugs assigned to me
69
+ ```
70
+
71
+ ### Updating Issues
72
+ ```
73
+ Update PROJ-123 to add 5 story points
74
+ ```
75
+
76
+ ### Using Prompts
77
+ ```
78
+ Generate a standup report for my email
79
+ ```
80
+
81
+ ## 5. Troubleshooting
82
+
83
+ ### Check Server Status
84
+ ```bash
85
+ # Test if the server starts correctly
86
+ node test-server.js
87
+ ```
88
+
89
+ ### View Logs
90
+ ```bash
91
+ # Run with debug output
92
+ DEBUG=* claude --mcp "node dist/index.js"
93
+ ```
94
+
95
+ ### Common Issues
96
+
97
+ 1. **Authentication Failed**
98
+ - Verify your API token at https://id.atlassian.com/manage-profile/security/api-tokens
99
+ - Ensure email matches your Atlassian account
100
+
101
+ 2. **Project Not Found**
102
+ - Check project key is correct (case-sensitive)
103
+ - Verify you have access to the project
104
+
105
+ 3. **MCP Connection Failed**
106
+ - Ensure the server path is absolute in settings.json
107
+ - Check that dist/index.js exists after building