apex-psi-mcp 1.2.0 → 1.2.1
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 +21 -1
- package/package.json +6 -2
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
17
17
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
18
|
+
import { readFileSync } from "node:fs";
|
|
18
19
|
import { z } from "zod";
|
|
19
20
|
// Configuration
|
|
20
21
|
const APEX_API_BASE = (process.env.APEX_API_BASE || "https://qhtntebpcribjiwrdtdd.supabase.co/functions/v1").replace(/\/$/, "");
|
|
@@ -22,7 +23,26 @@ const APEX_API_KEY = process.env.APEX_API_KEY || "";
|
|
|
22
23
|
// Human-facing site. The API host is a Supabase function and is not a page a
|
|
23
24
|
// person can open, so every link handed back to a user points here instead.
|
|
24
25
|
const APEX_SITE_BASE = (process.env.APEX_SITE_BASE || "https://www.ai-governance-standard.com").replace(/\/$/, "");
|
|
25
|
-
|
|
26
|
+
// The version this server announces is the version it ships, read from the same
|
|
27
|
+
// package.json npm published. It was a literal here until 16 Nov, and the literal was
|
|
28
|
+
// still "1.1.2" when 1.2.0 went out — so every MCP client was told the server was
|
|
29
|
+
// 1.1.2 while the registry said 1.2.0. scripts/server-version-check.mjs now fails the
|
|
30
|
+
// build if these two ever disagree again.
|
|
31
|
+
const VERSION = readPackageVersion();
|
|
32
|
+
function readPackageVersion() {
|
|
33
|
+
try {
|
|
34
|
+
const pkgUrl = new URL("../package.json", import.meta.url);
|
|
35
|
+
const pkg = JSON.parse(readFileSync(pkgUrl, "utf8"));
|
|
36
|
+
if (typeof pkg.version === "string" && pkg.version.length > 0)
|
|
37
|
+
return pkg.version;
|
|
38
|
+
console.error("apex-psi-mcp: package.json carries no version; announcing 0.0.0-unknown");
|
|
39
|
+
return "0.0.0-unknown";
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
console.error("apex-psi-mcp: package.json could not be read; announcing 0.0.0-unknown");
|
|
43
|
+
return "0.0.0-unknown";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
26
46
|
// Helper: make an API call to the Apex PSI backend
|
|
27
47
|
async function apexApiCall(endpoint, method = "GET", body) {
|
|
28
48
|
const url = `${APEX_API_BASE}${endpoint}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apex-psi-mcp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"mcpName": "io.github.kawal393/apex-psi-mcp",
|
|
5
5
|
"description": "APEX PSI MCP server - append-only evidence receipts for AI decisions and documents: seal a record, verify a hash against the public ledger, check a chain, cite a receipt, read Bitcoin anchoring status. Verification is free and needs no account.",
|
|
6
6
|
"type": "module",
|
|
@@ -21,8 +21,12 @@
|
|
|
21
21
|
"start": "node dist/index.js",
|
|
22
22
|
"dev": "tsx src/index.ts",
|
|
23
23
|
"check:roundtrip": "node scripts/roundtrip-check.mjs",
|
|
24
|
-
"check:all": "npm run build && node scripts/roundtrip-check.mjs && node scripts/anchor-tool-check.mjs && node scripts/card-copy-check.mjs && node scripts/registry-card-check.mjs && node scripts/gate-check.mjs",
|
|
24
|
+
"check:all": "npm run build && node scripts/roundtrip-check.mjs && node scripts/anchor-tool-check.mjs && node scripts/card-copy-check.mjs && node scripts/registry-card-check.mjs && node scripts/gate-check.mjs && node scripts/server-version-check.mjs",
|
|
25
25
|
"check:registry-card": "node scripts/registry-card-check.mjs",
|
|
26
|
+
"check:card-copy": "node scripts/card-copy-check.mjs",
|
|
27
|
+
"check:version": "node scripts/server-version-check.mjs",
|
|
28
|
+
"check:version:selftest": "node scripts/server-version-check.mjs --self-test",
|
|
29
|
+
"check:card-copy:selftest": "node scripts/card-copy-check.mjs --self-test",
|
|
26
30
|
"check:gate": "node scripts/gate-check.mjs"
|
|
27
31
|
},
|
|
28
32
|
"keywords": [
|