@socketsecurity/mcp 0.0.4 → 0.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/README.md +3 -3
- package/build/index.js +11 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -110,11 +110,11 @@ To use this MCP server in VS Code:
|
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
3. Now you can ask questions about dependency security within your VS Code environment.
|
|
113
|
-
4. Feel free to add the following to your `.github/copilot-instructions.md` file to control better how the
|
|
113
|
+
4. Feel free to add the following to your `.github/copilot-instructions.md` file to control better how the tool is used by your agent:
|
|
114
114
|
|
|
115
115
|
```markdown
|
|
116
116
|
## Socket MCP Server
|
|
117
|
-
Always check the
|
|
117
|
+
Always check the dependency scores with the depscore tool when you add a new dependency. If the score is low, consider using an alternative library or writing the code yourself. If you decide to use a library with a low score, make sure to document the reasons for your choice. If you are unsure about the score, ask for a review from someone with more experience.
|
|
118
118
|
|
|
119
119
|
When checking dependencies, make sure to also check the imports not just the pyproject.toml/package.json/dependency file.
|
|
120
120
|
```
|
|
@@ -191,7 +191,7 @@ You can further customize how the Socket MCP server interacts with your AI assis
|
|
|
191
191
|
Rules that can be added to the client rules file include the following:
|
|
192
192
|
|
|
193
193
|
```md
|
|
194
|
-
Always check dependency scores with the
|
|
194
|
+
Always check dependency scores with the depscore tool when you add a new dependency. If the score is low, consider using an alternative library or writing the code yourself. If you are unsure about the score, ask for a review from someone with more experience. When checking dependencies, make sure to also check the imports not just the pyproject.toml/package.json/dependency file.
|
|
195
195
|
```
|
|
196
196
|
|
|
197
197
|
You can adjust the rules to fit your needs. For example, you can add rules to include specific manifest files, or guide the AI assistant on how to handle low scores. The rules are flexible and can be tailored to your workflow.
|
package/build/index.js
CHANGED
|
@@ -225,6 +225,17 @@ if (useHttp) {
|
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
227
|
const url = new URL(req.url, `http://localhost:${port}`);
|
|
228
|
+
// Health check endpoint for K8s/Docker
|
|
229
|
+
if (url.pathname === '/health') {
|
|
230
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
231
|
+
res.end(JSON.stringify({
|
|
232
|
+
status: 'healthy',
|
|
233
|
+
service: 'socket-mcp',
|
|
234
|
+
version: VERSION,
|
|
235
|
+
timestamp: new Date().toISOString()
|
|
236
|
+
}));
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
228
239
|
if (url.pathname === '/mcp') {
|
|
229
240
|
if (req.method === 'POST') {
|
|
230
241
|
// Handle JSON-RPC messages
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"socket-mcp": "./build/index.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "tsc && chmod 755 ./build/index.js && (chmod 755 ./build/mock-client/*.js 2>/dev/null || true)",
|
|
10
|
+
"build": "tsc && tsc -p tsconfig.mock-client.json && chmod 755 ./build/index.js && (chmod 755 ./build/mock-client/*.js 2>/dev/null || true)",
|
|
11
11
|
"debug:stdio": "node ./build/mock-client/debug-client.js",
|
|
12
12
|
"debug:sdk": "node ./build/mock-client/stdio-client.js",
|
|
13
13
|
"debug:http": "node ./build/mock-client/http-client.js",
|