@getcodesentinel/mcp 0.0.0-stage → 0.1.0
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 +30 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -4
- package/server.json +24 -0
package/README.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @getcodesentinel/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
stdio MCP server for CodeSentinel. It exposes the ownership, risk, trend and reading-path data
|
|
4
|
+
that CodeSentinel already computes to MCP clients such as Claude Code, Claude Desktop, Cursor
|
|
5
|
+
and VS Code.
|
|
6
|
+
|
|
7
|
+
This package is a thin `bin` wrapper around `codesentinel mcp`; all analysis lives in the CLI.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx -y @getcodesentinel/mcp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Use `CODESENTINEL_ROOT` when the client does not launch the process from the repository root.
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"codesentinel": {
|
|
19
|
+
"command": "npx",
|
|
20
|
+
"args": ["-y", "@getcodesentinel/mcp"],
|
|
21
|
+
"env": { "CODESENTINEL_ROOT": "/path/to/repository" }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
All tools are read-only except `run_scan`, which writes a snapshot under
|
|
28
|
+
`.codesentinel/snapshots`. Logs go to stderr; stdout carries only MCP JSON-RPC messages.
|
|
29
|
+
|
|
30
|
+
See the [MCP server section](https://github.com/getcodesentinel/codesentinel#mcp-server) in the
|
|
31
|
+
main README for registration snippets, the tool table and security notes.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { spawn } from "child_process";
|
|
5
|
+
import { createRequire } from "module";
|
|
6
|
+
import { pathToFileURL } from "url";
|
|
7
|
+
var require2 = createRequire(import.meta.url);
|
|
8
|
+
var spawnCodesentinelMcp = (argv) => {
|
|
9
|
+
const cliEntry = require2.resolve("@getcodesentinel/codesentinel");
|
|
10
|
+
const child = spawn(process.execPath, [cliEntry, "mcp", ...argv], {
|
|
11
|
+
stdio: "inherit",
|
|
12
|
+
env: process.env
|
|
13
|
+
});
|
|
14
|
+
const forward = (signal) => {
|
|
15
|
+
child.kill(signal);
|
|
16
|
+
};
|
|
17
|
+
const cleanup = () => {
|
|
18
|
+
process.off("SIGINT", forward);
|
|
19
|
+
process.off("SIGTERM", forward);
|
|
20
|
+
};
|
|
21
|
+
process.on("SIGINT", forward);
|
|
22
|
+
process.on("SIGTERM", forward);
|
|
23
|
+
child.on("exit", (code) => {
|
|
24
|
+
cleanup();
|
|
25
|
+
process.exitCode = code ?? 1;
|
|
26
|
+
});
|
|
27
|
+
child.on("error", () => {
|
|
28
|
+
cleanup();
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
});
|
|
31
|
+
return child;
|
|
32
|
+
};
|
|
33
|
+
if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) {
|
|
34
|
+
spawnCodesentinelMcp(process.argv.slice(2));
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
spawnCodesentinelMcp
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { spawn, type ChildProcess } from \"node:child_process\";\nimport { createRequire } from \"node:module\";\nimport { pathToFileURL } from \"node:url\";\n\nconst require = createRequire(import.meta.url);\n\nexport const spawnCodesentinelMcp = (argv: readonly string[]): ChildProcess => {\n const cliEntry = require.resolve(\"@getcodesentinel/codesentinel\");\n const child = spawn(process.execPath, [cliEntry, \"mcp\", ...argv], {\n stdio: \"inherit\",\n env: process.env,\n });\n\n const forward = (signal: NodeJS.Signals): void => {\n child.kill(signal);\n };\n const cleanup = (): void => {\n process.off(\"SIGINT\", forward);\n process.off(\"SIGTERM\", forward);\n };\n\n process.on(\"SIGINT\", forward);\n process.on(\"SIGTERM\", forward);\n child.on(\"exit\", (code) => {\n cleanup();\n process.exitCode = code ?? 1;\n });\n child.on(\"error\", () => {\n cleanup();\n process.exitCode = 1;\n });\n\n return child;\n};\n\nif (import.meta.url === pathToFileURL(process.argv[1] ?? \"\").href) {\n spawnCodesentinelMcp(process.argv.slice(2));\n}\n"],"mappings":";;;AAAA,SAAS,aAAgC;AACzC,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAE9B,IAAMA,WAAU,cAAc,YAAY,GAAG;AAEtC,IAAM,uBAAuB,CAAC,SAA0C;AAC7E,QAAM,WAAWA,SAAQ,QAAQ,+BAA+B;AAChE,QAAM,QAAQ,MAAM,QAAQ,UAAU,CAAC,UAAU,OAAO,GAAG,IAAI,GAAG;AAAA,IAChE,OAAO;AAAA,IACP,KAAK,QAAQ;AAAA,EACf,CAAC;AAED,QAAM,UAAU,CAAC,WAAiC;AAChD,UAAM,KAAK,MAAM;AAAA,EACnB;AACA,QAAM,UAAU,MAAY;AAC1B,YAAQ,IAAI,UAAU,OAAO;AAC7B,YAAQ,IAAI,WAAW,OAAO;AAAA,EAChC;AAEA,UAAQ,GAAG,UAAU,OAAO;AAC5B,UAAQ,GAAG,WAAW,OAAO;AAC7B,QAAM,GAAG,QAAQ,CAAC,SAAS;AACzB,YAAQ;AACR,YAAQ,WAAW,QAAQ;AAAA,EAC7B,CAAC;AACD,QAAM,GAAG,SAAS,MAAM;AACtB,YAAQ;AACR,YAAQ,WAAW;AAAA,EACrB,CAAC;AAED,SAAO;AACT;AAEA,IAAI,YAAY,QAAQ,cAAc,QAAQ,KAAK,CAAC,KAAK,EAAE,EAAE,MAAM;AACjE,uBAAqB,QAAQ,KAAK,MAAM,CAAC,CAAC;AAC5C;","names":["require"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getcodesentinel/mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"mcpName": "io.github.getcodesentinel/mcp",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "stdio MCP server for CodeSentinel: ownership, risk, trend and reading path for AI coding agents.",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=22"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"codesentinel-mcp": "dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsup",
|
|
16
|
+
"test": "vitest run --passWithNoTests"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"server.json",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@getcodesentinel/codesentinel": "^1.42.1"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/getcodesentinel/codesentinel"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/getcodesentinel/codesentinel#readme",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/getcodesentinel/codesentinel/issues"
|
|
36
|
+
}
|
|
37
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.getcodesentinel/mcp",
|
|
4
|
+
"description": "CodeSentinel over MCP: file ownership, risk, trends and reading paths from your git history.",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"title": "CodeSentinel",
|
|
7
|
+
"websiteUrl": "https://github.com/getcodesentinel/codesentinel",
|
|
8
|
+
"repository": {
|
|
9
|
+
"url": "https://github.com/getcodesentinel/codesentinel",
|
|
10
|
+
"source": "github",
|
|
11
|
+
"subfolder": "packages/mcp"
|
|
12
|
+
},
|
|
13
|
+
"packages": [
|
|
14
|
+
{
|
|
15
|
+
"registryType": "npm",
|
|
16
|
+
"identifier": "@getcodesentinel/mcp",
|
|
17
|
+
"version": "0.1.0",
|
|
18
|
+
"runtimeHint": "node",
|
|
19
|
+
"transport": {
|
|
20
|
+
"type": "stdio"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|