@kavinga/commerce-tools 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +44 -3
  2. package/package.json +19 -1
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # commerce-tools
2
2
 
3
- A modular AI tooling platform for Adobe Commerce operations, monitoring, and security analysis. Provides a New Relic MCP server for NRQL query execution, plus a composable framework of agents, skills, commands, and providers for building AI-powered Commerce workflows.
3
+ A modular AI tooling platform for Adobe Commerce operations, monitoring, and security analysis. Provides New Relic and Jira MCP servers, plus a composable framework of agents, skills, commands, and providers for building AI-powered Commerce workflows.
4
4
 
5
5
  ## Features
6
6
 
7
7
  - **New Relic MCP Server** — executes NRQL queries via NerdGraph and maps Adobe Commerce project IDs to New Relic account IDs
8
+ - **Jira MCP Server** — fetches a Jira issue by key and extracts any New Relic account/project id mentioned in its description or comments
9
+ - **Jira → New Relic Triage Workflow** — a `work-on-ticket` command and `jira-newrelic-triage` skill that chain the two MCP servers to investigate a ticket end-to-end
8
10
  - **Commerce & Security Prompts** — built-in specialist prompts for APM monitoring, performance analysis, and attack detection (brute force, SQLi, XSS, DDoS, scraping, carding)
9
11
  - **Agent Framework** — automatic tool-use loop with conversation history management and configurable iteration limits
10
12
  - **Pluggable Providers** — abstract provider interface supports Claude and other LLM backends
@@ -18,7 +20,8 @@ commerce-tools/
18
20
  ├── agents/ # Agent implementations (extend BaseAgent)
19
21
  ├── commands/ # CLI command registry
20
22
  ├── core/ # Runtime: router, tool-runner, session, hooks
21
- ├── mcps/ # MCP servers (New Relic NRQL)
23
+ ├── mcps/ # MCP servers (New Relic NRQL, Jira)
24
+ ├── plugins/ # Claude/Cursor plugin build (commands, skills, mcp config)
22
25
  ├── providers/ # AI provider implementations and base types
23
26
  ├── skills/ # Skill registry and loaders
24
27
  ├── dist/ # Compiled output (generated)
@@ -32,6 +35,7 @@ commerce-tools/
32
35
 
33
36
  - Node.js 18+
34
37
  - A New Relic account with a [NerdGraph API key](https://docs.newrelic.com/docs/apis/nerdgraph/get-started/introduction-new-relic-nerdgraph/)
38
+ - A Jira Cloud site with an [API token](https://id.atlassian.com/manage-profile/security/api-tokens) (only needed for the Jira MCP server)
35
39
 
36
40
  ### Installation
37
41
 
@@ -52,6 +56,9 @@ cp .env.example .env
52
56
  | `NEW_RELIC_API_KEY` | NerdGraph API key |
53
57
  | `NEW_RELIC_REGION` | `us` or `eu` (default: `us`) |
54
58
  | `NEW_RELIC_ACCOUNT_ID` | Optional default account ID |
59
+ | `JIRA_BASE_URL` | Jira site URL, e.g. `https://yourcompany.atlassian.net` |
60
+ | `JIRA_EMAIL` | Email of the account owning the API token |
61
+ | `JIRA_API_TOKEN` | Jira API token |
55
62
  | `MCP_TRANSPORT` | Transport mode (default: `stdio`) |
56
63
 
57
64
  ### Build
@@ -68,12 +75,21 @@ npm start
68
75
  node dist/mcps/newrelic/server.js
69
76
  ```
70
77
 
78
+ ### Run the Jira MCP server
79
+
80
+ ```bash
81
+ npm run start:jira
82
+ # or directly:
83
+ node dist/mcps/jira/server.js
84
+ ```
85
+
71
86
  ## Using with Claude Code
72
87
 
73
- The `.mcp.json` file configures the New Relic MCP server for use with Claude Code. To register it:
88
+ The `.mcp.json` file configures both the New Relic and Jira MCP servers for use with Claude Code. To register them manually instead:
74
89
 
75
90
  ```bash
76
91
  claude mcp add newrelic -- node /path/to/commerce-tools/dist/mcps/newrelic/server.js
92
+ claude mcp add jira -- node /path/to/commerce-tools/dist/mcps/jira/server.js
77
93
  ```
78
94
 
79
95
  Or reference the existing `.mcp.json` in your Claude Code project settings. Once connected, Claude can:
@@ -82,6 +98,8 @@ Or reference the existing `.mcp.json` in your Claude Code project settings. Once
82
98
  - Resolve Adobe Commerce project IDs to account IDs
83
99
  - Analyze logs, transactions, APM metrics, Redis, MySQL, and Elasticsearch data
84
100
  - Detect and investigate security attacks
101
+ - Fetch a Jira issue by key and pull its summary, status, description, and comments
102
+ - Chain a Jira ticket straight into a New Relic investigation via the `jira-newrelic-triage` workflow below
85
103
 
86
104
  ## Architecture
87
105
 
@@ -120,6 +138,29 @@ Subclass `BaseAgent` and implement `handleToolCall()` to build custom agents.
120
138
  | `newrelic_commerce` | NRQL specialist for Adobe Commerce monitoring and investigation |
121
139
  | `newrelic_security` | Extends commerce prompt with attack detection and security analysis |
122
140
 
141
+ ### Jira MCP Tools
142
+
143
+ | Tool | Description |
144
+ |---|---|
145
+ | `get_jira_issue` | Fetch a Jira issue by key (e.g. `PRO-234`): summary, status, description, comments, and a best-effort extraction of a New Relic account/project id mentioned in the text |
146
+
147
+ ### Jira → New Relic Triage Workflow
148
+
149
+ The Jira MCP is paired with a prompt (`mcps/jira/prompts/workflow.ts`) that drives an end-to-end investigation of a ticket:
150
+
151
+ 1. **Fetch the ticket** via `get_jira_issue`.
152
+ 2. **Check `extractedIds`** in the result — if an `accountId` or `projectId` was found in the description/comments, use it. If both are empty, the workflow asks the user for one rather than guessing.
153
+ 3. **Resolve the New Relic account**, calling `get_account_id_by_project_id` first if only a project ID is known.
154
+ 4. **Investigate with NRQL** via `execute_nrql`, following the `newrelic_commerce` prompt's field-discovery rules.
155
+ 5. **Summarize findings** back to the user, referencing the ticket key/summary. The ticket itself is never modified — no comments or status changes are made.
156
+
157
+ This workflow ships as a Claude Code plugin (see `plugins/claude/`):
158
+
159
+ - **Command** — `/work-on-ticket <issue-key>` runs the workflow directly for a given ticket.
160
+ - **Skill** — `jira-newrelic-triage` is auto-invoked when you mention working on, investigating, or triaging a Jira ticket (e.g. "work on jira ticket PRO-234").
161
+
162
+ Both are generated from `mcps/jira/prompts/workflow.ts` by `plugins/build.ts` (`npm run build:plugins`) — edit the source prompt, not the generated files under `plugins/*/commands` and `plugins/*/skills`.
163
+
123
164
  ## Development
124
165
 
125
166
  ```bash
package/package.json CHANGED
@@ -1,7 +1,25 @@
1
1
  {
2
2
  "name": "@kavinga/commerce-tools",
3
- "version": "0.1.9",
3
+ "version": "0.2.0",
4
4
  "description": "Multi-provider AI tooling platform with MCPs, agents, skills, and commands",
5
+ "keywords": [
6
+ "mcp",
7
+ "model-context-protocol",
8
+ "mcp-server",
9
+ "claude",
10
+ "claude-code",
11
+ "ai-agent",
12
+ "llm",
13
+ "adobe-commerce",
14
+ "magento",
15
+ "new-relic",
16
+ "nrql",
17
+ "nerdgraph",
18
+ "jira",
19
+ "monitoring",
20
+ "observability",
21
+ "security-analysis"
22
+ ],
5
23
  "type": "module",
6
24
  "bin": {
7
25
  "newrelic-mcp": "./dist/mcps/newrelic/server.js",