agentek-youtrack-mcp 1.0.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 (44) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +332 -0
  3. package/README.npm.md +436 -0
  4. package/dist/bin/youtrack-mcp.js +158 -0
  5. package/dist/index.js +129 -0
  6. package/dist/python/main.py +74 -0
  7. package/dist/python/requirements.txt +13 -0
  8. package/dist/python/youtrack_mcp/__init__.py +5 -0
  9. package/dist/python/youtrack_mcp/__pycache__/__init__.cpython-311.pyc +0 -0
  10. package/dist/python/youtrack_mcp/__pycache__/version.cpython-311.pyc +0 -0
  11. package/dist/python/youtrack_mcp/api/__init__.py +3 -0
  12. package/dist/python/youtrack_mcp/api/articles.py +317 -0
  13. package/dist/python/youtrack_mcp/api/client.py +466 -0
  14. package/dist/python/youtrack_mcp/api/issues.py +3008 -0
  15. package/dist/python/youtrack_mcp/api/mcp_wrappers.py +304 -0
  16. package/dist/python/youtrack_mcp/api/projects.py +1009 -0
  17. package/dist/python/youtrack_mcp/api/search.py +244 -0
  18. package/dist/python/youtrack_mcp/api/spaces.py +46 -0
  19. package/dist/python/youtrack_mcp/api/users.py +149 -0
  20. package/dist/python/youtrack_mcp/config.py +273 -0
  21. package/dist/python/youtrack_mcp/mcp_server.py +158 -0
  22. package/dist/python/youtrack_mcp/mcp_wrappers.py +324 -0
  23. package/dist/python/youtrack_mcp/tools/__init__.py +8 -0
  24. package/dist/python/youtrack_mcp/tools/articles.py +487 -0
  25. package/dist/python/youtrack_mcp/tools/create_project_tool.py +51 -0
  26. package/dist/python/youtrack_mcp/tools/issues/__init__.py +208 -0
  27. package/dist/python/youtrack_mcp/tools/issues/attachments.py +161 -0
  28. package/dist/python/youtrack_mcp/tools/issues/basic_operations.py +322 -0
  29. package/dist/python/youtrack_mcp/tools/issues/custom_fields.py +365 -0
  30. package/dist/python/youtrack_mcp/tools/issues/dedicated_updates.py +601 -0
  31. package/dist/python/youtrack_mcp/tools/issues/diagnostics.py +363 -0
  32. package/dist/python/youtrack_mcp/tools/issues/linking.py +283 -0
  33. package/dist/python/youtrack_mcp/tools/issues/utilities.py +291 -0
  34. package/dist/python/youtrack_mcp/tools/loader.py +383 -0
  35. package/dist/python/youtrack_mcp/tools/projects.py +826 -0
  36. package/dist/python/youtrack_mcp/tools/projects.py-e +411 -0
  37. package/dist/python/youtrack_mcp/tools/resources.py +744 -0
  38. package/dist/python/youtrack_mcp/tools/search.py +297 -0
  39. package/dist/python/youtrack_mcp/tools/spaces.py +69 -0
  40. package/dist/python/youtrack_mcp/tools/users.py +185 -0
  41. package/dist/python/youtrack_mcp/utils.py +87 -0
  42. package/dist/python/youtrack_mcp/version.py +5 -0
  43. package/package.json +61 -0
  44. package/requirements.txt +13 -0
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Anton Zorin
4
+ Copyright (c) 2026 Agentek
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,332 @@
1
+ # YouTrack MCP
2
+
3
+ A Model Context Protocol (MCP) server that provides access to YouTrack functionality.
4
+
5
+ ## 🚀 Quick Reference - Common Operations
6
+
7
+ ### **🎯 State Transitions (Most Common)**
8
+ ```python
9
+ # ✅ PROVEN WORKING FORMAT - Use simple strings
10
+ update_issue_state("DEMO-123", "In Progress")
11
+ update_issue_state("PROJECT-456", "Fixed")
12
+ update_issue_state("TASK-789", "Closed")
13
+
14
+ # ❌ DON'T USE - Complex objects fail
15
+ # update_custom_fields(issue_id, {"State": {"name": "In Progress"}}) # FAILS
16
+ # update_custom_fields(issue_id, {"State": {"id": "154-2"}}) # FAILS
17
+ ```
18
+
19
+ ### **🚨 Priority Updates (Very Common)**
20
+ ```python
21
+ # ✅ PROVEN WORKING FORMAT - Use simple strings
22
+ update_issue_priority("DEMO-123", "Critical")
23
+ update_issue_priority("PROJECT-456", "Major")
24
+ update_issue_priority("TASK-789", "Normal")
25
+
26
+ # ❌ DON'T USE - Complex objects fail
27
+ # update_custom_fields(issue_id, {"Priority": {"name": "Critical"}}) # FAILS
28
+ # update_custom_fields(issue_id, {"Priority": {"id": "152-1"}}) # FAILS
29
+ ```
30
+
31
+ ### **👤 Assignment Updates (Common)**
32
+ ```python
33
+ # ✅ PROVEN WORKING FORMAT - Use login names
34
+ update_issue_assignee("DEMO-123", "admin")
35
+ update_issue_assignee("PROJECT-456", "john.doe")
36
+ update_issue_assignee("TASK-789", "jane.smith")
37
+
38
+ # ❌ DON'T USE - Complex objects fail
39
+ # update_custom_fields(issue_id, {"Assignee": {"login": "admin"}}) # FAILS
40
+ ```
41
+
42
+ ### **🏷️ Type Updates (Common)**
43
+ ```python
44
+ # ✅ PROVEN WORKING FORMAT - Use simple strings
45
+ update_issue_type("DEMO-123", "Bug")
46
+ update_issue_type("PROJECT-456", "Feature")
47
+ update_issue_type("TASK-789", "Task")
48
+
49
+ # ❌ DON'T USE - Complex objects fail
50
+ # update_custom_fields(issue_id, {"Type": {"name": "Bug"}}) # FAILS
51
+ ```
52
+
53
+ ### **⏱️ Time Estimation (Common)**
54
+ ```python
55
+ # ✅ PROVEN WORKING FORMAT - Use simple time strings
56
+ update_issue_estimation("DEMO-123", "4h") # 4 hours
57
+ update_issue_estimation("PROJECT-456", "2d") # 2 days
58
+ update_issue_estimation("TASK-789", "30m") # 30 minutes
59
+ update_issue_estimation("TASK-790", "1w") # 1 week
60
+ update_issue_estimation("TASK-791", "3d 5h") # 3 days 5 hours
61
+
62
+ # ❌ DON'T USE - ISO duration or complex formats fail
63
+ # update_custom_fields(issue_id, {"Estimation": "PT4H"}) # FAILS
64
+ ```
65
+
66
+ ### **⚡ Complete Issue Workflows**
67
+ ```python
68
+ # 🎯 Complete Triage Workflow
69
+ update_issue_type("DEMO-123", "Bug") # Classify as bug
70
+ update_issue_priority("DEMO-123", "Critical") # Set priority
71
+ update_issue_assignee("DEMO-123", "admin") # Assign to admin
72
+ update_issue_estimation("DEMO-123", "4h") # Estimate 4 hours
73
+ update_issue_state("DEMO-123", "In Progress") # Start work
74
+ add_comment("DEMO-123", "Critical bug triaged and assigned")
75
+
76
+ # 🚀 Feature Development Workflow
77
+ update_issue_type("PROJ-456", "Feature") # Classify as feature
78
+ update_issue_priority("PROJ-456", "Normal") # Standard priority
79
+ update_issue_assignee("PROJ-456", "jane.doe") # Assign to developer
80
+ update_issue_estimation("PROJ-456", "2d") # Estimate 2 days
81
+ add_comment("PROJ-456", "Feature ready for development")
82
+
83
+ # ✅ Task Completion Workflow
84
+ update_issue_state("TASK-789", "Fixed") # Mark as fixed
85
+ add_comment("TASK-789", "Implementation completed and tested")
86
+
87
+ # 📊 Quick Updates (Most Common)
88
+ update_issue_state("DEMO-123", "In Progress") # Start work
89
+ update_issue_priority("DEMO-123", "Critical") # Escalate
90
+ update_issue_assignee("DEMO-123", "admin") # Reassign
91
+ update_issue_type("DEMO-123", "Bug") # Reclassify
92
+ update_issue_estimation("DEMO-123", "6h") # Re-estimate
93
+ ```
94
+
95
+ ### **📝 Other Custom Fields**
96
+ ```python
97
+ # ✅ Working formats for different field types:
98
+
99
+ # Priority (enum field)
100
+ update_custom_fields("DEMO-123", {"Priority": "Critical"})
101
+
102
+ # Assignee (user field)
103
+ update_custom_fields("DEMO-123", {"Assignee": "admin"})
104
+
105
+ # Estimation (period field)
106
+ update_custom_fields("DEMO-123", {"Estimation": "4h"})
107
+
108
+ # Type (enum field)
109
+ update_custom_fields("DEMO-123", {"Type": "Bug"})
110
+
111
+ # Multiple fields at once
112
+ update_custom_fields("DEMO-123", {
113
+ "Priority": "Critical",
114
+ "Assignee": "admin",
115
+ "Type": "Bug"
116
+ })
117
+ ```
118
+
119
+ ### **🔍 Finding Issues**
120
+ ```python
121
+ # Search by text
122
+ search_issues("bug in login")
123
+
124
+ # Search by project
125
+ get_project_issues("DEMO")
126
+
127
+ # Get specific issue
128
+ get_issue("DEMO-123")
129
+ ```
130
+
131
+ ### **📋 Creating Issues**
132
+ ```python
133
+ create_issue(
134
+ project_id="DEMO",
135
+ summary="Bug in login system",
136
+ description="Users cannot log in with special characters"
137
+ )
138
+ ```
139
+
140
+ ### **🔗 Linking Issues**
141
+ ```python
142
+ # Create dependency
143
+ add_dependency("DEMO-123", "DEMO-124")
144
+
145
+ # Create relates link
146
+ add_relates_link("DEMO-123", "DEMO-125")
147
+ ```
148
+
149
+ ### **💬 Comments**
150
+ ```python
151
+ add_comment("DEMO-123", "Fixed the login bug")
152
+ get_issue_comments("DEMO-123")
153
+ ```
154
+
155
+ ### **📎 Attachments**
156
+ ```python
157
+ # Get raw issue data with attachments
158
+ get_issue_raw("DEMO-123")
159
+
160
+ # Download attachment content as base64
161
+ get_attachment_content("DEMO-123", "1-456")
162
+
163
+ # Delete an attachment (requires permissions)
164
+ delete_attachment("DEMO-123", "1-456")
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Installation
170
+
171
+ [![Docker Build and Push](https://github.com/windbit/agentek-youtrack-mcp/actions/workflows/docker-build.yml/badge.svg)](https://github.com/windbit/agentek-youtrack-mcp/actions/workflows/docker-build.yml)
172
+
173
+ This project provides a Model Context Protocol (MCP) server for YouTrack, enabling seamless integration with Claude Desktop and other MCP clients.
174
+
175
+ ## Quick Start
176
+
177
+ ### Using Docker (Recommended)
178
+
179
+ Choose from multiple registries:
180
+
181
+ #### Docker Hub (Primary)
182
+ ```bash
183
+ # Use the latest stable release
184
+ docker run --rm \
185
+ -e YOUTRACK_URL="https://your-instance.youtrack.cloud" \
186
+ -e YOUTRACK_API_TOKEN="your-token" \
187
+ windbit/agentek-youtrack-mcp:latest
188
+
189
+ # Or use the latest development build
190
+ docker run --rm \
191
+ -e YOUTRACK_URL="https://your-instance.youtrack.cloud" \
192
+ -e YOUTRACK_API_TOKEN="your-token" \
193
+ windbit/agentek-youtrack-mcp:1.1.2_wip
194
+ ```
195
+
196
+ #### GitHub Container Registry (New)
197
+ ```bash
198
+ # Use the latest stable release
199
+ docker run --rm \
200
+ -e YOUTRACK_URL="https://your-instance.youtrack.cloud" \
201
+ -e YOUTRACK_API_TOKEN="your-token" \
202
+ ghcr.io/windbit/agentek-youtrack-mcp:latest
203
+
204
+ # Or use the latest development build
205
+ docker run --rm \
206
+ -e YOUTRACK_URL="https://your-instance.youtrack.cloud" \
207
+ -e YOUTRACK_API_TOKEN="your-token" \
208
+ ghcr.io/windbit/agentek-youtrack-mcp:1.1.2_wip
209
+ ```
210
+
211
+ ### Available Docker Tags
212
+
213
+ Both registries provide identical tags:
214
+
215
+ - `latest` - Latest stable release (currently 1.1.2)
216
+ - `1.1.2` - Specific version tags
217
+ - `1.1.2_wip` - Work-in-progress builds from main branch
218
+ - `pr-<number>` - Pull request builds for testing
219
+
220
+ *Note: Images are now published to both Docker Hub and GitHub Container Registry simultaneously.*
221
+
222
+ ### Using npm Package
223
+
224
+ Choose from multiple registries:
225
+
226
+ #### npmjs.org (Primary)
227
+ ```bash
228
+ # Install globally
229
+ npm install -g agentek-youtrack-mcp
230
+
231
+ # Or use with npx (no installation required)
232
+ npx agentek-youtrack-mcp
233
+ ```
234
+
235
+ #### GitHub Packages (New)
236
+ ```bash
237
+ # Configure GitHub registry
238
+ npm config set @windbit:registry https://npm.pkg.github.com
239
+
240
+ # Install globally
241
+ npm install -g @windbit/agentek-youtrack-mcp
242
+
243
+ # Or use with npx
244
+ npx @windbit/agentek-youtrack-mcp
245
+ ```
246
+
247
+ ## Features
248
+
249
+ - **Issue Management**: Create, read, update, and delete YouTrack issues
250
+ - **Project Management**: Access project information and custom fields
251
+ - **Search Capabilities**: Advanced search with filters and custom fields
252
+ - **User Management**: Retrieve user information and permissions
253
+ - **Attachment Support**: Download, process, and delete issue attachments (up to 10MB)
254
+ - **Multi-Platform Support**: ARM64/Apple Silicon and AMD64 architecture support
255
+ - **Comprehensive API**: Full YouTrack REST API integration
256
+
257
+ ## Development
258
+
259
+ This project maintains high code quality with comprehensive testing:
260
+
261
+ - **Test Coverage**: 41% (continuously improving)
262
+ - **CI/CD Pipeline**: Automated testing and Docker builds
263
+ - **Quality Assurance**: Automated testing on every commit
264
+
265
+ For development instructions, see the [Automation Scripts Guide](automations/README.md) and [Release Process](automations/RELEASE_INSTRUCTIONS.md).
266
+
267
+ ## Configuration
268
+
269
+ ### Environment Variables
270
+
271
+ - `YOUTRACK_URL`: Your YouTrack instance URL
272
+ - `YOUTRACK_API_TOKEN`: Your YouTrack API token
273
+ - `YOUTRACK_VERIFY_SSL`: SSL verification (default: true)
274
+ - `DISABLED_TOOLS`: Comma-separated list of tools to disable (denylist mode)
275
+ - `ENABLED_TOOLS`: Comma-separated list of tools to enable (allowlist mode)
276
+
277
+ ### Tool Filtering
278
+
279
+ You can reduce context pollution and token usage by filtering which tools are available:
280
+
281
+ **Denylist Mode** - Disable specific tools:
282
+ ```bash
283
+ export DISABLED_TOOLS="create_issue,update_issue,delete_page"
284
+ ```
285
+
286
+ **Allowlist Mode** - Enable only specific tools (disables all others):
287
+ ```bash
288
+ export ENABLED_TOOLS="get_issue,search_issues,get_projects"
289
+ ```
290
+
291
+ **Notes:**
292
+ - Tool names are case-insensitive (`Get_Issue` = `get_issue`)
293
+ - Hyphens and underscores are equivalent (`get-issue` = `get_issue`)
294
+ - If `ENABLED_TOOLS` is set, it takes precedence over `DISABLED_TOOLS`
295
+ - Invalid tool names generate warnings but don't cause errors
296
+ - Filtering happens at startup for maximum efficiency
297
+
298
+ ### Example Configuration
299
+
300
+ ```bash
301
+ export YOUTRACK_URL="https://prodcamp.youtrack.cloud/"
302
+ export YOUTRACK_API_TOKEN="perm-YWRtaW4=.NDMtMg==.JgbpvnDbEu7RSWwAJT6Ab3iXgQyPwu"
303
+ export YOUTRACK_VERIFY_SSL="true"
304
+ ```
305
+
306
+ ## Documentation
307
+
308
+ - [Development Workflow & Release Process](automations/RELEASE_INSTRUCTIONS.md)
309
+ - [Docker Tagging Strategy](automations/DOCKER_TAGGING.md)
310
+ - [Testing Guide](tests/README.md)
311
+ - [Automation Scripts](automations/README.md)
312
+
313
+ ## Support
314
+
315
+ For issues and questions:
316
+ 1. Check the [Issues](https://github.com/windbit/agentek-youtrack-mcp/issues) page
317
+ 2. Review the documentation
318
+ 3. Submit a new issue with detailed information
319
+
320
+ ---
321
+
322
+ *Latest update: Comprehensive custom fields management with 567 test coverage and clean project organization.*
323
+
324
+ ## Version 1.11.1 Released
325
+
326
+ 🎉 **MAJOR FEATURE** - Custom Fields Management Support
327
+ - ✅ Complete custom fields CRUD operations (create, read, update, delete)
328
+ - ✅ Field validation against project schema (all field types supported)
329
+ - ✅ Batch update capabilities for performance
330
+ - ✅ Comprehensive error handling with detailed messages
331
+ - ✅ 567 tests (+68 new tests) with extensive coverage
332
+ - ✅ Clean project organization with `automations/` directory