refine-backlog-mcp 1.0.4 → 1.0.6

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/Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
1
  FROM node:22-alpine
2
2
 
3
3
  # Install the published MCP server package
4
- RUN npm install -g refine-backlog-mcp@1.0.2
4
+ RUN npm install -g refine-backlog-mcp@1.0.5
5
5
 
6
6
  # Run as non-root for security
7
7
  USER node
package/README.md CHANGED
@@ -101,6 +101,17 @@ Once configured, just talk to your AI naturally:
101
101
 
102
102
  Get a license key at [refinebacklog.com/pricing](https://refinebacklog.com/pricing)
103
103
 
104
+ ## Prefer automation over chat?
105
+
106
+ If you want to run Refine Backlog in scripts, GitHub Actions, or CI pipelines — without an LLM in the loop — use the CLI instead:
107
+
108
+ ```bash
109
+ npx refine-backlog-cli "Fix login bug" --gherkin
110
+ cat backlog.txt | npx refine-backlog-cli --user-stories --format json
111
+ ```
112
+
113
+ **CLI repo:** [github.com/DavidNielsen1031/refine-backlog-cli](https://github.com/DavidNielsen1031/refine-backlog-cli)
114
+
104
115
  ## API Reference
105
116
 
106
117
  Full API docs: [refinebacklog.com/llms.txt](https://refinebacklog.com/llms.txt)
package/dist/server.js CHANGED
@@ -11,6 +11,9 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
11
11
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
12
12
  import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
13
13
  const API_BASE = "https://refinebacklog.com";
14
+ // License key from MCP server environment — set REFINE_BACKLOG_KEY in Claude Desktop config.
15
+ // This is the preferred way for MCP users with a paid subscription.
16
+ const ENV_LICENSE_KEY = process.env.REFINE_BACKLOG_KEY ?? null;
14
17
  const ESTIMATE_LABELS = {
15
18
  XS: "< 1 day",
16
19
  S: "1–2 days",
@@ -46,7 +49,14 @@ const REFINE_TOOL = {
46
49
  description: "Refine messy backlog items into structured, actionable work items. " +
47
50
  "Returns each item with a clean title, problem statement, acceptance criteria, " +
48
51
  "T-shirt size estimate (XS/S/M/L/XL), priority with rationale, tags, and optional assumptions. " +
49
- "Free tier: up to 5 items per request. Pro: 25. Team: 50.",
52
+ "Free tier: up to 5 items per request. Pro: 25. Team: 50.\n\n" +
53
+ "BEFORE calling this tool, ask the user TWO quick questions if they haven't already specified:\n" +
54
+ "1. Would you like titles formatted as user stories? (\"As a [user], I want [goal], so that [benefit]\")\n" +
55
+ "2. Would you like acceptance criteria in Gherkin format? (Given/When/Then)\n" +
56
+ "Set useUserStories and useGherkin accordingly based on their answers. Both default to false.\n\n" +
57
+ "LICENSE KEY: For unlimited requests and higher item limits, set REFINE_BACKLOG_KEY in your MCP server " +
58
+ "environment config (Claude Desktop → claude_desktop_config.json → env section). " +
59
+ "Get a key at https://refinebacklog.com/pricing",
50
60
  inputSchema: {
51
61
  type: "object",
52
62
  required: ["items"],
@@ -67,7 +77,8 @@ const REFINE_TOOL = {
67
77
  licenseKey: {
68
78
  type: "string",
69
79
  description: "Optional. Refine Backlog license key for Pro or Team tier. " +
70
- "Obtain at https://refinebacklog.com/pricing. Free tier (5 items) works without a key.",
80
+ "Preferred: set REFINE_BACKLOG_KEY in your MCP server env config instead of passing inline. " +
81
+ "Get a key at https://refinebacklog.com/pricing. Free tier (5 items, 3 req/day) works without a key.",
71
82
  },
72
83
  useUserStories: {
73
84
  type: "boolean",
@@ -108,8 +119,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
108
119
  const headers = {
109
120
  "Content-Type": "application/json",
110
121
  };
111
- if (args.licenseKey) {
112
- headers["x-license-key"] = args.licenseKey;
122
+ // Inline arg takes precedence; env var is the recommended approach for MCP configs
123
+ const resolvedKey = args.licenseKey ?? ENV_LICENSE_KEY;
124
+ if (resolvedKey) {
125
+ headers["x-license-key"] = resolvedKey;
113
126
  }
114
127
  const body = {
115
128
  items: args.items,
@@ -121,7 +134,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
121
134
  if (args.useGherkin !== undefined)
122
135
  body.useGherkin = args.useGherkin;
123
136
  try {
124
- const response = await fetch(`${API_BASE}/api/groom`, {
137
+ const response = await fetch(`${API_BASE}/api/refine`, {
125
138
  method: "POST",
126
139
  headers,
127
140
  body: JSON.stringify(body),
@@ -132,7 +145,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
132
145
  return {
133
146
  content: [{
134
147
  type: "text",
135
- text: `⚠️ ${msg}\n\n👉 Upgrade at https://refinebacklog.com/pricing add your license key to the Claude Desktop MCP config as: "licenseKey": "your-key-here"`,
148
+ text: `⚠️ ${msg}\n\n👉 Upgrade at https://refinebacklog.com/pricing\n\nOnce you have a key, add it to your Claude Desktop config:\n{\n "mcpServers": {\n "refine-backlog": {\n "command": "npx",\n "args": ["-y", "refine-backlog-mcp"],\n "env": { "REFINE_BACKLOG_KEY": "your-key-here" }\n }\n }\n}`,
136
149
  }],
137
150
  isError: true,
138
151
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "refine-backlog-mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "MCP server for Refine Backlog — AI-powered backlog refinement",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/server.ts CHANGED
@@ -18,6 +18,10 @@ import {
18
18
 
19
19
  const API_BASE = "https://refinebacklog.com";
20
20
 
21
+ // License key from MCP server environment — set REFINE_BACKLOG_KEY in Claude Desktop config.
22
+ // This is the preferred way for MCP users with a paid subscription.
23
+ const ENV_LICENSE_KEY = process.env.REFINE_BACKLOG_KEY ?? null;
24
+
21
25
  interface RefinedItem {
22
26
  title: string;
23
27
  problem: string;
@@ -85,7 +89,10 @@ const REFINE_TOOL: Tool = {
85
89
  "BEFORE calling this tool, ask the user TWO quick questions if they haven't already specified:\n" +
86
90
  "1. Would you like titles formatted as user stories? (\"As a [user], I want [goal], so that [benefit]\")\n" +
87
91
  "2. Would you like acceptance criteria in Gherkin format? (Given/When/Then)\n" +
88
- "Set useUserStories and useGherkin accordingly based on their answers. Both default to false.",
92
+ "Set useUserStories and useGherkin accordingly based on their answers. Both default to false.\n\n" +
93
+ "LICENSE KEY: For unlimited requests and higher item limits, set REFINE_BACKLOG_KEY in your MCP server " +
94
+ "environment config (Claude Desktop → claude_desktop_config.json → env section). " +
95
+ "Get a key at https://refinebacklog.com/pricing",
89
96
  inputSchema: {
90
97
  type: "object",
91
98
  required: ["items"],
@@ -109,7 +116,8 @@ const REFINE_TOOL: Tool = {
109
116
  type: "string",
110
117
  description:
111
118
  "Optional. Refine Backlog license key for Pro or Team tier. " +
112
- "Obtain at https://refinebacklog.com/pricing. Free tier (5 items) works without a key.",
119
+ "Preferred: set REFINE_BACKLOG_KEY in your MCP server env config instead of passing inline. " +
120
+ "Get a key at https://refinebacklog.com/pricing. Free tier (5 items, 3 req/day) works without a key.",
113
121
  },
114
122
  useUserStories: {
115
123
  type: "boolean",
@@ -168,8 +176,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
168
176
  "Content-Type": "application/json",
169
177
  };
170
178
 
171
- if (args.licenseKey) {
172
- headers["x-license-key"] = args.licenseKey;
179
+ // Inline arg takes precedence; env var is the recommended approach for MCP configs
180
+ const resolvedKey = args.licenseKey ?? ENV_LICENSE_KEY;
181
+ if (resolvedKey) {
182
+ headers["x-license-key"] = resolvedKey;
173
183
  }
174
184
 
175
185
  const body: Record<string, unknown> = {
@@ -181,7 +191,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
181
191
  if (args.useGherkin !== undefined) body.useGherkin = args.useGherkin;
182
192
 
183
193
  try {
184
- const response = await fetch(`${API_BASE}/api/groom`, {
194
+ const response = await fetch(`${API_BASE}/api/refine`, {
185
195
  method: "POST",
186
196
  headers,
187
197
  body: JSON.stringify(body),
@@ -193,7 +203,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
193
203
  return {
194
204
  content: [{
195
205
  type: "text",
196
- text: `⚠️ ${msg}\n\n👉 Upgrade at https://refinebacklog.com/pricing add your license key to the Claude Desktop MCP config as: "licenseKey": "your-key-here"`,
206
+ text: `⚠️ ${msg}\n\n👉 Upgrade at https://refinebacklog.com/pricing\n\nOnce you have a key, add it to your Claude Desktop config:\n{\n "mcpServers": {\n "refine-backlog": {\n "command": "npx",\n "args": ["-y", "refine-backlog-mcp"],\n "env": { "REFINE_BACKLOG_KEY": "your-key-here" }\n }\n }\n}`,
197
207
  }],
198
208
  isError: true,
199
209
  };