kspec 1.0.26 → 1.0.29

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 (3) hide show
  1. package/README.md +34 -57
  2. package/package.json +1 -1
  3. package/src/index.js +34 -27
package/README.md CHANGED
@@ -181,47 +181,29 @@ kspec is designed for team collaboration. Most files should be committed to shar
181
181
 
182
182
  ### Setting Up MCP for Teams
183
183
 
184
- **Problem**: API tokens should never be committed, but teams need consistent MCP configuration.
185
-
186
- **Solution**: Use environment variables with a committed template.
187
-
188
- 1. Commit a template file (`.kiro/mcp.json.template`):
189
- ```json
190
- {
191
- "mcpServers": {
192
- "atlassian": {
193
- "command": "npx",
194
- "args": ["-y", "@anthropic/mcp-atlassian"],
195
- "env": {
196
- "ATLASSIAN_HOST": "${ATLASSIAN_HOST}",
197
- "ATLASSIAN_EMAIL": "${ATLASSIAN_EMAIL}",
198
- "ATLASSIAN_API_TOKEN": "${ATLASSIAN_API_TOKEN}"
199
- }
200
- }
201
- }
202
- }
203
- ```
204
-
205
- 2. Each team member creates their personal config:
206
- ```bash
207
- # Copy template to home directory
208
- mkdir -p ~/.kiro && chmod 700 ~/.kiro
209
- cp .kiro/mcp.json.template ~/.kiro/mcp.json
210
- chmod 600 ~/.kiro/mcp.json
211
-
212
- # Edit with real credentials
213
- nano ~/.kiro/mcp.json
214
- ```
215
-
216
- 3. Or use environment variables directly:
217
- ```bash
218
- # Add to ~/.bashrc or ~/.zshrc
219
- export ATLASSIAN_HOST="https://your-domain.atlassian.net"
220
- export ATLASSIAN_EMAIL="your-email@example.com"
221
- export ATLASSIAN_API_TOKEN="your-api-token"
222
- ```
223
-
224
- See [SECURITY.md](SECURITY.md) for detailed security best practices.
184
+ `kspec init` creates `.kiro/mcp.json.template` which uses mcp-remote with OAuth (no API tokens needed):
185
+
186
+ ```json
187
+ {
188
+ "mcpServers": {
189
+ "atlassian": {
190
+ "command": "npx",
191
+ "args": ["-y", "mcp-remote", "https://mcp.atlassian.com/v1/sse"],
192
+ "timeout": 120000
193
+ }
194
+ }
195
+ }
196
+ ```
197
+
198
+ Each team member copies to their settings:
199
+ ```bash
200
+ mkdir -p ~/.kiro/settings
201
+ cp .kiro/mcp.json.template ~/.kiro/settings/mcp.json
202
+ ```
203
+
204
+ Or add via CLI: `kiro-cli mcp add --name atlassian`
205
+
206
+ See [SECURITY.md](SECURITY.md) for security best practices.
225
207
 
226
208
  ## Jira Integration
227
209
 
@@ -254,37 +236,32 @@ Generate Jira subtasks from tasks.md for progress tracking.
254
236
 
255
237
  ### Prerequisites
256
238
 
257
- `kspec init` creates `.kiro/mcp.json.template` automatically. To enable Jira integration:
239
+ Configure Atlassian MCP using one of these methods:
258
240
 
241
+ **Option 1: Use kiro-cli** (recommended)
259
242
  ```bash
260
- # Copy template to your home directory (keeps secrets out of repo)
261
- mkdir -p ~/.kiro && chmod 700 ~/.kiro
262
- cp .kiro/mcp.json.template ~/.kiro/mcp.json
263
- chmod 600 ~/.kiro/mcp.json
264
-
265
- # Edit with your real credentials
266
- nano ~/.kiro/mcp.json
243
+ kiro-cli mcp add --name atlassian
267
244
  ```
268
245
 
269
- Replace the `${...}` placeholders with your actual values:
246
+ **Option 2: Manual configuration**
247
+
248
+ Add to `.kiro/settings/mcp.json` (workspace) or `~/.kiro/settings/mcp.json` (user):
270
249
 
271
250
  ```json
272
251
  {
273
252
  "mcpServers": {
274
253
  "atlassian": {
275
254
  "command": "npx",
276
- "args": ["-y", "@anthropic/mcp-atlassian"],
277
- "env": {
278
- "ATLASSIAN_HOST": "https://your-domain.atlassian.net",
279
- "ATLASSIAN_EMAIL": "your-email@example.com",
280
- "ATLASSIAN_API_TOKEN": "your-api-token"
281
- }
255
+ "args": ["-y", "mcp-remote", "https://mcp.atlassian.com/v1/sse"],
256
+ "timeout": 120000
282
257
  }
283
258
  }
284
259
  }
285
260
  ```
286
261
 
287
- Get your API token: https://id.atlassian.com/manage-profile/security/api-tokens
262
+ Or add via CLI: `kiro-cli mcp add --name atlassian`
263
+
264
+ See: https://kiro.dev/docs/cli/mcp/
288
265
 
289
266
  See [Team Collaboration](#team-collaboration) for secure team setup with environment variables.
290
267
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kspec",
3
- "version": "1.0.26",
3
+ "version": "1.0.29",
4
4
  "description": "Spec-driven development workflow for Kiro CLI",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -9,7 +9,10 @@ const STEERING_DIR = '.kiro/steering';
9
9
  const AGENTS_DIR = '.kiro/agents';
10
10
  const CONFIG_FILE = path.join(KSPEC_DIR, 'config.json');
11
11
  const UPDATE_CHECK_FILE = path.join(os.homedir(), '.kspec-update-check');
12
- const KIRO_MCP_CONFIG = path.join(os.homedir(), '.kiro', 'mcp.json');
12
+ const KIRO_MCP_CONFIG_USER = path.join(os.homedir(), '.kiro', 'settings', 'mcp.json');
13
+ const KIRO_MCP_CONFIG_WORKSPACE = path.join('.kiro', 'settings', 'mcp.json');
14
+ // Legacy path for backwards compatibility
15
+ const KIRO_MCP_CONFIG_LEGACY = path.join(os.homedir(), '.kiro', 'mcp.json');
13
16
 
14
17
  // Default config
15
18
  const defaultConfig = {
@@ -95,11 +98,20 @@ async function checkForUpdates() {
95
98
 
96
99
  // MCP Integration Detection
97
100
  function getMcpConfig() {
98
- try {
99
- if (fs.existsSync(KIRO_MCP_CONFIG)) {
100
- return JSON.parse(fs.readFileSync(KIRO_MCP_CONFIG, 'utf8'));
101
- }
102
- } catch {}
101
+ // Check in order: workspace, user, legacy
102
+ const configPaths = [
103
+ KIRO_MCP_CONFIG_WORKSPACE,
104
+ KIRO_MCP_CONFIG_USER,
105
+ KIRO_MCP_CONFIG_LEGACY
106
+ ];
107
+
108
+ for (const configPath of configPaths) {
109
+ try {
110
+ if (fs.existsSync(configPath)) {
111
+ return JSON.parse(fs.readFileSync(configPath, 'utf8'));
112
+ }
113
+ } catch {}
114
+ }
103
115
  return null;
104
116
  }
105
117
 
@@ -130,26 +142,24 @@ function requireAtlassianMcp() {
130
142
  if (!hasAtlassianMcp()) {
131
143
  die(`Atlassian MCP not configured.
132
144
 
133
- To use Jira integration, you need to:
134
- 1. Install the Atlassian MCP server
135
- 2. Configure it in ~/.kiro/mcp.json
145
+ To use Jira integration, configure Atlassian MCP in one of these locations:
146
+ - Workspace: .kiro/settings/mcp.json
147
+ - User: ~/.kiro/settings/mcp.json
136
148
 
137
- Example ~/.kiro/mcp.json:
149
+ Example configuration:
138
150
  {
139
151
  "mcpServers": {
140
152
  "atlassian": {
141
153
  "command": "npx",
142
- "args": ["-y", "@anthropic/mcp-atlassian"],
143
- "env": {
144
- "ATLASSIAN_HOST": "https://your-domain.atlassian.net",
145
- "ATLASSIAN_EMAIL": "your-email@example.com",
146
- "ATLASSIAN_API_TOKEN": "your-api-token"
147
- }
154
+ "args": ["-y", "mcp-remote", "https://mcp.atlassian.com/v1/sse"],
155
+ "timeout": 120000
148
156
  }
149
157
  }
150
158
  }
151
159
 
152
- Get your API token: https://id.atlassian.com/manage-profile/security/api-tokens`);
160
+ Or run: kiro-cli mcp add --name atlassian
161
+
162
+ See: https://kiro.dev/docs/cli/mcp/`);
153
163
  }
154
164
  return getAtlassianMcpName();
155
165
  }
@@ -809,8 +819,9 @@ Output: APPROVE / REQUEST_CHANGES with specific issues.`,
809
819
  name: 'kspec-jira',
810
820
  description: 'Jira integration for specs',
811
821
  model: 'claude-sonnet-4',
812
- tools: ['read', 'write', 'mcp'],
813
- allowedTools: ['read', 'write', 'mcp'],
822
+ tools: ['read', 'write', '@atlassian'],
823
+ allowedTools: ['read', 'write', '@atlassian'],
824
+ includeMcpJson: true,
814
825
  resources: [
815
826
  'file://.kspec/CONTEXT.md',
816
827
  'file://.kiro/steering/**/*.md',
@@ -908,7 +919,7 @@ const commands = {
908
919
  }
909
920
  }
910
921
 
911
- // Create MCP template (safe to commit, no secrets)
922
+ // Create MCP template (safe to commit, uses OAuth via mcp-remote)
912
923
  const mcpTemplatePath = path.join('.kiro', 'mcp.json.template');
913
924
  if (!fs.existsSync(mcpTemplatePath)) {
914
925
  ensureDir('.kiro');
@@ -916,17 +927,13 @@ const commands = {
916
927
  mcpServers: {
917
928
  atlassian: {
918
929
  command: 'npx',
919
- args: ['-y', '@anthropic/mcp-atlassian'],
920
- env: {
921
- ATLASSIAN_HOST: '${ATLASSIAN_HOST}',
922
- ATLASSIAN_EMAIL: '${ATLASSIAN_EMAIL}',
923
- ATLASSIAN_API_TOKEN: '${ATLASSIAN_API_TOKEN}'
924
- }
930
+ args: ['-y', 'mcp-remote', 'https://mcp.atlassian.com/v1/sse'],
931
+ timeout: 120000
925
932
  }
926
933
  }
927
934
  };
928
935
  fs.writeFileSync(mcpTemplatePath, JSON.stringify(mcpTemplate, null, 2));
929
- log(`Created ${mcpTemplatePath} (commit this, set env vars for secrets)`);
936
+ log(`Created ${mcpTemplatePath} (commit this, OAuth handles auth)`);
930
937
  }
931
938
 
932
939
  // Update .gitignore for kspec (append if exists, create if not)