smart-coding-mcp 1.4.0 → 1.4.1
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/README.md +19 -34
- package/features/check-last-version.js +4 -3
- package/package.json +1 -1
- package/test/check-last-version.test.js +2 -2
package/README.md
CHANGED
|
@@ -72,74 +72,59 @@ Add to your MCP configuration file. The location depends on your IDE and OS:
|
|
|
72
72
|
|
|
73
73
|
Add the server configuration to the `mcpServers` object in your config file:
|
|
74
74
|
|
|
75
|
-
### Option 1:
|
|
76
|
-
|
|
77
|
-
By default, the server indexes the directory it is started in. Most clients start MCP servers in the workspace root automatically:
|
|
75
|
+
### Option 1: Absolute Path (Recommended)
|
|
78
76
|
|
|
79
77
|
```json
|
|
80
78
|
{
|
|
81
79
|
"mcpServers": {
|
|
82
80
|
"smart-coding-mcp": {
|
|
83
81
|
"command": "smart-coding-mcp",
|
|
84
|
-
"args": []
|
|
82
|
+
"args": ["--workspace", "/absolute/path/to/your/project"]
|
|
85
83
|
}
|
|
86
84
|
}
|
|
87
85
|
}
|
|
88
86
|
```
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
### Option 2: Multi-Project Support
|
|
91
89
|
|
|
92
90
|
```json
|
|
93
91
|
{
|
|
94
92
|
"mcpServers": {
|
|
95
|
-
"smart-coding-mcp": {
|
|
93
|
+
"smart-coding-mcp-frontend": {
|
|
96
94
|
"command": "smart-coding-mcp",
|
|
97
|
-
"args": ["--workspace", "
|
|
95
|
+
"args": ["--workspace", "/path/to/frontend"]
|
|
96
|
+
},
|
|
97
|
+
"smart-coding-mcp-backend": {
|
|
98
|
+
"command": "smart-coding-mcp",
|
|
99
|
+
"args": ["--workspace", "/path/to/backend"]
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
```
|
|
102
104
|
|
|
103
|
-
|
|
105
|
+
### Option 3: Auto-Detection (May Not Work)
|
|
104
106
|
|
|
105
|
-
|
|
106
|
-
| ---------------- | ----------------------------- |
|
|
107
|
-
| VS Code | Yes |
|
|
108
|
-
| Cursor (Cascade) | Yes |
|
|
109
|
-
| Antigravity | Yes |
|
|
110
|
-
| Claude Desktop | No (use Option 2) |
|
|
107
|
+
> ⚠️ **Warning:** Most MCP clients (including Antigravity and Claude Desktop) do NOT support `${workspaceFolder}` variable expansion. The server will exit with an error if the variable is not expanded.
|
|
111
108
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
For clients that don't support dynamic variables:
|
|
109
|
+
For clients that support dynamic variables (VS Code, Cursor):
|
|
115
110
|
|
|
116
111
|
```json
|
|
117
112
|
{
|
|
118
113
|
"mcpServers": {
|
|
119
114
|
"smart-coding-mcp": {
|
|
120
115
|
"command": "smart-coding-mcp",
|
|
121
|
-
"args": ["--workspace", "
|
|
116
|
+
"args": ["--workspace", "${workspaceFolder}"]
|
|
122
117
|
}
|
|
123
118
|
}
|
|
124
119
|
}
|
|
125
120
|
```
|
|
126
121
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
"command": "smart-coding-mcp",
|
|
134
|
-
"args": ["--workspace", "/path/to/frontend"]
|
|
135
|
-
},
|
|
136
|
-
"smart-coding-mcp-backend": {
|
|
137
|
-
"command": "smart-coding-mcp",
|
|
138
|
-
"args": ["--workspace", "/path/to/backend"]
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
```
|
|
122
|
+
| Client | Supports `${workspaceFolder}` |
|
|
123
|
+
| ---------------- | ----------------------------- |
|
|
124
|
+
| VS Code | Yes |
|
|
125
|
+
| Cursor (Cascade) | Yes |
|
|
126
|
+
| Antigravity | No ❌ |
|
|
127
|
+
| Claude Desktop | No ❌ |
|
|
143
128
|
|
|
144
129
|
## Environment Variables
|
|
145
130
|
|
|
@@ -8,14 +8,14 @@ export class VersionChecker {
|
|
|
8
8
|
/**
|
|
9
9
|
* Creates a new VersionChecker instance.
|
|
10
10
|
* @param {Object} config - Configuration object
|
|
11
|
-
* @param {number} [config.versionCheckTimeout=
|
|
11
|
+
* @param {number} [config.versionCheckTimeout=10000] - Timeout for API requests in ms
|
|
12
12
|
* @param {number} [config.versionCacheTTL=300000] - Cache TTL in ms (default: 5 minutes)
|
|
13
13
|
* @param {number} [config.retryAttempts=1] - Number of retry attempts for failed requests
|
|
14
14
|
* @param {number} [config.retryDelay=500] - Delay between retries in ms
|
|
15
15
|
*/
|
|
16
16
|
constructor(config) {
|
|
17
17
|
this.config = config;
|
|
18
|
-
this.timeout = config.versionCheckTimeout ||
|
|
18
|
+
this.timeout = config.versionCheckTimeout || 10000; // 10 seconds for slow APIs
|
|
19
19
|
this.cacheTTL = config.versionCacheTTL || 300000; // 5 minutes
|
|
20
20
|
this.retryAttempts = config.retryAttempts ?? 1;
|
|
21
21
|
this.retryDelay = config.retryDelay || 500;
|
|
@@ -154,7 +154,8 @@ export class VersionChecker {
|
|
|
154
154
|
// Check for Maven patterns last (generic colon for group:artifact or explicit mvn:)
|
|
155
155
|
if (packageName.startsWith("mvn:") || packageName.includes(":")) return "maven";
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
// Default to npm for unprefixed package names (most common use case)
|
|
158
|
+
return "npm";
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smart-coding-mcp",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "An extensible MCP server that enhances coding productivity with AI-powered features including semantic code search, intelligent indexing, and more, using local LLMs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -81,8 +81,8 @@ describe('VersionChecker Complex Suite', () => {
|
|
|
81
81
|
expect(checker._detectEcosystem("com.google:guava")).toBe("maven");
|
|
82
82
|
});
|
|
83
83
|
|
|
84
|
-
it('should
|
|
85
|
-
expect(checker._detectEcosystem("unknown-pkg")).
|
|
84
|
+
it('should default to npm for unknown patterns', () => {
|
|
85
|
+
expect(checker._detectEcosystem("unknown-pkg")).toBe("npm");
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
|