refine-backlog-mcp 1.0.5 → 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 +1 -1
- package/README.md +11 -0
- package/dist/server.js +15 -6
- package/package.json +1 -1
- package/server.ts +16 -6
package/Dockerfile
CHANGED
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",
|
|
@@ -50,7 +53,10 @@ const REFINE_TOOL = {
|
|
|
50
53
|
"BEFORE calling this tool, ask the user TWO quick questions if they haven't already specified:\n" +
|
|
51
54
|
"1. Would you like titles formatted as user stories? (\"As a [user], I want [goal], so that [benefit]\")\n" +
|
|
52
55
|
"2. Would you like acceptance criteria in Gherkin format? (Given/When/Then)\n" +
|
|
53
|
-
"Set useUserStories and useGherkin accordingly based on their answers. Both default to false
|
|
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",
|
|
54
60
|
inputSchema: {
|
|
55
61
|
type: "object",
|
|
56
62
|
required: ["items"],
|
|
@@ -71,7 +77,8 @@ const REFINE_TOOL = {
|
|
|
71
77
|
licenseKey: {
|
|
72
78
|
type: "string",
|
|
73
79
|
description: "Optional. Refine Backlog license key for Pro or Team tier. " +
|
|
74
|
-
"
|
|
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.",
|
|
75
82
|
},
|
|
76
83
|
useUserStories: {
|
|
77
84
|
type: "boolean",
|
|
@@ -112,8 +119,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
112
119
|
const headers = {
|
|
113
120
|
"Content-Type": "application/json",
|
|
114
121
|
};
|
|
115
|
-
|
|
116
|
-
|
|
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;
|
|
117
126
|
}
|
|
118
127
|
const body = {
|
|
119
128
|
items: args.items,
|
|
@@ -125,7 +134,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
125
134
|
if (args.useGherkin !== undefined)
|
|
126
135
|
body.useGherkin = args.useGherkin;
|
|
127
136
|
try {
|
|
128
|
-
const response = await fetch(`${API_BASE}/api/
|
|
137
|
+
const response = await fetch(`${API_BASE}/api/refine`, {
|
|
129
138
|
method: "POST",
|
|
130
139
|
headers,
|
|
131
140
|
body: JSON.stringify(body),
|
|
@@ -136,7 +145,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
136
145
|
return {
|
|
137
146
|
content: [{
|
|
138
147
|
type: "text",
|
|
139
|
-
text: `⚠️ ${msg}\n\n👉 Upgrade at https://refinebacklog.com/pricing
|
|
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}`,
|
|
140
149
|
}],
|
|
141
150
|
isError: true,
|
|
142
151
|
};
|
package/package.json
CHANGED
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
|
-
"
|
|
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
|
-
|
|
172
|
-
|
|
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/
|
|
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
|
|
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
|
};
|