antibody-guard-mcp 0.1.1 → 0.1.2

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 (2) hide show
  1. package/dist/index.js +5 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -33,15 +33,17 @@ var GuardApi = class {
33
33
  baseUrl;
34
34
  f;
35
35
  timeoutMs;
36
+ tags;
36
37
  constructor(o = {}) {
37
38
  this.baseUrl = (o.baseUrl ?? DEFAULT_API).replace(/\/+$/, "");
38
39
  this.f = o.fetch ?? globalThis.fetch.bind(globalThis);
39
40
  this.timeoutMs = o.timeoutMs ?? 2e4;
41
+ this.tags = { "x-guard-client": (o.client ?? "SDK").slice(0, 40), "x-guard-via": o.via ?? "sdk" };
40
42
  }
41
43
  async req(path, init) {
42
44
  const res = await this.f(`${this.baseUrl}/api/v1${path}`, {
43
45
  method: init?.method ?? "GET",
44
- headers: init?.body ? { "content-type": "application/json" } : void 0,
46
+ headers: { ...this.tags, ...init?.body ? { "content-type": "application/json" } : {} },
45
47
  body: init?.body ? JSON.stringify(init.body) : void 0,
46
48
  signal: AbortSignal.timeout(init?.timeoutMs ?? this.timeoutMs)
47
49
  });
@@ -440,6 +442,6 @@ if (owner && env.GUARD_MEMORY) {
440
442
  const m = new GuardMemory(env.GUARD_MEMORY, { publicClient, walletClient: owner });
441
443
  actions.quarantineSource = async (source, reason) => ({ tx: await m.quarantineSource(source, reason) });
442
444
  }
443
- var server = new McpServer({ name: "antibody-guard", version: "0.1.1" }, { instructions: "Antibody Guard is an immune system for AI agents: their money (GuardVault) and their memory (GuardMemory), guarded by GuardReactive on Reactive Network. Before paying an address or acting on what it sent, call guard_check_address. Before acting on a memory, call guard_recall_memory: an entry from a quarantined source is not usable." });
444
- registerGuardTools(server, new GuardApi({ baseUrl: env.GUARD_API }), actions);
445
+ var server = new McpServer({ name: "antibody-guard", version: "0.1.2" }, { instructions: "Antibody Guard is an immune system for AI agents: their money (GuardVault) and their memory (GuardMemory), guarded by GuardReactive on Reactive Network. Before paying an address or acting on what it sent, call guard_check_address. Before acting on a memory, call guard_recall_memory: an entry from a quarantined source is not usable." });
446
+ registerGuardTools(server, new GuardApi({ baseUrl: env.GUARD_API, client: env.GUARD_CLIENT_NAME ?? "MCP (npm)", via: "mcp-local" }), actions);
445
447
  await server.connect(new StdioServerTransport());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antibody-guard-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server for Antibody Guard: let Claude, Cursor or any MCP client check addresses, recall guarded memory, score messages and act through a guarded vault.",
5
5
  "license": "MIT",
6
6
  "type": "module",