@arkhe-zero/mcp 0.0.0-stage → 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.
Files changed (3) hide show
  1. package/package.json +7 -4
  2. package/server.mjs +33 -0
  3. package/README.md +0 -3
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@arkhe-zero/mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "MCP server for ARKHE-ZERO PCS-51-49 verification",
5
+ "type": "module",
6
+ "bin": { "arkhe-zero-mcp": "./server.mjs" },
7
+ "dependencies": { "@modelcontextprotocol/sdk": "^1.12.0" },
8
+ "license": "Apache-2.0"
9
+ }
package/server.mjs ADDED
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { z } from "zod";
5
+ import { createHash } from "node:crypto";
6
+ import { readFile } from "node:fs/promises";
7
+
8
+ const BASE = "https://sycro-valdovinos.github.io/ARKHE-ZERO";
9
+ const server = new McpServer({ name: "arkhe-zero", version: "1.0.0" });
10
+
11
+ server.tool("arkhe_get_llms", {}, async () => {
12
+ const r = await fetch(`${BASE}/llms.txt`);
13
+ return { content: [{ type: "text", text: await r.text() }] };
14
+ });
15
+
16
+ server.tool("arkhe_get_schema", {}, async () => {
17
+ const r = await fetch(`${BASE}/spec/arkhe-pcs-v1.schema.json`);
18
+ return { content: [{ type: "text", text: await r.text() }] };
19
+ });
20
+
21
+ server.tool("arkhe_verify_sha256", { data: z.string(), expected_sha256: z.string() }, async ({ data, expected_sha256 }) => {
22
+ const got = createHash("sha256").update(data).digest("hex");
23
+ const ok = got.toLowerCase() === expected_sha256.toLowerCase();
24
+ return { content: [{ type: "text", text: JSON.stringify({ ok, got, expected: expected_sha256, timestamp_legal: "NO_EMITIDA - requiere PSC NOM-151 / QTSA eIDAS RFC 3161" }, null, 2) }] };
25
+ });
26
+
27
+ server.tool("arkhe_verify_local_file", { path: z.string(), expected_sha256: z.string() }, async ({ path, expected_sha256 }) => {
28
+ const buf = await readFile(path);
29
+ const got = createHash("sha256").update(buf).digest("hex");
30
+ return { content: [{ type: "text", text: JSON.stringify({ ok: got.toLowerCase() === expected_sha256.toLowerCase(), got, expected: expected_sha256 }, null, 2) }] };
31
+ });
32
+
33
+ await server.connect(new StdioServerTransport());
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.