guardcmd-mcp 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.
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * stdio entrypoint for the GuardCMD MCP server.
4
+ *
5
+ * This is what `npx guardcmd-mcp` runs. Claude Desktop / Cursor / Claude Code
6
+ * spawn it and speak MCP over stdin/stdout. Requires env:
7
+ * - API_BASE_URL (public API origin)
8
+ * - GUARDCMD_API_KEY (caller's API key)
9
+ *
10
+ * IMPORTANT: never write non-protocol output to stdout — it corrupts the JSON-RPC
11
+ * stream. All diagnostics go to stderr.
12
+ */
13
+ export {};
package/dist/stdio.js ADDED
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * stdio entrypoint for the GuardCMD MCP server.
4
+ *
5
+ * This is what `npx guardcmd-mcp` runs. Claude Desktop / Cursor / Claude Code
6
+ * spawn it and speak MCP over stdin/stdout. Requires env:
7
+ * - API_BASE_URL (public API origin)
8
+ * - GUARDCMD_API_KEY (caller's API key)
9
+ *
10
+ * IMPORTANT: never write non-protocol output to stdout — it corrupts the JSON-RPC
11
+ * stream. All diagnostics go to stderr.
12
+ */
13
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
14
+ import { createServer, resolveConfig } from "./server.js";
15
+ async function main() {
16
+ const { baseUrl, apiKey } = resolveConfig();
17
+ if (!baseUrl || !apiKey) {
18
+ console.error("[guardcmd-mcp] Missing GUARDCMD_API_KEY (create one at https://guardcmd.ai). Optionally set API_BASE_URL.");
19
+ process.exit(1);
20
+ }
21
+ const server = createServer({ baseUrl, apiKey });
22
+ const transport = new StdioServerTransport();
23
+ await server.connect(transport);
24
+ console.error(`[guardcmd-mcp] stdio server ready (API_BASE_URL=${baseUrl}). Waiting for MCP client...`);
25
+ }
26
+ main().catch((err) => {
27
+ console.error("[guardcmd-mcp] fatal:", err);
28
+ process.exit(1);
29
+ });
30
+ //# sourceMappingURL=stdio.js.map
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "guardcmd-mcp",
3
+ "version": "0.1.0",
4
+ "description": "MCP server for GuardCMD: abuse checks, prompt screening, agent tool-call authorization, and project/policy management for Claude Code, Cursor, and AI apps.",
5
+ "type": "module",
6
+ "bin": {
7
+ "guardcmd-mcp": "./dist/stdio.js",
8
+ "abuseguard-mcp": "./dist/stdio.js"
9
+ },
10
+ "files": [
11
+ "dist/stdio.js",
12
+ "dist/stdio.d.ts",
13
+ "dist/server.js",
14
+ "dist/server.d.ts",
15
+ "dist/client.js",
16
+ "dist/client.d.ts",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "engines": {
21
+ "node": ">=20"
22
+ },
23
+ "scripts": {
24
+ "build": "tsc -p tsconfig.json && node -e \"try{require('fs').chmodSync('dist/stdio.js',0o755)}catch(e){}\"",
25
+ "start": "node dist/http.js",
26
+ "start:stdio": "node dist/stdio.js",
27
+ "typecheck": "tsc --noEmit",
28
+ "test": "npm run build && node --test dist-test/test/*.test.js",
29
+ "pretest": "tsc -p tsconfig.test.json",
30
+ "prepublishOnly": "npm test"
31
+ },
32
+ "keywords": [
33
+ "mcp",
34
+ "modelcontextprotocol",
35
+ "guardcmd",
36
+ "abuse-detection",
37
+ "fraud",
38
+ "claude",
39
+ "cursor"
40
+ ],
41
+ "author": "GuardCMD",
42
+ "license": "MIT",
43
+ "dependencies": {
44
+ "@modelcontextprotocol/sdk": "^1.30.0",
45
+ "express": "^5.2.1",
46
+ "helmet": "^8.3.0",
47
+ "zod": "^3.25.76"
48
+ },
49
+ "devDependencies": {
50
+ "@types/express": "^5.0.0",
51
+ "@types/node": "^20.14.0",
52
+ "typescript": "^5.6.0"
53
+ },
54
+ "homepage": "https://guardcmd.ai"
55
+ }