ultra-jira-mcp 2.1.2

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 (239) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +167 -0
  3. package/build/auth/jira-client.d.ts +59 -0
  4. package/build/auth/jira-client.d.ts.map +1 -0
  5. package/build/auth/jira-client.js +267 -0
  6. package/build/auth/jira-client.js.map +1 -0
  7. package/build/cli/direct.d.ts +5 -0
  8. package/build/cli/direct.d.ts.map +1 -0
  9. package/build/cli/direct.js +47 -0
  10. package/build/cli/direct.js.map +1 -0
  11. package/build/cli/index.d.ts +3 -0
  12. package/build/cli/index.d.ts.map +1 -0
  13. package/build/cli/index.js +27 -0
  14. package/build/cli/index.js.map +1 -0
  15. package/build/cli/install-skill.d.ts +10 -0
  16. package/build/cli/install-skill.d.ts.map +1 -0
  17. package/build/cli/install-skill.js +100 -0
  18. package/build/cli/install-skill.js.map +1 -0
  19. package/build/codeapi/boot.d.ts +16 -0
  20. package/build/codeapi/boot.d.ts.map +1 -0
  21. package/build/codeapi/boot.js +53 -0
  22. package/build/codeapi/boot.js.map +1 -0
  23. package/build/codeapi/bridge.d.ts +15 -0
  24. package/build/codeapi/bridge.d.ts.map +1 -0
  25. package/build/codeapi/bridge.js +59 -0
  26. package/build/codeapi/bridge.js.map +1 -0
  27. package/build/codeapi/generator.d.ts +22 -0
  28. package/build/codeapi/generator.d.ts.map +1 -0
  29. package/build/codeapi/generator.js +106 -0
  30. package/build/codeapi/generator.js.map +1 -0
  31. package/build/codeapi/templates.d.ts +17 -0
  32. package/build/codeapi/templates.d.ts.map +1 -0
  33. package/build/codeapi/templates.js +296 -0
  34. package/build/codeapi/templates.js.map +1 -0
  35. package/build/codeapi/tool.d.ts +6 -0
  36. package/build/codeapi/tool.d.ts.map +1 -0
  37. package/build/codeapi/tool.js +66 -0
  38. package/build/codeapi/tool.js.map +1 -0
  39. package/build/config.d.ts +18 -0
  40. package/build/config.d.ts.map +1 -0
  41. package/build/config.js +124 -0
  42. package/build/config.js.map +1 -0
  43. package/build/core/adf.d.ts +14 -0
  44. package/build/core/adf.d.ts.map +1 -0
  45. package/build/core/adf.js +289 -0
  46. package/build/core/adf.js.map +1 -0
  47. package/build/core/attachments.d.ts +28 -0
  48. package/build/core/attachments.d.ts.map +1 -0
  49. package/build/core/attachments.js +150 -0
  50. package/build/core/attachments.js.map +1 -0
  51. package/build/core/http.d.ts +24 -0
  52. package/build/core/http.d.ts.map +1 -0
  53. package/build/core/http.js +110 -0
  54. package/build/core/http.js.map +1 -0
  55. package/build/core/lru.d.ts +18 -0
  56. package/build/core/lru.d.ts.map +1 -0
  57. package/build/core/lru.js +57 -0
  58. package/build/core/lru.js.map +1 -0
  59. package/build/core/manifest.d.ts +19 -0
  60. package/build/core/manifest.d.ts.map +1 -0
  61. package/build/core/manifest.js +99 -0
  62. package/build/core/manifest.js.map +1 -0
  63. package/build/core/operations.d.ts +3 -0
  64. package/build/core/operations.d.ts.map +1 -0
  65. package/build/core/operations.js +1028 -0
  66. package/build/core/operations.js.map +1 -0
  67. package/build/core/sandbox.d.ts +9 -0
  68. package/build/core/sandbox.d.ts.map +1 -0
  69. package/build/core/sandbox.js +17 -0
  70. package/build/core/sandbox.js.map +1 -0
  71. package/build/core/tenant-cache.d.ts +4 -0
  72. package/build/core/tenant-cache.d.ts.map +1 -0
  73. package/build/core/tenant-cache.js +53 -0
  74. package/build/core/tenant-cache.js.map +1 -0
  75. package/build/core/trim-registry.d.ts +15 -0
  76. package/build/core/trim-registry.d.ts.map +1 -0
  77. package/build/core/trim-registry.js +25 -0
  78. package/build/core/trim-registry.js.map +1 -0
  79. package/build/core/trim.d.ts +105 -0
  80. package/build/core/trim.d.ts.map +1 -0
  81. package/build/core/trim.js +147 -0
  82. package/build/core/trim.js.map +1 -0
  83. package/build/index.d.ts +3 -0
  84. package/build/index.d.ts.map +1 -0
  85. package/build/index.js +161 -0
  86. package/build/index.js.map +1 -0
  87. package/build/resources/index.d.ts +21 -0
  88. package/build/resources/index.d.ts.map +1 -0
  89. package/build/resources/index.js +99 -0
  90. package/build/resources/index.js.map +1 -0
  91. package/build/tools/attachments.d.ts +27 -0
  92. package/build/tools/attachments.d.ts.map +1 -0
  93. package/build/tools/attachments.js +98 -0
  94. package/build/tools/attachments.js.map +1 -0
  95. package/build/tools/boards.d.ts +205 -0
  96. package/build/tools/boards.d.ts.map +1 -0
  97. package/build/tools/boards.js +308 -0
  98. package/build/tools/boards.js.map +1 -0
  99. package/build/tools/comments.d.ts +134 -0
  100. package/build/tools/comments.d.ts.map +1 -0
  101. package/build/tools/comments.js +207 -0
  102. package/build/tools/comments.js.map +1 -0
  103. package/build/tools/epics.d.ts +107 -0
  104. package/build/tools/epics.d.ts.map +1 -0
  105. package/build/tools/epics.js +139 -0
  106. package/build/tools/epics.js.map +1 -0
  107. package/build/tools/fields.d.ts +59 -0
  108. package/build/tools/fields.d.ts.map +1 -0
  109. package/build/tools/fields.js +134 -0
  110. package/build/tools/fields.js.map +1 -0
  111. package/build/tools/filters.d.ts +233 -0
  112. package/build/tools/filters.d.ts.map +1 -0
  113. package/build/tools/filters.js +273 -0
  114. package/build/tools/filters.js.map +1 -0
  115. package/build/tools/groups.d.ts +109 -0
  116. package/build/tools/groups.d.ts.map +1 -0
  117. package/build/tools/groups.js +146 -0
  118. package/build/tools/groups.js.map +1 -0
  119. package/build/tools/index.d.ts +23 -0
  120. package/build/tools/index.d.ts.map +1 -0
  121. package/build/tools/index.js +138 -0
  122. package/build/tools/index.js.map +1 -0
  123. package/build/tools/issue-links.d.ts +61 -0
  124. package/build/tools/issue-links.d.ts.map +1 -0
  125. package/build/tools/issue-links.js +139 -0
  126. package/build/tools/issue-links.js.map +1 -0
  127. package/build/tools/issues.d.ts +421 -0
  128. package/build/tools/issues.d.ts.map +1 -0
  129. package/build/tools/issues.js +479 -0
  130. package/build/tools/issues.js.map +1 -0
  131. package/build/tools/projects.d.ts +353 -0
  132. package/build/tools/projects.d.ts.map +1 -0
  133. package/build/tools/projects.js +457 -0
  134. package/build/tools/projects.js.map +1 -0
  135. package/build/tools/search.d.ts +60 -0
  136. package/build/tools/search.d.ts.map +1 -0
  137. package/build/tools/search.js +103 -0
  138. package/build/tools/search.js.map +1 -0
  139. package/build/tools/server.d.ts +12 -0
  140. package/build/tools/server.d.ts.map +1 -0
  141. package/build/tools/server.js +23 -0
  142. package/build/tools/server.js.map +1 -0
  143. package/build/tools/sprints.d.ts +269 -0
  144. package/build/tools/sprints.d.ts.map +1 -0
  145. package/build/tools/sprints.js +318 -0
  146. package/build/tools/sprints.js.map +1 -0
  147. package/build/tools/users.d.ts +134 -0
  148. package/build/tools/users.d.ts.map +1 -0
  149. package/build/tools/users.js +183 -0
  150. package/build/tools/users.js.map +1 -0
  151. package/build/tools/v2/attachment.d.ts +3 -0
  152. package/build/tools/v2/attachment.d.ts.map +1 -0
  153. package/build/tools/v2/attachment.js +25 -0
  154. package/build/tools/v2/attachment.js.map +1 -0
  155. package/build/tools/v2/board.d.ts +3 -0
  156. package/build/tools/v2/board.d.ts.map +1 -0
  157. package/build/tools/v2/board.js +64 -0
  158. package/build/tools/v2/board.js.map +1 -0
  159. package/build/tools/v2/comment.d.ts +3 -0
  160. package/build/tools/v2/comment.d.ts.map +1 -0
  161. package/build/tools/v2/comment.js +41 -0
  162. package/build/tools/v2/comment.js.map +1 -0
  163. package/build/tools/v2/dispatcher.d.ts +19 -0
  164. package/build/tools/v2/dispatcher.d.ts.map +1 -0
  165. package/build/tools/v2/dispatcher.js +255 -0
  166. package/build/tools/v2/dispatcher.js.map +1 -0
  167. package/build/tools/v2/epic.d.ts +3 -0
  168. package/build/tools/v2/epic.d.ts.map +1 -0
  169. package/build/tools/v2/epic.js +34 -0
  170. package/build/tools/v2/epic.js.map +1 -0
  171. package/build/tools/v2/field.d.ts +3 -0
  172. package/build/tools/v2/field.d.ts.map +1 -0
  173. package/build/tools/v2/field.js +26 -0
  174. package/build/tools/v2/field.js.map +1 -0
  175. package/build/tools/v2/filter.d.ts +3 -0
  176. package/build/tools/v2/filter.d.ts.map +1 -0
  177. package/build/tools/v2/filter.js +55 -0
  178. package/build/tools/v2/filter.js.map +1 -0
  179. package/build/tools/v2/group.d.ts +3 -0
  180. package/build/tools/v2/group.d.ts.map +1 -0
  181. package/build/tools/v2/group.js +40 -0
  182. package/build/tools/v2/group.js.map +1 -0
  183. package/build/tools/v2/index.d.ts +16 -0
  184. package/build/tools/v2/index.d.ts.map +1 -0
  185. package/build/tools/v2/index.js +121 -0
  186. package/build/tools/v2/index.js.map +1 -0
  187. package/build/tools/v2/issue.d.ts +3 -0
  188. package/build/tools/v2/issue.d.ts.map +1 -0
  189. package/build/tools/v2/issue.js +78 -0
  190. package/build/tools/v2/issue.js.map +1 -0
  191. package/build/tools/v2/link.d.ts +3 -0
  192. package/build/tools/v2/link.d.ts.map +1 -0
  193. package/build/tools/v2/link.js +29 -0
  194. package/build/tools/v2/link.js.map +1 -0
  195. package/build/tools/v2/project.d.ts +3 -0
  196. package/build/tools/v2/project.d.ts.map +1 -0
  197. package/build/tools/v2/project.js +101 -0
  198. package/build/tools/v2/project.js.map +1 -0
  199. package/build/tools/v2/search.d.ts +3 -0
  200. package/build/tools/v2/search.d.ts.map +1 -0
  201. package/build/tools/v2/search.js +43 -0
  202. package/build/tools/v2/search.js.map +1 -0
  203. package/build/tools/v2/server.d.ts +3 -0
  204. package/build/tools/v2/server.d.ts.map +1 -0
  205. package/build/tools/v2/server.js +13 -0
  206. package/build/tools/v2/server.js.map +1 -0
  207. package/build/tools/v2/sprint.d.ts +3 -0
  208. package/build/tools/v2/sprint.d.ts.map +1 -0
  209. package/build/tools/v2/sprint.js +67 -0
  210. package/build/tools/v2/sprint.js.map +1 -0
  211. package/build/tools/v2/user.d.ts +3 -0
  212. package/build/tools/v2/user.d.ts.map +1 -0
  213. package/build/tools/v2/user.js +48 -0
  214. package/build/tools/v2/user.js.map +1 -0
  215. package/build/tools/v2/watcher.d.ts +3 -0
  216. package/build/tools/v2/watcher.d.ts.map +1 -0
  217. package/build/tools/v2/watcher.js +31 -0
  218. package/build/tools/v2/watcher.js.map +1 -0
  219. package/build/tools/v2/worklog.d.ts +3 -0
  220. package/build/tools/v2/worklog.d.ts.map +1 -0
  221. package/build/tools/v2/worklog.js +55 -0
  222. package/build/tools/v2/worklog.js.map +1 -0
  223. package/build/tools/watchers.d.ts +35 -0
  224. package/build/tools/watchers.d.ts.map +1 -0
  225. package/build/tools/watchers.js +156 -0
  226. package/build/tools/watchers.js.map +1 -0
  227. package/build/tools/worklogs.d.ts +167 -0
  228. package/build/tools/worklogs.d.ts.map +1 -0
  229. package/build/tools/worklogs.js +266 -0
  230. package/build/tools/worklogs.js.map +1 -0
  231. package/build/types/jira.d.ts +337 -0
  232. package/build/types/jira.d.ts.map +1 -0
  233. package/build/types/jira.js +3 -0
  234. package/build/types/jira.js.map +1 -0
  235. package/build/types/refs.d.ts +14 -0
  236. package/build/types/refs.d.ts.map +1 -0
  237. package/build/types/refs.js +10 -0
  238. package/build/types/refs.js.map +1 -0
  239. package/package.json +52 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Scott Lepper
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/README.md ADDED
@@ -0,0 +1,167 @@
1
+ # Ultra Jira MCP Server/CLI
2
+
3
+ A Token Efficient, Low Context, Model Context Protocol (MCP) server or CLI that gives AI agents access to Jira Cloud via the REST API v3 and Agile API 1.0.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npx ultra-jira-mcp
9
+ ```
10
+
11
+ Or globally:
12
+
13
+ ```bash
14
+ npm install -g ultra-jira-mcp
15
+ ```
16
+
17
+ ## Configuration
18
+
19
+ Set these environment variables on the server process. With Claude Desktop or Claude Code that means the `env` block on the MCP server config.
20
+
21
+ | Variable | Description | Required |
22
+ |---|---|---|
23
+ | `JIRA_HOST` | Jira instance URL (e.g. `https://yourcompany.atlassian.net`) | Yes |
24
+ | `JIRA_EMAIL` | Atlassian account email | Yes |
25
+ | `JIRA_API_TOKEN` | API token from [Atlassian Account Settings](https://id.atlassian.com/manage-profile/security/api-tokens) | Yes |
26
+ | `JIRA_CLOUD_ID` | Cloud ID for scoped (ATATT/ATSTT) tokens; auto-fetched if omitted | No |
27
+ | `JIRA_TOOL_MODE` | `"classic"` (default — 16 consolidated tools) or `"code-api"` (one tool, agent drives via the bundled `jira-cli` shell binary) | No |
28
+ | `JIRA_ENABLED_CATEGORIES` | Comma-separated category whitelist. Empty = all 16 categories enabled. | No |
29
+ | `JIRA_DISABLED_ACTIONS` | Comma-separated `category.action` blacklist. Enforced at the dispatch layer in **both** modes. | No |
30
+
31
+ ### Claude Desktop / Claude Code setup
32
+
33
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or your `~/.claude.json`:
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "jira": {
39
+ "command": "npx",
40
+ "args": ["-y", "ultra-jira-mcp"],
41
+ "env": {
42
+ "JIRA_HOST": "https://yourcompany.atlassian.net",
43
+ "JIRA_EMAIL": "your-email@example.com",
44
+ "JIRA_API_TOKEN": "your-api-token"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ ```
50
+
51
+ ## Tool surface
52
+
53
+ Default mode is **classic**: 16 consolidated MCP tools, each taking an `action` argument plus action-specific args. For example `jira_issue` covers `get`, `create`, `update`, `delete`, `bulkCreate`, `listTransitions`, `transition`, `assign`, `changelog` — discriminated by `action: "..."`.
54
+
55
+ ### The 16 tools and their actions
56
+
57
+ | Tool | Actions |
58
+ |---|---|
59
+ | `jira_issue` | get, create, update, delete, bulkCreate, listTransitions, transition, assign, changelog |
60
+ | `jira_search` | issues, jqlAutocompleteData, jqlSuggestions |
61
+ | `jira_comment` | list, add, update, delete |
62
+ | `jira_user` | myself, search, get, assignable, bulkGet |
63
+ | `jira_project` | list, get, create, update, delete, listComponents, createComponent, listVersions, createVersion, updateVersion, statuses |
64
+ | `jira_board` | list, get, create, delete, configuration, issues, backlog, epics |
65
+ | `jira_sprint` | listForBoard, get, create, update, delete, issues, moveIssues, moveIssuesToBacklog |
66
+ | `jira_epic` | get, issues, moveIn, removeFromCurrent |
67
+ | `jira_worklog` | list, add, update, delete |
68
+ | `jira_attachment` | get, delete, meta |
69
+ | `jira_filter` | list, get, create, update, delete, listFavourite |
70
+ | `jira_link` | create, get, delete, types |
71
+ | `jira_watcher` | list, add, remove, listVotes, addVote, removeVote |
72
+ | `jira_field` | list, issueTypes, priorities, statuses, resolutions, createMeta |
73
+ | `jira_group` | search, members, myPermissions |
74
+ | `jira_server` | info |
75
+
76
+ Every action returns a trimmed summary (e.g. `IssueSummary` with key, status, assignee, recent comments, attachment list) plus the full untrimmed body written to disk under `${TMPDIR}/jira-mcp/${session}/`. Agents read the full response only when they need the detail.
77
+
78
+ ### Tool filtering
79
+
80
+ Two env vars cut the tool-list cost paid every conversation:
81
+
82
+ ```json
83
+ "env": {
84
+ "JIRA_ENABLED_CATEGORIES": "issue,search,comment",
85
+ "JIRA_DISABLED_ACTIONS": "issue.delete,project.delete"
86
+ }
87
+ ```
88
+
89
+ - `JIRA_ENABLED_CATEGORIES` — whitelist of consolidated tool categories (the part after `jira_`). Tools outside the whitelist drop from the listing.
90
+ - `JIRA_DISABLED_ACTIONS` — `category.action` pairs (manifest operation names like `issue.delete`, `permissions.mine`, `vote.add`). Disabled actions are stripped from each tool's `oneOf` schema **and** rejected at dispatch time, so they're blocked even in code-api mode.
91
+
92
+ Concrete numbers from a recent benchmark run on a real Jira instance:
93
+
94
+ | filter | tool-list bytes | ~tokens | factor |
95
+ |---|---|---|---|
96
+ | none (16 tools) | 30.6KB | ~7,800 | 1× |
97
+ | 3 categories | 6.3KB | ~1,600 | 5× |
98
+ | 3 cats + 5 disabled actions | 4.6KB | ~1,200 | 6.6× |
99
+ | code-api mode (1 tool) | 0.4KB | ~100 | 76× |
100
+
101
+ For the full v1-vs-v2 picture (per-call cost, three scenarios, ratios) see [docs/BENCHMARK.md](docs/BENCHMARK.md).
102
+
103
+ ### code-api mode (recommended for shell-capable agents)
104
+
105
+ If your agent can run shell commands (Claude Code, etc.), set `JIRA_TOOL_MODE=code-api` for a ~76× smaller tool-list footprint paid on every conversation. Per-call cost is essentially the same as classic, so the savings are pure win once your agent is making more than a few Jira calls.
106
+
107
+ Set `JIRA_TOOL_MODE=code-api` to expose a single MCP tool, `jira_code_api`. Calling it returns the path to the bundled `jira-cli` binary plus the `JIRA_MCP_SOCKET` address. The agent then drives Jira from a shell:
108
+
109
+ ```bash
110
+ JIRA_MCP_SOCKET=/tmp/jira-mcp/${session}/ipc.sock \
111
+ node <cli-path> issue.get --issueIdOrKey=PROJ-1
112
+ # stdout: trimmed summary as JSON, then a final `ref: /path` line
113
+ # pointing at the full response on disk (`cat` it for detail).
114
+ ```
115
+
116
+ Discovery: `node <cli-path> --help` lists every operation; `node <cli-path> <op> --help` lists its flags.
117
+
118
+ Stays as `classic` by default because tool-only MCP clients (no shell access) can't drive `jira-cli`. See [docs/MIGRATION.md](docs/MIGRATION.md#code-api-mode) for the full flow.
119
+
120
+ ### Standalone CLI (no MCP server)
121
+
122
+ The same `jira-cli` binary works without an MCP server. Set `JIRA_HOST` / `JIRA_EMAIL` / `JIRA_API_TOKEN` in your shell (or a `.env.local` in the cwd) and invoke it directly:
123
+
124
+ ```bash
125
+ export JIRA_HOST=https://yourcompany.atlassian.net
126
+ export JIRA_EMAIL=you@example.com
127
+ export JIRA_API_TOKEN=...
128
+ npx -y -p github:scottlepp/ultra-jira-mcp#codeapi jira-cli issue.get --issueIdOrKey=PROJ-1
129
+ ```
130
+
131
+ The CLI auto-selects between **bridge mode** (`JIRA_MCP_SOCKET` set, talks to a running server) and **direct mode** (no socket, builds a `JiraClient` in-process). Same trim + ref output either way; credentials never leave the CLI's `process.env`, so they don't enter the agent's context.
132
+
133
+ For Claude Code users, install the skill once so the agent discovers the CLI on its own:
134
+
135
+ ```bash
136
+ npx -y -p github:scottlepp/ultra-jira-mcp#codeapi jira-cli install-skill
137
+ ```
138
+
139
+ This writes `~/.claude/skills/jira/SKILL.md`. The skill loads on demand whenever the user mentions Jira and teaches the agent the canonical invocation, common operations, and `--help` discovery. Re-run with `--force` to update; `--print` dumps the rendered SKILL.md to stdout without writing.
140
+
141
+ ## Resources
142
+
143
+ The server also exposes Jira data via MCP resources:
144
+
145
+ - `jira://projects` — list of accessible projects
146
+ - `jira://project/{key}` — project details
147
+ - `jira://issue/{key}` — issue details
148
+ - `jira://boards` — all boards
149
+ - `jira://board/{id}` — board details
150
+ - `jira://sprint/{id}` — sprint details
151
+ - `jira://myself` — current user
152
+
153
+ ## Development
154
+
155
+ ```bash
156
+ npm install
157
+ npm run build # tsc → build/
158
+ npm test # vitest, ~400 unit tests, no live Jira
159
+ npm run benchmark # measures tool-list + per-call bytes against live Jira
160
+ npm run inspector # @modelcontextprotocol/inspector against build/index.js
161
+ ```
162
+
163
+ The benchmark requires `.env.local` with the regular `JIRA_*` vars plus `JIRA_BENCH_TICKET_RICH` and `JIRA_BENCH_TICKET_SIMPLE` keys. To include v1 in the comparison, set up a sibling worktree once: `git worktree add ../ultra-jira-mcp-v1 v1.0.0 && (cd ../ultra-jira-mcp-v1 && npm install && npm run build)`. See [docs/BENCHMARK.md](docs/BENCHMARK.md) for the latest numbers.
164
+
165
+ ## License
166
+
167
+ MIT
@@ -0,0 +1,59 @@
1
+ import { JiraConfig } from "../config.js";
2
+ export interface JiraRequestOptions {
3
+ method?: "GET" | "POST" | "PUT" | "DELETE";
4
+ body?: unknown;
5
+ queryParams?: Record<string, string | number | boolean | undefined>;
6
+ }
7
+ export interface JiraErrorResponse {
8
+ errorMessages?: string[];
9
+ errors?: Record<string, string>;
10
+ }
11
+ export declare class JiraApiError extends Error {
12
+ statusCode: number;
13
+ response?: JiraErrorResponse | undefined;
14
+ constructor(message: string, statusCode: number, response?: JiraErrorResponse | undefined);
15
+ }
16
+ export declare class JiraClient {
17
+ private config;
18
+ private cloudId;
19
+ private initPromise;
20
+ private readonly metadataCache;
21
+ constructor(config: JiraConfig);
22
+ /**
23
+ * Initialize the client by fetching the cloudId if needed (for scoped tokens)
24
+ */
25
+ private ensureInitialized;
26
+ /**
27
+ * Fetch the cloudId from the tenant_info endpoint, preferring a
28
+ * cached value on disk (24h TTL) to avoid the network hop on warm
29
+ * starts. Works for both scoped tokens and classic tokens.
30
+ */
31
+ private fetchCloudId;
32
+ /**
33
+ * Build the appropriate URL based on token type
34
+ */
35
+ private buildUrl;
36
+ /**
37
+ * Get the appropriate authorization header
38
+ * Both classic and scoped tokens use Basic authentication (email:token)
39
+ */
40
+ private getAuthHeader;
41
+ /**
42
+ * Public accessor for the auth header. Used by side-channel clients
43
+ * (attachment downloader) that need to make authenticated requests
44
+ * outside the main request pipeline. Callers are trusted — never
45
+ * expose this value to a response payload or log.
46
+ */
47
+ getAuthorizationHeader(): string;
48
+ private metadataCacheKey;
49
+ private request;
50
+ get<T>(path: string, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T>;
51
+ post<T>(path: string, body?: unknown, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T>;
52
+ put<T>(path: string, body?: unknown, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T>;
53
+ delete<T>(path: string, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T>;
54
+ agileGet<T>(path: string, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T>;
55
+ agilePost<T>(path: string, body?: unknown, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T>;
56
+ agilePut<T>(path: string, body?: unknown, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T>;
57
+ agileDelete<T>(path: string, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T>;
58
+ }
59
+ //# sourceMappingURL=jira-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jira-client.d.ts","sourceRoot":"","sources":["../../src/auth/jira-client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,qBAAa,YAAa,SAAQ,KAAK;IAG5B,UAAU,EAAE,MAAM;IAClB,QAAQ,CAAC,EAAE,iBAAiB;gBAFnC,OAAO,EAAE,MAAM,EACR,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,iBAAiB,YAAA;CAKtC;AAg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AC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,GAClE,OAAO,CAAC,CAAC,CAAC;IAIP,SAAS,CAAC,CAAC,EACf,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,GAClE,OAAO,CAAC,CAAC,CAAC;IAIP,QAAQ,CAAC,CAAC,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,GAClE,OAAO,CAAC,CAAC,CAAC;IAIP,WAAW,CAAC,CAAC,EACjB,IAAI,EAAE,MAAM,EACZ,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,GAClE,OAAO,CAAC,CAAC,CAAC;CAGd"}
@@ -0,0 +1,267 @@
1
+ import { httpRequest } from "@scottlepper/mcp-toolkit/transport";
2
+ import { TtlLruCache } from "@scottlepper/mcp-toolkit/lru";
3
+ import { readTenantCache, writeTenantCache } from "../core/tenant-cache.js";
4
+ export class JiraApiError extends Error {
5
+ statusCode;
6
+ response;
7
+ constructor(message, statusCode, response) {
8
+ super(message);
9
+ this.statusCode = statusCode;
10
+ this.response = response;
11
+ this.name = "JiraApiError";
12
+ }
13
+ }
14
+ // Metadata endpoints whose responses rarely change within a session.
15
+ // GET requests to these paths are served from an in-memory LRU for the
16
+ // TTL. Everything else bypasses the cache.
17
+ const METADATA_PATHS = new Set([
18
+ "/field",
19
+ "/issuetype",
20
+ "/priority",
21
+ "/status",
22
+ "/resolution",
23
+ ]);
24
+ const METADATA_TTL_MS = 5 * 60 * 1000;
25
+ const METADATA_MAX_SIZE = 64;
26
+ export class JiraClient {
27
+ config;
28
+ cloudId = null;
29
+ initPromise = null;
30
+ metadataCache = new TtlLruCache({
31
+ maxSize: METADATA_MAX_SIZE,
32
+ ttlMs: METADATA_TTL_MS,
33
+ });
34
+ constructor(config) {
35
+ this.config = config;
36
+ // If cloudId is provided in config, use it directly
37
+ if (config.cloudId) {
38
+ this.cloudId = config.cloudId;
39
+ }
40
+ }
41
+ /**
42
+ * Initialize the client by fetching the cloudId if needed (for scoped tokens)
43
+ */
44
+ async ensureInitialized() {
45
+ // Classic tokens don't need initialization
46
+ if (this.config.tokenType === "classic") {
47
+ return;
48
+ }
49
+ // Already have cloudId
50
+ if (this.cloudId) {
51
+ return;
52
+ }
53
+ // Prevent multiple parallel initializations. On rejection, clear
54
+ // the promise so the next call can retry — otherwise a transient
55
+ // init failure (network blip, 5xx on tenant_info) would leave the
56
+ // client permanently broken.
57
+ if (this.initPromise) {
58
+ return this.initPromise;
59
+ }
60
+ this.initPromise = this.fetchCloudId().catch((err) => {
61
+ this.initPromise = null;
62
+ throw err;
63
+ });
64
+ return this.initPromise;
65
+ }
66
+ /**
67
+ * Fetch the cloudId from the tenant_info endpoint, preferring a
68
+ * cached value on disk (24h TTL) to avoid the network hop on warm
69
+ * starts. Works for both scoped tokens and classic tokens.
70
+ */
71
+ async fetchCloudId() {
72
+ // Disk cache first.
73
+ try {
74
+ const cached = await readTenantCache(this.config.host);
75
+ if (cached) {
76
+ this.cloudId = cached;
77
+ return;
78
+ }
79
+ }
80
+ catch {
81
+ // Cache read failure is non-fatal — fall through to the network.
82
+ }
83
+ const tenantInfoUrl = `${this.config.host}/_edge/tenant_info`;
84
+ const response = await httpRequest(tenantInfoUrl, {
85
+ method: "GET",
86
+ headers: { Accept: "application/json" },
87
+ });
88
+ const text = await response.text();
89
+ if (response.statusCode < 200 || response.statusCode >= 300) {
90
+ throw new JiraApiError(`Failed to fetch tenant info from ${tenantInfoUrl}: ${text}`, response.statusCode);
91
+ }
92
+ let tenantInfo;
93
+ try {
94
+ tenantInfo = JSON.parse(text);
95
+ }
96
+ catch {
97
+ throw new JiraApiError(`Invalid JSON from ${tenantInfoUrl}: ${text.slice(0, 200)}`, response.statusCode);
98
+ }
99
+ if (!tenantInfo.cloudId) {
100
+ throw new JiraApiError("No cloudId found in tenant info response", 500);
101
+ }
102
+ this.cloudId = tenantInfo.cloudId;
103
+ try {
104
+ await writeTenantCache(this.config.host, tenantInfo.cloudId);
105
+ }
106
+ catch {
107
+ // Cache write failure is non-fatal.
108
+ }
109
+ }
110
+ /**
111
+ * Build the appropriate URL based on token type
112
+ */
113
+ buildUrl(path, queryParams, isAgile = false) {
114
+ let baseUrl;
115
+ if (this.config.tokenType === "scoped") {
116
+ // Scoped tokens use api.atlassian.com with cloudId
117
+ const apiBase = isAgile
118
+ ? `https://api.atlassian.com/ex/jira/${this.cloudId}/rest/agile/1.0`
119
+ : `https://api.atlassian.com/ex/jira/${this.cloudId}/rest/api/3`;
120
+ baseUrl = apiBase;
121
+ }
122
+ else {
123
+ // Classic tokens use the direct site URL
124
+ const apiBase = isAgile
125
+ ? `${this.config.host}/rest/agile/1.0`
126
+ : `${this.config.host}/rest/api/3`;
127
+ baseUrl = apiBase;
128
+ }
129
+ const url = new URL(`${baseUrl}${path}`);
130
+ if (queryParams) {
131
+ Object.entries(queryParams).forEach(([key, value]) => {
132
+ if (value !== undefined) {
133
+ url.searchParams.append(key, String(value));
134
+ }
135
+ });
136
+ }
137
+ return url.toString();
138
+ }
139
+ /**
140
+ * Get the appropriate authorization header
141
+ * Both classic and scoped tokens use Basic authentication (email:token)
142
+ */
143
+ getAuthHeader() {
144
+ // Both classic and scoped tokens use Basic authentication
145
+ const credentials = Buffer.from(`${this.config.email}:${this.config.apiToken}`).toString("base64");
146
+ return `Basic ${credentials}`;
147
+ }
148
+ /**
149
+ * Public accessor for the auth header. Used by side-channel clients
150
+ * (attachment downloader) that need to make authenticated requests
151
+ * outside the main request pipeline. Callers are trusted — never
152
+ * expose this value to a response payload or log.
153
+ */
154
+ getAuthorizationHeader() {
155
+ return this.getAuthHeader();
156
+ }
157
+ metadataCacheKey(path, queryParams, isAgile) {
158
+ if (isAgile)
159
+ return null;
160
+ if (!METADATA_PATHS.has(path))
161
+ return null;
162
+ // Include queryParams in the key so different paginations don't collide.
163
+ const qs = queryParams
164
+ ? JSON.stringify(Object.entries(queryParams)
165
+ .filter(([, v]) => v !== undefined)
166
+ .sort(([a], [b]) => a.localeCompare(b)))
167
+ : "";
168
+ return `${path}?${qs}`;
169
+ }
170
+ async request(path, options = {}, isAgile = false) {
171
+ // Ensure we're initialized (fetches cloudId if needed)
172
+ await this.ensureInitialized();
173
+ const { method = "GET", body, queryParams } = options;
174
+ // Serve metadata GETs from the in-memory LRU if possible.
175
+ const cacheKey = method === "GET" ? this.metadataCacheKey(path, queryParams, isAgile) : null;
176
+ if (cacheKey) {
177
+ const hit = this.metadataCache.get(cacheKey);
178
+ if (hit !== undefined)
179
+ return hit;
180
+ }
181
+ const url = this.buildUrl(path, queryParams, isAgile);
182
+ const headers = {
183
+ Authorization: this.getAuthHeader(),
184
+ Accept: "application/json",
185
+ };
186
+ if (body) {
187
+ headers["Content-Type"] = "application/json";
188
+ }
189
+ const response = await httpRequest(url, {
190
+ method,
191
+ headers,
192
+ body: body !== undefined ? JSON.stringify(body) : undefined,
193
+ });
194
+ // Handle no content responses
195
+ if (response.statusCode === 204) {
196
+ return {};
197
+ }
198
+ // Get response text first to handle both JSON and non-JSON responses
199
+ const responseText = await response.text();
200
+ // Try to parse as JSON
201
+ let data;
202
+ let parseError;
203
+ if (responseText) {
204
+ try {
205
+ data = JSON.parse(responseText);
206
+ }
207
+ catch (e) {
208
+ parseError = e;
209
+ // If it's not JSON, treat the text as the response/error message
210
+ }
211
+ }
212
+ const ok = response.statusCode >= 200 && response.statusCode < 300;
213
+ if (!ok) {
214
+ let errorMessage;
215
+ if (data && typeof data === "object") {
216
+ const errorData = data;
217
+ errorMessage =
218
+ errorData.errorMessages?.join(", ") ||
219
+ Object.values(errorData.errors || {}).join(", ") ||
220
+ `HTTP ${response.statusCode}`;
221
+ throw new JiraApiError(errorMessage, response.statusCode, errorData);
222
+ }
223
+ else {
224
+ errorMessage = responseText || `HTTP ${response.statusCode}`;
225
+ throw new JiraApiError(errorMessage, response.statusCode, {
226
+ errorMessages: [errorMessage],
227
+ });
228
+ }
229
+ }
230
+ // For successful responses
231
+ if (parseError && responseText) {
232
+ // Non-JSON successful response (like file downloads)
233
+ return responseText;
234
+ }
235
+ const result = (data ?? {});
236
+ if (cacheKey)
237
+ this.metadataCache.set(cacheKey, result);
238
+ return result;
239
+ }
240
+ // Platform API (REST API v3)
241
+ async get(path, queryParams) {
242
+ return this.request(path, { method: "GET", queryParams }, false);
243
+ }
244
+ async post(path, body, queryParams) {
245
+ return this.request(path, { method: "POST", body, queryParams }, false);
246
+ }
247
+ async put(path, body, queryParams) {
248
+ return this.request(path, { method: "PUT", body, queryParams }, false);
249
+ }
250
+ async delete(path, queryParams) {
251
+ return this.request(path, { method: "DELETE", queryParams }, false);
252
+ }
253
+ // Agile API (REST Agile 1.0)
254
+ async agileGet(path, queryParams) {
255
+ return this.request(path, { method: "GET", queryParams }, true);
256
+ }
257
+ async agilePost(path, body, queryParams) {
258
+ return this.request(path, { method: "POST", body, queryParams }, true);
259
+ }
260
+ async agilePut(path, body, queryParams) {
261
+ return this.request(path, { method: "PUT", body, queryParams }, true);
262
+ }
263
+ async agileDelete(path, queryParams) {
264
+ return this.request(path, { method: "DELETE", queryParams }, true);
265
+ }
266
+ }
267
+ //# sourceMappingURL=jira-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jira-client.js","sourceRoot":"","sources":["../../src/auth/jira-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAc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AAI,CAAC,OAAO,CAAI,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,CAAC;IAC5E,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,IAAY,EACZ,IAAc,EACd,WAAmE;QAEnE,OAAO,IAAI,CAAC,OAAO,CAAI,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,CAAC;IAC3E,CAAC;IAED,KAAK,CAAC,WAAW,CACf,IAAY,EACZ,WAAmE;QAEnE,OAAO,IAAI,CAAC,OAAO,CAAI,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;CACF"}
@@ -0,0 +1,5 @@
1
+ import type { SandboxResult } from "../types/refs.js";
2
+ export interface DirectCallResult extends SandboxResult<unknown> {
3
+ }
4
+ export declare function callDirect(operation: string, args: Record<string, unknown>): Promise<DirectCallResult>;
5
+ //# sourceMappingURL=direct.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"direct.d.ts","sourceRoot":"","sources":["../../src/cli/direct.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,WAAW,gBAAiB,SAAQ,aAAa,CAAC,OAAO,CAAC;CAAG;AAUnE,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,gBAAgB,CAAC,CAa3B"}
@@ -0,0 +1,47 @@
1
+ // Direct mode for jira-cli — talk to Jira without an MCP server.
2
+ //
3
+ // When JIRA_MCP_SOCKET is set, the CLI forwards every call over the
4
+ // IPC bridge to a running jira-mcp server. That's the supported flow
5
+ // for agents driven by an MCP host (Claude Code, Claude Desktop).
6
+ //
7
+ // When JIRA_MCP_SOCKET is *not* set, this module kicks in: the CLI
8
+ // reads JIRA_HOST / JIRA_EMAIL / JIRA_API_TOKEN from its own
9
+ // environment, builds a JiraClient locally, and dispatches the
10
+ // operation through the same `invokeAndSandbox` primitive the bridge
11
+ // uses on the server side. Result: identical trim + ref behaviour,
12
+ // no server process required.
13
+ //
14
+ // Why expose this:
15
+ // - Some users want a CLI without standing up an MCP host. Same
16
+ // credentials, same env var names — just `jira-cli <op> ...`
17
+ // from any shell.
18
+ // - Lets the agent fall through to a working call when its MCP
19
+ // handshake hasn't run, instead of erroring with "JIRA_MCP_SOCKET
20
+ // not set".
21
+ //
22
+ // Credential isolation: the agent never sees JIRA_API_TOKEN. It
23
+ // invokes `jira-cli ...`; the CLI process inherits env from whatever
24
+ // shell spawned it. Same trust boundary the MCP-server path has —
25
+ // the difference is just *where* the JiraClient lives (in this
26
+ // process vs. in the MCP server's process).
27
+ import { JiraClient } from "../auth/jira-client.js";
28
+ import { getConfig } from "../config.js";
29
+ import { operations } from "../core/operations.js";
30
+ import { invokeAndSandbox } from "../codeapi/bridge.js";
31
+ // Run one operation against the local JiraClient and return the
32
+ // same SandboxResult shape the bridge would emit. Throws on missing
33
+ // env / invalid args / Jira API errors — the CLI's main() turns
34
+ // those into a stderr message + non-zero exit.
35
+ //
36
+ // disabledActions is read from the same JIRA_DISABLED_ACTIONS env
37
+ // var the MCP server honors, so a user who relies on it for safety
38
+ // gets the same guarantee in direct mode.
39
+ export async function callDirect(operation, args) {
40
+ // getConfig() loads .env / .env.local (via dotenv), validates the
41
+ // required Jira creds, and returns a JiraConfig. Any missing var
42
+ // throws a clear error message that the CLI surfaces verbatim.
43
+ const config = getConfig();
44
+ const client = new JiraClient(config);
45
+ return invokeAndSandbox(operations, client, operation, args, config.toolFilter.disabledActions);
46
+ }
47
+ //# sourceMappingURL=direct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"direct.js","sourceRoot":"","sources":["../../src/cli/direct.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,oEAAoE;AACpE,qEAAqE;AACrE,kEAAkE;AAClE,EAAE;AACF,mEAAmE;AACnE,6DAA6D;AAC7D,+DAA+D;AAC/D,qEAAqE;AACrE,mEAAmE;AACnE,8BAA8B;AAC9B,EAAE;AACF,mBAAmB;AACnB,kEAAkE;AAClE,iEAAiE;AACjE,sBAAsB;AACtB,iEAAiE;AACjE,sEAAsE;AACtE,gBAAgB;AAChB,EAAE;AACF,gEAAgE;AAChE,qEAAqE;AACrE,kEAAkE;AAClE,+DAA+D;AAC/D,4CAA4C;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAKxD,gEAAgE;AAChE,oEAAoE;AACpE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,SAAiB,EACjB,IAA6B;IAE7B,kEAAkE;IAClE,iEAAiE;IACjE,+DAA+D;IAC/D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO,gBAAgB,CACrB,UAAU,EACV,MAAM,EACN,SAAS,EACT,IAAI,EACJ,MAAM,CAAC,UAAU,CAAC,eAAe,CAClC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ // jira-cli — shell client for Jira.
3
+ //
4
+ // All argv parsing, help rendering, bridge round-trip, install-skill
5
+ // dispatch, and the trimmed-summary + `ref:` stdout layout live in
6
+ // `@scottlepper/mcp-toolkit/cli`. This file wires in the Jira-specific
7
+ // bits: the operation manifest, the direct-mode handler (which builds
8
+ // a JiraClient in-process when no socket is configured), the SKILL.md
9
+ // content, and the env vars to mention in the help text.
10
+ import { createCli } from "@scottlepper/mcp-toolkit/cli";
11
+ import { operations } from "../core/operations.js";
12
+ import { callDirect } from "./direct.js";
13
+ import { SKILL_CONTENT } from "./install-skill.js";
14
+ const cli = createCli({
15
+ cliName: "jira-cli",
16
+ socketEnvVar: "JIRA_MCP_SOCKET",
17
+ manifest: operations,
18
+ callDirect,
19
+ skillContent: SKILL_CONTENT,
20
+ skillSlug: "jira",
21
+ directModeEnvVars: ["JIRA_HOST", "JIRA_EMAIL", "JIRA_API_TOKEN"],
22
+ });
23
+ void cli.run(process.argv.slice(2)).then((code) => process.exit(code), (err) => {
24
+ process.stderr.write(`jira-cli: unexpected error: ${err.stack ?? err}\n`);
25
+ process.exit(1);
26
+ });
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AACA,oCAAoC;AACpC,EAAE;AACF,qEAAqE;AACrE,mEAAmE;AACnE,uEAAuE;AACvE,sEAAsE;AACtE,sEAAsE;AACtE,yDAAyD;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,GAAG,GAAG,SAAS,CAAC;IACpB,OAAO,EAAE,UAAU;IACnB,YAAY,EAAE,iBAAiB;IAC/B,QAAQ,EAAE,UAAU;IACpB,UAAU;IACV,YAAY,EAAE,aAAa;IAC3B,SAAS,EAAE,MAAM;IACjB,iBAAiB,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,gBAAgB,CAAC;CACjE,CAAC,CAAC;AAEH,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CACtC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAC5B,CAAC,GAAG,EAAE,EAAE;IACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,+BAAgC,GAAa,CAAC,KAAK,IAAI,GAAG,IAAI,CAC/D,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type InstallSkillResult } from "@scottlepper/mcp-toolkit/cli";
2
+ export declare const SKILL_CONTENT = "---\nname: jira\ndescription: >-\n Query Jira tickets, comments, sprints, boards, and JQL searches via the\n bundled jira-cli shell binary. Use when the user mentions Jira/JIRA,\n asks to look up a ticket by key, references JQL, or asks about sprint\n or board state.\n---\n# Jira CLI\n\nQuery Jira from the shell via `jira-cli`. Run it with `npx`:\n\n```bash\nnpx -y -p github:scottlepp/ultra-jira-mcp#codeapi jira-cli <op> [--flag=value ...]\n```\n\n## First call in a session\n\nRun `jira-cli --help` once to see every operation. The list is stable\nacross calls \u2014 don't re-fetch it on every Jira task.\n\nFor a specific operation's flags: `jira-cli <op> --help`.\n\n## Common operations\n\n- `issue.get --issueIdOrKey=KEY-123` \u2014 fetch one ticket\n- `search.issues --jql='project = PROJ ORDER BY updated DESC' --fields=summary,status --maxResults=10` \u2014 JQL search\n- `comment.list --issueIdOrKey=KEY-123 --maxResults=100` \u2014 list comments\n- `issue.create --summary='...' --projectKey=PROJ --issueType=Task` \u2014 create a ticket\n\n## Subtasks\n\nSubtasks aren't a JQL link type. To find children of KEY-123, use\n`parent = \"KEY-123\"` in JQL on `search.issues`. The parent's own\n`fields.subtasks` array (visible in `issue.get`'s response) is also fine.\n\n## Output shape\n\nEvery successful call prints:\n\n1. A trimmed summary as JSON on stdout (the fields agents usually need \u2014\n key, summary, status, description, etc.)\n2. A final line of the form `ref: /path/to/full.json` pointing at the\n complete untrimmed Jira response on disk. `cat` that file when the\n summary leaves out detail you need.\n\n## Credentials\n\nThe CLI reads `JIRA_HOST`, `JIRA_EMAIL`, and `JIRA_API_TOKEN` from its\nown environment (or a `.env.local` in the cwd). The agent never sees\nthese \u2014 the user exports them in their shell once. If a call fails with\n\"Missing required environment variables\", ask the user to set them; do\nnot put them on the command line.\n\n## Disabled actions\n\n`JIRA_DISABLED_ACTIONS` (e.g. `issue.delete,project.delete`) is honored\nend-to-end. Calls to disabled operations error before any HTTP request.\n";
3
+ export interface InstallSkillOpts {
4
+ force?: boolean;
5
+ print?: boolean;
6
+ targetDir?: string;
7
+ }
8
+ export type { InstallSkillResult };
9
+ export declare function installSkill(opts?: InstallSkillOpts): Promise<InstallSkillResult>;
10
+ //# sourceMappingURL=install-skill.d.ts.map