@vorim/mcp-server 1.1.2 → 1.1.4

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  **MCP server for AI agent identity, permissions, and audit trails.**
4
4
 
5
- Gives Claude, Cursor, VS Code, Windsurf, and any MCP-compatible client 13 tools to manage AI agent identities through Vorim — register agents, check permissions, emit audit events, verify trust scores, and delegate credentials.
5
+ Gives Claude, Cursor, VS Code, Windsurf, and any MCP-compatible client 17 tools to manage AI agent identities through Vorim — register agents, check permissions, emit audit events, verify trust scores, and delegate credentials.
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/@vorim/mcp-server.svg)](https://www.npmjs.com/package/@vorim/mcp-server)
8
8
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
@@ -102,7 +102,7 @@ Add to `~/.codeium/windsurf/mcp_config.json`:
102
102
 
103
103
  ## Tools
104
104
 
105
- The server exposes 13 tools across five categories:
105
+ The server exposes 17 tools across six categories:
106
106
 
107
107
  ### Health
108
108
 
package/build/index.js CHANGED
@@ -28,13 +28,27 @@ if (!API_KEY) {
28
28
  process.exit(1);
29
29
  }
30
30
  // ─── HTTP Client ──────────────────────────────────────────────────────────
31
+ // Read the package version once so the User-Agent string and the MCP
32
+ // server's advertised version stay in sync with package.json.
33
+ // require() works in the CommonJS build path; for the ESM-only build
34
+ // we fall back to a constant that must match package.json.
35
+ const MCP_VERSION = "1.1.4";
36
+ /**
37
+ * URL-encode a user-supplied path segment. Agent ids, scopes, and
38
+ * chain ids all reach the API via path interpolation; raw slashes or
39
+ * other special characters from a misbehaving caller would otherwise
40
+ * either escape the intended route or be sent verbatim.
41
+ */
42
+ function encId(s) {
43
+ return encodeURIComponent(s);
44
+ }
31
45
  async function vorimRequest(method, path, body) {
32
46
  const response = await fetch(`${BASE_URL}/v1${path}`, {
33
47
  method,
34
48
  headers: {
35
49
  "Authorization": `Bearer ${API_KEY}`,
36
50
  "Content-Type": "application/json",
37
- "User-Agent": "vorim-mcp-server/1.0.0",
51
+ "User-Agent": `vorim-mcp-server/${MCP_VERSION}`,
38
52
  },
39
53
  body: body ? JSON.stringify(body) : undefined,
40
54
  });
@@ -64,7 +78,7 @@ function text(data) {
64
78
  // ─── MCP Server ───────────────────────────────────────────────────────────
65
79
  const server = new McpServer({
66
80
  name: "vorim",
67
- version: "1.0.0",
81
+ version: MCP_VERSION,
68
82
  });
69
83
  // ─── Health ───────────────────────────────────────────────────────────────
70
84
  server.registerTool("vorim_ping", {
@@ -96,7 +110,7 @@ server.registerTool("vorim_get_agent", {
96
110
  agent_id: z.string().describe("The agent identifier (e.g. agid_acme_a1b2c3d4)"),
97
111
  },
98
112
  }, async ({ agent_id }) => {
99
- const result = await vorimGet(`/agents/${agent_id}`);
113
+ const result = await vorimGet(`/agents/${encId(agent_id)}`);
100
114
  return text(result);
101
115
  });
102
116
  server.registerTool("vorim_list_agents", {
@@ -129,7 +143,7 @@ server.registerTool("vorim_update_agent", {
129
143
  },
130
144
  }, async ({ agent_id, ...updates }) => {
131
145
  const body = Object.fromEntries(Object.entries(updates).filter(([, v]) => v !== undefined));
132
- const result = await vorimPatch(`/agents/${agent_id}`, body);
146
+ const result = await vorimPatch(`/agents/${encId(agent_id)}`, body);
133
147
  return text(result);
134
148
  });
135
149
  server.registerTool("vorim_revoke_agent", {
@@ -137,8 +151,9 @@ server.registerTool("vorim_revoke_agent", {
137
151
  inputSchema: {
138
152
  agent_id: z.string().describe("The agent identifier to revoke"),
139
153
  },
154
+ annotations: { destructiveHint: true, idempotentHint: true, readOnlyHint: false },
140
155
  }, async ({ agent_id }) => {
141
- const result = await vorimDelete(`/agents/${agent_id}`);
156
+ const result = await vorimDelete(`/agents/${encId(agent_id)}`);
142
157
  return text(result);
143
158
  });
144
159
  // ─── Permissions ──────────────────────────────────────────────────────────
@@ -148,8 +163,9 @@ server.registerTool("vorim_check_permission", {
148
163
  agent_id: z.string().describe("The agent identifier"),
149
164
  scope: z.string().describe("Permission scope to check (e.g. agent:read, agent:execute)"),
150
165
  },
166
+ annotations: { readOnlyHint: true },
151
167
  }, async ({ agent_id, scope }) => {
152
- const result = await vorimPost(`/agents/${agent_id}/permissions/verify`, { scope });
168
+ const result = await vorimPost(`/agents/${encId(agent_id)}/permissions/verify`, { scope });
153
169
  return text(result);
154
170
  });
155
171
  server.registerTool("vorim_grant_permission", {
@@ -168,7 +184,7 @@ server.registerTool("vorim_grant_permission", {
168
184
  if (rate_limit_max && rate_limit_window) {
169
185
  body.rate_limit = { max: rate_limit_max, window: rate_limit_window };
170
186
  }
171
- const result = await vorimPost(`/agents/${agent_id}/permissions`, body);
187
+ const result = await vorimPost(`/agents/${encId(agent_id)}/permissions`, body);
172
188
  return text(result);
173
189
  });
174
190
  server.registerTool("vorim_list_permissions", {
@@ -176,8 +192,9 @@ server.registerTool("vorim_list_permissions", {
176
192
  inputSchema: {
177
193
  agent_id: z.string().describe("The agent identifier"),
178
194
  },
195
+ annotations: { readOnlyHint: true },
179
196
  }, async ({ agent_id }) => {
180
- const result = await vorimGet(`/agents/${agent_id}/permissions`);
197
+ const result = await vorimGet(`/agents/${encId(agent_id)}/permissions`);
181
198
  return text(result);
182
199
  });
183
200
  server.registerTool("vorim_revoke_permission", {
@@ -186,13 +203,14 @@ server.registerTool("vorim_revoke_permission", {
186
203
  agent_id: z.string().describe("The agent identifier"),
187
204
  scope: z.string().describe("Permission scope to revoke"),
188
205
  },
206
+ annotations: { destructiveHint: true, idempotentHint: true, readOnlyHint: false },
189
207
  }, async ({ agent_id, scope }) => {
190
- const result = await vorimDelete(`/agents/${agent_id}/permissions/${scope}`);
208
+ const result = await vorimDelete(`/agents/${encId(agent_id)}/permissions/${encId(scope)}`);
191
209
  return text(result);
192
210
  });
193
211
  // ─── Audit ────────────────────────────────────────────────────────────────
194
212
  server.registerTool("vorim_emit_event", {
195
- description: "Log an audit event for an agent action. Every agent action should be logged for compliance and traceability.",
213
+ description: "Log an audit event for an agent action. Every agent action should be logged for compliance and traceability. NOTE: events emitted via the MCP server are sent unsigned because the MCP server does not hold the agent's private key. For tamper-evident audit trails sign client-side via @vorim/sdk before emit.",
196
214
  inputSchema: {
197
215
  agent_id: z.string().describe("The agent that performed the action"),
198
216
  event_type: z.string().describe("Event category: tool_call, api_request, message_sent, permission_change, status_change"),
@@ -233,8 +251,8 @@ server.registerTool("vorim_verify_trust", {
233
251
  agent_id: z.string().describe("The agent identifier to verify"),
234
252
  },
235
253
  }, async ({ agent_id }) => {
236
- const response = await fetch(`${BASE_URL}/v1/trust/verify/${agent_id}`, {
237
- headers: { "User-Agent": "vorim-mcp-server/1.0.0" },
254
+ const response = await fetch(`${BASE_URL}/v1/trust/verify/${encId(agent_id)}`, {
255
+ headers: { "User-Agent": `vorim-mcp-server/${MCP_VERSION}` },
238
256
  });
239
257
  const json = await response.json();
240
258
  return text(json.data || json);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vorim/mcp-server",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "mcpName": "io.github.Kzino/vorim-mcp-server",
5
5
  "description": "MCP server for Vorim AI — AI agent identity, permissions, and audit trails",
6
6
  "type": "module",
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "scripts": {
11
11
  "build": "tsc && chmod 755 build/index.js",
12
+ "prepublishOnly": "npm run build",
12
13
  "dev": "tsx src/index.ts"
13
14
  },
14
15
  "files": [