dura-mcp 1.0.1 → 1.0.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 (2) hide show
  1. package/README.md +195 -233
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,304 +1,286 @@
1
1
  # DURA MCP Server
2
2
 
3
- MCP (Model Context Protocol) server for [DURA](https://github.com/ArchieTansaria/dura) - Dependency Update Risk Analyzer.
3
+ MCP (Model Context Protocol) server for [DURA](https://github.com/ArchieTansaria/dura) Dependency Update Risk Analyzer. [modelcontextprotocol](https://modelcontextprotocol.io/docs/learn/server-concepts)
4
4
 
5
- Integrates DURA's dependency analysis capabilities with AI assistants like Cline, Claude Desktop, and any MCP-compatible client.
5
+ Integrates DURA's dependency analysis capabilities with AI coding assistants (Cline, Cursor, Claude Code, Continue.dev, etc.) and desktop apps like Claude Desktop that support MCP servers. [modelcontextprotocol](https://modelcontextprotocol.io/clients)
6
+
7
+ ***
6
8
 
7
9
  ## Quick Start
8
10
 
9
- ### Installation
11
+ ### 1. Installation
10
12
 
11
13
  ```bash
14
+ # Global install (recommended)
12
15
  npm install -g dura-mcp
16
+
17
+ # Or use npx (no install needed)
18
+ npx dura-mcp
19
+ ```
20
+
21
+ The MCP server internally uses `dura-kit` to perform dependency analysis. [github](https://github.com/ArchieTansaria/dura)
22
+
23
+ ### 2. Generic MCP Configuration (All Major Clients)
24
+
25
+ Add this entry to your AI agent’s MCP configuration (the exact file/setting path differs per client, but the JSON structure is the same): [modelcontextprotocol](https://modelcontextprotocol.io/docs/learn/server-concepts)
26
+
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "dura": {
31
+ "command": "npx",
32
+ "args": ["dura-mcp"],
33
+ "cwd": "${workspaceFolder}"
34
+ }
35
+ }
36
+ }
13
37
  ```
14
38
 
15
- This automatically makes `dura-mcp` available globally. The server will use `dura-kit` via npx when needed.
39
+ This pattern works for:
40
+
41
+ - Cline (VS Code)
42
+ - Cursor
43
+ - Claude Desktop / Claude Code
44
+ - Continue.dev
45
+ - Other MCP-compatible IDE and desktop clients that accept an `mcpServers` JSON block. [airbyte](https://airbyte.com/blog/pyairbyte-mcp-now-supports-cline-cursor-claude-desktop-warp)
16
46
 
17
- ### Usage with Cline (VS Code)
47
+ `cwd` is set to `${workspaceFolder}` so the server runs relative to your current project and can resolve local dependencies or configuration correctly. [github](https://github.com/ArchieTansaria/dura)
18
48
 
19
- 1. **Install the MCP server:**
20
- ```bash
21
- npm install -g dura-mcp
22
- ```
49
+ | Client | Config Location |
50
+ |--------|-----------------|
51
+ | Cline | VS Code Settings → MCP |
52
+ | Cursor | Settings → MCP Servers |
53
+ | Claude Desktop | `~/Library/Application Support/Claude/` |
54
+ | Continue.dev | `~/.continue/mcp.json` |
55
+ | Roo Code | Settings → Tools |
23
56
 
24
- 2. **Configure Cline:**
25
-
26
- Open VS Code Settings (JSON):
27
- - Press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux)
28
- - Type: "Preferences: Open User Settings (JSON)"
29
- - Add the following:
57
+ **491+ MCP clients** - [Full list](https://www.pulsemcp.com/clients)
30
58
 
31
- ```json
32
- {
33
- "cline.mcpServers": {
34
- "dura": {
35
- "command": "dura-mcp"
36
- }
37
- }
38
- }
39
- ```
59
+ ***
40
60
 
41
- 3. **Restart VS Code**
61
+ ## Configuration Fallbacks
42
62
 
43
- 4. **Use it with Cline:**
44
-
45
- Open Cline and ask natural questions:
46
- - "Analyze dependencies for https://github.com/expressjs/express"
47
- - "What are the high-risk dependencies in React?"
48
- - "Show me breaking changes in Next.js"
49
- - "Is it safe to update my dependencies?"
63
+ If `npx dura-mcp` does not work in your environment, you can fall back to local or absolute paths as needed. [zuplo](https://zuplo.com/blog/mcp-resources)
50
64
 
51
- ### Usage with Claude Desktop
65
+ ### Option A: Local Project Install
52
66
 
53
- Add to your Claude Desktop configuration file:
67
+ Install locally in your project:
54
68
 
55
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
69
+ ```bash
70
+ npm install dura-mcp
71
+ ```
56
72
 
57
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
73
+ Then configure:
58
74
 
59
75
  ```json
60
76
  {
61
77
  "mcpServers": {
62
78
  "dura": {
63
- "command": "dura-mcp"
79
+ "command": "node",
80
+ "args": ["./node_modules/.bin/dura-mcp"],
81
+ "cwd": "${workspaceFolder}"
64
82
  }
65
83
  }
66
84
  }
67
85
  ```
68
86
 
69
- Restart Claude Desktop and start asking about dependencies!
70
-
71
- ## Available Tools
87
+ ### Option B: Absolute Path
72
88
 
73
- The DURA MCP server provides four specialized tools that AI assistants can use:
89
+ Useful for global or non-standard installs:
74
90
 
75
- ### 1. `analyze_repository`
76
-
77
- Complete dependency analysis with detailed risk assessment and actionable recommendations.
91
+ ```json
92
+ {
93
+ "mcpServers": {
94
+ "dura": {
95
+ "command": "node",
96
+ "args": ["/full/path/to/your/project/node_modules/.bin/dura-mcp"],
97
+ "cwd": "/full/path/to/your/project"
98
+ }
99
+ }
100
+ }
101
+ ```
78
102
 
79
- **Parameters:**
80
- - `repoUrl` (required): GitHub repository URL (e.g., `https://github.com/facebook/react`)
81
- - `branch` (optional): Git branch to analyze (default: `main`)
82
- - `useCache` (optional): Use cached results if available (default: `true`)
103
+ ### Option C: Global Binary
83
104
 
84
- **Returns:**
85
- - Health score and risk summary
86
- - Critical issues requiring attention
87
- - Breaking changes with evidence
88
- - Prioritized action items
89
- - Suggested update order
105
+ If `npm install -g dura-mcp` is used and `dura-mcp` is on your PATH: [github](https://github.com/ArchieTansaria/dura)
90
106
 
91
- **Example:**
107
+ ```json
108
+ {
109
+ "mcpServers": {
110
+ "dura": {
111
+ "command": "dura-mcp"
112
+ }
113
+ }
114
+ }
92
115
  ```
93
- User: "Analyze dependencies for https://github.com/expressjs/express"
94
116
 
95
- AI receives:
96
- - Health Score: 68/100
97
- - 3 high-risk dependencies
98
- - 2 breaking changes
99
- - Specific actions to take
100
- ```
117
+ ***
101
118
 
102
- ### 2. `get_high_risk_dependencies`
119
+ ## Verifying the Server in Terminal
103
120
 
104
- Get only dependencies with high risk that need immediate attention.
121
+ From your project root (the same directory used as `cwd`):
105
122
 
106
- **Parameters:**
107
- - `repoUrl` (required): GitHub repository URL
108
- - `branch` (optional): Git branch (default: `main`)
123
+ ```bash
124
+ # 1) Start the server
125
+ npx dura-mcp
109
126
 
110
- **Returns:**
111
- - List of high-risk dependencies only
112
- - Why each is high-risk
113
- - Specific recommendations for each
114
- - Update priority guidance
127
+ # 2) List tools via MCP
128
+ echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npx dura-mcp
115
129
 
116
- **Example:**
130
+ # 3) Call a tool directly
131
+ echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_risk_summary","arguments":{"repoUrl":"https://github.com/expressjs/express"}}}' | npx dura-mcp
117
132
  ```
118
- User: "What are the risky dependencies in React?"
119
133
 
120
- AI gets only the critical dependencies that need review.
121
- ```
134
+ If everything is wired correctly, you should see a JSON response listing four tools on `tools/list` and a structured result for `get_risk_summary` rather than an internal error. [github](https://github.com/ArchieTansaria/dura)
122
135
 
123
- ### 3. `get_breaking_changes`
136
+ ***
124
137
 
125
- Get only dependencies with confirmed breaking changes.
138
+ ## Available Tools
126
139
 
127
- **Parameters:**
128
- - `repoUrl` (required): GitHub repository URL
129
- - `branch` (optional): Git branch (default: `main`)
140
+ The DURA MCP server provides four tools for dependency risk analysis. [github](https://github.com/ArchieTansaria/dura)
130
141
 
131
- **Returns:**
132
- - Dependencies with confirmed breaking changes
133
- - Confidence scores
134
- - Evidence from release notes
135
- - Migration planning guidance
142
+ ### 1. `analyze_repository`
136
143
 
137
- **Example:**
138
- ```
139
- User: "Show me breaking changes in Next.js"
144
+ Complete dependency analysis with detailed risk assessment and actionable recommendations.
140
145
 
141
- AI gets specific breaking changes and how to handle them.
142
- ```
146
+ **Parameters**
143
147
 
144
- ### 4. `get_risk_summary`
148
+ - `repoUrl` (required): GitHub repository URL, for example `https://github.com/facebook/react`
149
+ - `branch` (optional): Git branch to analyze, default `main`
150
+ - `useCache` (optional): Use cached results if available, default `true`
145
151
 
146
- Quick health check and risk overview without detailed data.
152
+ **Returns**
147
153
 
148
- **Parameters:**
149
- - `repoUrl` (required): GitHub repository URL
150
- - `branch` (optional): Git branch (default: `main`)
154
+ - Overall health score and risk summary
155
+ - Critical issues requiring attention
156
+ - Breaking changes with evidence
157
+ - Prioritized action items
158
+ - Suggested update order
151
159
 
152
- **Returns:**
153
- - Health score (0-100)
154
- - Risk distribution (high/medium/low)
155
- - Quick status assessment
156
- - Overall recommendation
160
+ ### 2. `get_high_risk_dependencies`
157
161
 
158
- **Example:**
159
- ```
160
- User: "Is my project safe to update?"
162
+ Focuses on only the highest-risk dependencies that require immediate attention.
161
163
 
162
- AI gets instant health score and quick answer.
163
- ```
164
+ **Parameters**
164
165
 
165
- ## Features
166
+ - `repoUrl` (required): GitHub repository URL
167
+ - `branch` (optional): Git branch, default `main`
166
168
 
167
- - **Smart Caching**: Analysis results cached for 1 hour to speed up repeated queries
168
- - **Actionable Output**: Prioritized recommendations, not just data dumps
169
- - **Breaking Change Detection**: Scrapes GitHub releases to find confirmed breaking changes
170
- - **Risk Scoring**: Intelligent risk assessment based on version changes and breaking signals
171
- - **Multiple Tools**: Specialized tools for different use cases (overview, deep-dive, specific filters)
169
+ **Returns**
172
170
 
173
- ## Usage Examples
171
+ - List of high-risk dependencies
172
+ - Explanation of why each is high risk
173
+ - Specific recommendations and priority guidance
174
174
 
175
- ### Quick Health Check
175
+ ### 3. `get_breaking_changes`
176
176
 
177
- ```
178
- User: "Is express safe to update?"
177
+ Returns only dependencies with confirmed breaking changes.
179
178
 
180
- AI: [calls get_risk_summary]
181
- "Express has a health score of 72/100. There are 3 high-risk
182
- dependencies that need attention. Would you like details?"
183
- ```
179
+ **Parameters**
184
180
 
185
- ### Detailed Analysis
181
+ - `repoUrl` (required): GitHub repository URL
182
+ - `branch` (optional): Git branch, default `main`
186
183
 
187
- ```
188
- User: "Analyze all dependencies in my project"
184
+ **Returns**
189
185
 
190
- AI: [calls analyze_repository]
191
- "I found 2 critical issues:
192
- 1. eslint (breaking changes confirmed)
193
- 2. webpack (major version jump)
186
+ - Dependencies with confirmed breaking changes
187
+ - Confidence scores and supporting evidence from release notes
188
+ - Migration and upgrade guidance
194
189
 
195
- Here's the recommended update order..."
196
- ```
190
+ ### 4. `get_risk_summary`
197
191
 
198
- ### Focus on Critical Issues
192
+ Lightweight health check and risk overview.
199
193
 
200
- ```
201
- User: "What breaking changes do I need to worry about?"
194
+ **Parameters**
202
195
 
203
- AI: [calls get_breaking_changes]
204
- "Found 2 dependencies with breaking changes:
205
- - eslint: Config syntax changed in v9
206
- - react: New JSX transform required
196
+ - `repoUrl` (required): GitHub repository URL
197
+ - `branch` (optional): Git branch, default `main`
207
198
 
208
- I recommend updating eslint first..."
209
- ```
199
+ **Returns**
210
200
 
211
- ### Repository Comparison
201
+ - Health score (0–100)
202
+ - Risk distribution (high/medium/low)
203
+ - Overall status and recommendation
212
204
 
213
- ```
214
- User: "Compare dependency health of express vs fastify"
205
+ ***
215
206
 
216
- AI: [calls get_risk_summary for both]
217
- "Express: Health score 72/100, 3 high-risk deps
218
- Fastify: Health score 89/100, 0 high-risk deps
207
+ ## Typical AI Usage Patterns
219
208
 
220
- Fastify is in better shape for updates."
221
- ```
209
+ These examples illustrate how AI assistants tend to use the tools; they are not strict requirements: [github](https://github.com/ArchieTansaria/dura)
210
+
211
+ - Quick check:
212
+ “Is it safe to update my dependencies?” → `get_risk_summary`
213
+ - Deep audit:
214
+ “Analyze dependencies for https://github.com/expressjs/express” → `analyze_repository`
215
+ - Critical-only view:
216
+ “What are the risky dependencies in React?” → `get_high_risk_dependencies`
217
+ - Upgrade planning:
218
+ “What breaking changes do I need to worry about?” → `get_breaking_changes`
219
+
220
+ ***
222
221
 
223
222
  ## How It Works
224
223
 
225
- 1. **AI Assistant** receives a question about dependencies
226
- 2. **MCP Server** provides tools the AI can call
227
- 3. **AI chooses** the appropriate tool (full analysis, high-risk filter, etc.)
228
- 4. **MCP Server** runs `dura-kit` CLI to analyze the repository
229
- 5. **Results** are formatted and returned to the AI
230
- 6. **AI presents** findings in natural language to the user
224
+ 1. The AI assistant receives a dependency-related question.
225
+ 2. The MCP client lists available tools from the DURA MCP server.
226
+ 3. The AI chooses the appropriate tool (full analysis, high-risk only, breaking changes, or summary).
227
+ 4. The MCP server runs the `dura-kit` CLI to analyze the target repository. [github](https://github.com/ArchieTansaria/dura)
228
+ 5. Results are normalized into structured JSON and returned via MCP.
229
+ 6. The AI formats the findings into natural language and follow-up recommendations.
231
230
 
232
- The MCP server acts as a bridge between AI assistants and DURA's analysis engine.
231
+ ***
233
232
 
234
233
  ## Caching Behavior
235
234
 
236
- Analysis results are cached for 1 hour to improve performance:
235
+ The MCP server caches repository analyses for one hour: [github](https://github.com/ArchieTansaria/dura)
237
236
 
238
- - First query: Fetches fresh data (5-10 seconds)
239
- - Subsequent queries: Returns cached data instantly
240
- - Cache expires: After 1 hour, fresh data fetched automatically
241
- - Force refresh: Set `useCache: false` in parameters
237
+ - First query: Fetches fresh data, typically a few seconds.
238
+ - Repeated queries: Served from cache for the same repository and branch.
239
+ - Cache expiry: After one hour, the next call re-runs analysis.
240
+ - Manual refresh: Set `useCache: false` for `analyze_repository` to force a fresh run.
242
241
 
243
- Cache is shared across all tools, so analyzing a repository once makes all other tools fast.
242
+ Cache is shared across tools, so one full analysis speeds up subsequent summary or filtered calls for the same repository. [github](https://github.com/ArchieTansaria/dura)
243
+
244
+ ***
244
245
 
245
246
  ## Requirements
246
247
 
247
- - **Node.js**: 18.0.0 or higher
248
- - **Internet**: Required for GitHub and npm API access
249
- - **Public Repositories**: Currently only supports public GitHub repositories
248
+ - Node.js 18.0.0 or higher
249
+ - Internet access (GitHub and npm APIs)
250
+ - Currently supports public GitHub repositories with a `package.json` in the root directory [github](https://github.com/ArchieTansaria/dura)
251
+
252
+ ***
250
253
 
251
254
  ## Troubleshooting
252
255
 
253
- ### Command not found: dura-mcp
256
+ ### Command Not Found: `dura-mcp`
254
257
 
255
- **Solution:** Ensure the package is installed globally:
256
258
  ```bash
257
259
  npm install -g dura-mcp
258
- which dura-mcp # Should show installation path
260
+ which dura-mcp
259
261
  ```
260
262
 
261
- ### Cline doesn't see the MCP server
262
-
263
- **Solutions:**
264
- 1. Restart VS Code completely (close all windows)
265
- 2. Verify settings are saved correctly
266
- 3. Check for errors in VS Code Developer Tools: `Help → Toggle Developer Tools → Console`
267
-
268
- ### MCP server not connecting
269
-
270
- **Solutions:**
271
- 1. Test the server manually: Run `dura-mcp` in terminal - it should say "Server running"
272
- 2. Check Node.js version: `node --version` (must be 18+)
273
- 3. Reinstall if needed: `npm uninstall -g dura-mcp && npm install -g dura-mcp`
274
-
275
- ### Analysis fails or times out
263
+ Ensure the printed path is on your `PATH` and update your configuration to use either `dura-mcp` (global) or `npx dura-mcp` as described above. [github](https://github.com/ArchieTansaria/dura)
276
264
 
277
- **Common causes:**
278
- - Invalid or private repository URL
279
- - Network connectivity issues
280
- - Repository doesn't contain package.json
265
+ ### MCP Client Does Not Show Tools
281
266
 
282
- **Solutions:**
283
- 1. Verify repository is public: Visit the URL in a browser
284
- 2. Check internet connection
285
- 3. Test with DURA CLI directly: `npx dura-kit <repo-url>`
286
- 4. Check repository has package.json in the root
267
+ - Confirm your config uses one of the working patterns above (especially `cwd`).
268
+ - Restart the client fully after editing MCP config.
269
+ - Open the client’s developer tools/console and check for spawn errors or path issues. [docs.cline](https://docs.cline.bot/mcp/configuring-mcp-servers)
287
270
 
288
- ### "Repository not found" error
271
+ ### Server Runs But Calls Fail
289
272
 
290
- **Solutions:**
291
- - Ensure URL format is correct: `https://github.com/owner/repo`
292
- - Repository must be public (private repos not supported)
293
- - Check repository actually exists
273
+ - Run `echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npx dura-mcp` from the same directory as `cwd`.
274
+ - If this fails, adjust `cwd` and `args` until terminal tests succeed, then mirror that in your MCP config. [modelcontextprotocol](https://modelcontextprotocol.io/specification/draft/server/resources)
294
275
 
295
- ### Rate limiting
276
+ ### Analysis Errors
296
277
 
297
- GitHub API rate limits may affect analysis:
298
- - Unauthenticated: 60 requests/hour
299
- - Authenticated: 5000 requests/hour (future feature)
278
+ - Verify the repository URL is public and valid.
279
+ - Ensure the repo contains `package.json` at the root.
280
+ - Test the underlying CLI directly:
281
+ `npx dura-kit https://github.com/owner/repo` [github](https://github.com/ArchieTansaria/dura)
300
282
 
301
- **Solution:** Wait a few minutes before retrying.
283
+ ***
302
284
 
303
285
  ## Development
304
286
 
@@ -311,28 +293,26 @@ npm install
311
293
  node server.js
312
294
  ```
313
295
 
314
- The server will start and wait for MCP protocol messages on stdin.
296
+ The server starts and waits for MCP JSON-RPC messages on stdin. [github](https://github.com/ArchieTansaria/dura)
315
297
 
316
- ### Testing
317
-
318
- Use the MCP Inspector to test the server:
298
+ ### Testing with MCP Inspector
319
299
 
320
300
  ```bash
321
301
  npm install -g @modelcontextprotocol/inspector
322
302
  npx @modelcontextprotocol/inspector node server.js
323
303
  ```
324
304
 
325
- Then test each tool in the web interface.
305
+ Use the inspector UI to list tools, call each one, and inspect responses. [modelcontextprotocol](https://modelcontextprotocol.info/docs/concepts/resources/)
326
306
 
327
- ### Local Development with Cline
307
+ ### Local Development with an MCP Client
328
308
 
329
309
  ```bash
330
310
  cd dura/mcp
331
311
  npm link
332
312
 
333
- # Add to VS Code settings:
313
+ # Then in your MCP client config:
334
314
  {
335
- "cline.mcpServers": {
315
+ "mcpServers": {
336
316
  "dura": {
337
317
  "command": "dura-mcp"
338
318
  }
@@ -340,35 +320,17 @@ npm link
340
320
  }
341
321
  ```
342
322
 
343
- ## Links
344
-
345
- - **DURA CLI**: [dura-kit on npm](https://www.npmjs.com/package/dura-kit)
346
- - **GitHub Repository**: [ArchieTansaria/dura](https://github.com/ArchieTansaria/dura)
347
- - **MCP Documentation**: [Model Context Protocol](https://modelcontextprotocol.io)
348
- - **Report Issues**: [GitHub Issues](https://github.com/ArchieTansaria/dura/issues)
349
-
350
- ## Related Packages
323
+ ***
351
324
 
352
- - **dura-kit** - The core CLI tool for dependency analysis
353
- ```bash
354
- npm install -g dura-kit
355
- dura https://github.com/expressjs/express
356
- ```
325
+ ## Links
357
326
 
358
- ## Contributing
327
+ - DURA CLI: [dura-kit on npm](https://www.npmjs.com/package/dura-kit)
328
+ - GitHub Repository: [ArchieTansaria/dura](https://github.com/ArchieTansaria/dura)
329
+ - MCP Documentation: [Model Context Protocol](https://modelcontextprotocol.io)
330
+ - Issues: [GitHub Issues](https://github.com/ArchieTansaria/dura/issues)
359
331
 
360
- Contributions welcome! See the [main repository](https://github.com/ArchieTansaria/dura) for contribution guidelines.
332
+ ***
361
333
 
362
334
  ## License
363
335
 
364
- MIT License - see [LICENSE](https://github.com/ArchieTansaria/dura/blob/main/LICENSE) file for details.
365
-
366
- ## Support
367
-
368
- - Documentation: [GitHub Repository](https://github.com/ArchieTansaria/dura)
369
- - Issues: [GitHub Issues](https://github.com/ArchieTansaria/dura/issues)
370
- - Discussions: [GitHub Discussions](https://github.com/ArchieTansaria/dura/discussions)
371
-
372
- ---
373
-
374
- **Built with Model Context Protocol for seamless AI integration**
336
+ MIT License see the [LICENSE](https://github.com/ArchieTansaria/dura/blob/main/LICENSE) file for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dura-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "MCP server for DURA - Dependency Update Risk Analyzer. Integrates with Cline and other AI assistants.",
6
6
  "bin": {