openkrak-mcp 1.0.5 → 1.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/dist/index.js +4 -4
- package/package.json +31 -30
package/dist/index.js
CHANGED
|
@@ -244980,7 +244980,7 @@ function getFingerprint() {
|
|
|
244980
244980
|
const raw = `${(0, import_node_os.hostname)()}:${(0, import_node_os.userInfo)().username}`;
|
|
244981
244981
|
return (0, import_node_crypto.createHash)("sha256").update(raw).digest("hex").slice(0, 32);
|
|
244982
244982
|
}
|
|
244983
|
-
async function checkLicense() {
|
|
244983
|
+
async function checkLicense(tool = "unknown") {
|
|
244984
244984
|
if (PRO_KEY) {
|
|
244985
244985
|
try {
|
|
244986
244986
|
const res = await fetch(`${WORKER_URL}/v3/validate`, {
|
|
@@ -245004,14 +245004,14 @@ async function checkLicense() {
|
|
|
245004
245004
|
const res = await fetch(`${WORKER_URL}/v3/free-query`, {
|
|
245005
245005
|
method: "POST",
|
|
245006
245006
|
headers: { "Content-Type": "application/json" },
|
|
245007
|
-
body: JSON.stringify({ fingerprint: fp })
|
|
245007
|
+
body: JSON.stringify({ fingerprint: fp, tool })
|
|
245008
245008
|
});
|
|
245009
245009
|
const data = await res.json();
|
|
245010
245010
|
if (data.allowed) return { allowed: true, tier: "free", remaining: data.remaining };
|
|
245011
245011
|
return {
|
|
245012
245012
|
allowed: false,
|
|
245013
245013
|
tier: "blocked",
|
|
245014
|
-
reason: `Free tier limit reached (15 calls/24h). Upgrade at openkrak-web.vercel.app \
|
|
245014
|
+
reason: `Free tier limit reached (15 calls/24h). Upgrade at openkrak-web.vercel.app \xE2\u20AC\u201D $8/month unlimited.`
|
|
245015
245015
|
};
|
|
245016
245016
|
} catch {
|
|
245017
245017
|
return { allowed: true, tier: "free" };
|
|
@@ -245103,7 +245103,7 @@ server2.setRequestHandler(import_types.ListToolsRequestSchema, async () => ({
|
|
|
245103
245103
|
}));
|
|
245104
245104
|
server2.setRequestHandler(import_types.CallToolRequestSchema, async (request) => {
|
|
245105
245105
|
const { name, arguments: args } = request.params;
|
|
245106
|
-
const license = await checkLicense();
|
|
245106
|
+
const license = await checkLicense(name);
|
|
245107
245107
|
if (!license.allowed) {
|
|
245108
245108
|
return {
|
|
245109
245109
|
content: [{ type: "text", text: `OpenKrak: ${license.reason}` }],
|
package/package.json
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "openkrak-mcp",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "OpenKrak MCP Server - AI coding intelligence via Dorchester engine",
|
|
5
|
+
"bin": {
|
|
6
|
+
"openkrak-mcp": "./dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsup",
|
|
15
|
+
"dev": "tsx src/index.ts",
|
|
16
|
+
"start": "node dist/index.js",
|
|
17
|
+
"prepublishOnly": "npm run build"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^20.0.0",
|
|
24
|
+
"dorchester": "file:../engine-dorchester",
|
|
25
|
+
"tsup": "^8.0.0",
|
|
26
|
+
"tsx": "^4.0.0",
|
|
27
|
+
"typescript": "^5.0.0"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=18"
|
|
31
|
+
}
|
|
31
32
|
}
|