@golproductions/check-mcp 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GOL Productions
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # check-mcp
2
+
3
+ MCP server for **Check** — validate any command before execution.
4
+
5
+ AI agents don't know if their own commands will work. Check does. $0.04 per check.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @golproductions/check-mcp
11
+ ```
12
+
13
+ Or run directly:
14
+
15
+ ```bash
16
+ npx @golproductions/check-mcp
17
+ ```
18
+
19
+ ## Setup
20
+
21
+ Add to your MCP config (Claude Code, Cursor, etc.):
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "check": {
27
+ "command": "npx",
28
+ "args": ["@golproductions/check-mcp"],
29
+ "env": {
30
+ "GOL_CLIENT_ID": "your_client_id"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ Get your API key at [golproductions.com/check.html](https://www.golproductions.com/check.html)
38
+
39
+ ## What it does
40
+
41
+ One tool: `check`
42
+
43
+ The agent calls `check` before executing any shell command. It returns:
44
+
45
+ - **RUNNABLE** — the command will work, execute it
46
+ - **INVALID** — the command will fail or is unsafe, with a reason
47
+
48
+ ## Why
49
+
50
+ Every wrong command an AI agent runs triggers a retry loop. Every retry is an inference call you're paying for. Check breaks the loop at step 1.
51
+
52
+ ## Pricing
53
+
54
+ $0.04 AUD per check.
55
+
56
+ ## License
57
+
58
+ MIT
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@golproductions/check-mcp",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for Check — validate any shell command before execution. AI agents call Check to know if a command will work before running it.",
5
+ "bin": {
6
+ "check-mcp": "./src/index.js"
7
+ },
8
+ "type": "module",
9
+ "engines": {
10
+ "node": ">=18"
11
+ },
12
+ "files": [
13
+ "src/"
14
+ ],
15
+ "keywords": [
16
+ "mcp",
17
+ "model-context-protocol",
18
+ "preflight",
19
+ "command-validation",
20
+ "ai-safety",
21
+ "ai-agents"
22
+ ],
23
+ "license": "MIT",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/golproductions/check-mcp"
27
+ },
28
+ "homepage": "https://www.golproductions.com/check.html",
29
+ "dependencies": {
30
+ "@modelcontextprotocol/sdk": "^1.12.0",
31
+ "zod": "^3.24.0"
32
+ }
33
+ }
package/src/index.js ADDED
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
4
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
+ import { z } from "zod";
6
+
7
+ const CHECK_API = "https://triage.golproductions.com/preflight";
8
+ const CLIENT_ID = process.env.GOL_CLIENT_ID;
9
+
10
+ if (!CLIENT_ID) {
11
+ process.stderr.write("check-mcp: GOL_CLIENT_ID environment variable is required.\n");
12
+ process.stderr.write("Get your key at https://www.golproductions.com/check.html\n");
13
+ process.exit(1);
14
+ }
15
+
16
+ const server = new McpServer({
17
+ name: "check",
18
+ version: "1.0.0",
19
+ });
20
+
21
+ server.tool(
22
+ "Check",
23
+ "Validate whether a shell command will work before executing it. " +
24
+ "Returns 'runnable' if the command is safe and functional, or 'invalid' with a reason if it will fail. " +
25
+ "Call Check before running any shell command, curl request, or system operation. " +
26
+ "Costs $0.04 AUD per check. Saves compute by preventing failed executions and retry loops.",
27
+ {
28
+ command: z
29
+ .string()
30
+ .max(10000)
31
+ .describe("The shell command to validate before execution"),
32
+ },
33
+ async ({ command }) => {
34
+ try {
35
+ const res = await fetch(CHECK_API, {
36
+ method: "POST",
37
+ headers: {
38
+ "Content-Type": "application/json",
39
+ "X-GOL-CLIENT-ID": CLIENT_ID,
40
+ "User-Agent": "check-mcp/1.0.0",
41
+ },
42
+ body: JSON.stringify({ command }),
43
+ });
44
+
45
+ const data = await res.json();
46
+
47
+ if (!res.ok) {
48
+ return {
49
+ content: [
50
+ {
51
+ type: "text",
52
+ text: `Error: ${data.error || res.statusText}`,
53
+ },
54
+ ],
55
+ isError: true,
56
+ };
57
+ }
58
+
59
+ const verdict = data.verdict === "runnable" ? "RUNNABLE" : "INVALID";
60
+ const parts = [`Verdict: ${verdict}`];
61
+ if (data.reason) parts.push(`Reason: ${data.reason}`);
62
+
63
+ return {
64
+ content: [{ type: "text", text: parts.join("\n") }],
65
+ };
66
+ } catch (err) {
67
+ return {
68
+ content: [
69
+ { type: "text", text: `Check API error: ${err.message}` },
70
+ ],
71
+ isError: true,
72
+ };
73
+ }
74
+ }
75
+ );
76
+
77
+ const transport = new StdioServerTransport();
78
+ await server.connect(transport);