@vorim/mcp-server 1.0.0 → 1.1.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 (2) hide show
  1. package/build/index.js +61 -0
  2. package/package.json +1 -1
package/build/index.js CHANGED
@@ -239,6 +239,67 @@ server.registerTool("vorim_verify_trust", {
239
239
  const json = await response.json();
240
240
  return text(json.data || json);
241
241
  });
242
+ // ─── Ephemeral Agents ────────────────────────────────────────────────────
243
+ server.registerTool("vorim_register_ephemeral", {
244
+ description: "Register an ephemeral agent with a did:key identity. Short-lived agents that auto-expire. Returns agent_id, did:key, and keypair.",
245
+ inputSchema: {
246
+ capabilities: z.array(z.string()).describe("List of agent capabilities (e.g. ['search', 'write'])"),
247
+ scopes: z.array(z.string()).describe("Permission scopes to grant (e.g. ['agent:read', 'agent:execute'])"),
248
+ ttl_seconds: z.number().optional().describe("Time-to-live in seconds before the agent auto-expires"),
249
+ },
250
+ }, async ({ capabilities, scopes, ttl_seconds }) => {
251
+ const body = { capabilities, scopes };
252
+ if (ttl_seconds)
253
+ body.ttl_seconds = ttl_seconds;
254
+ const result = await vorimPost("/agents/ephemeral", body);
255
+ return text(result);
256
+ });
257
+ // ─── Credential Delegation ──────────────────────────────────────────────
258
+ server.registerTool("vorim_delegate_credential", {
259
+ description: "Delegate a credential to an agent. Creates a scoped delegation with optional rate limits and expiry.",
260
+ inputSchema: {
261
+ connection_id: z.string().describe("The connection or credential identifier to delegate"),
262
+ agent_id: z.string().describe("The agent receiving the delegation"),
263
+ scopes_delegated: z.array(z.string()).describe("Scopes to delegate (e.g. ['read', 'write'])"),
264
+ max_requests_per_hr: z.number().optional().describe("Maximum requests per hour for this delegation"),
265
+ valid_until: z.string().optional().describe("Expiry timestamp (ISO 8601)"),
266
+ },
267
+ }, async ({ connection_id, agent_id, scopes_delegated, max_requests_per_hr, valid_until }) => {
268
+ const body = { connection_id, agent_id, scopes_delegated };
269
+ if (max_requests_per_hr)
270
+ body.max_requests_per_hr = max_requests_per_hr;
271
+ if (valid_until)
272
+ body.valid_until = valid_until;
273
+ const result = await vorimPost("/credentials/delegations", body);
274
+ return text(result);
275
+ });
276
+ server.registerTool("vorim_request_token", {
277
+ description: "Request a short-lived access token for an agent. Returns a scoped token for the specified provider.",
278
+ inputSchema: {
279
+ agent_id: z.string().describe("The agent requesting the token"),
280
+ scope: z.string().describe("Permission scope for the token"),
281
+ provider_id: z.string().optional().describe("Target provider identifier"),
282
+ },
283
+ }, async ({ agent_id, scope, provider_id }) => {
284
+ const body = { agent_id, scope };
285
+ if (provider_id)
286
+ body.provider_id = provider_id;
287
+ const result = await vorimPost("/credentials/token", body);
288
+ return text(result);
289
+ });
290
+ server.registerTool("vorim_list_delegations", {
291
+ description: "List credential delegations. Optionally filter by agent_id to see delegations for a specific agent.",
292
+ inputSchema: {
293
+ agent_id: z.string().optional().describe("Filter delegations by agent identifier"),
294
+ },
295
+ }, async ({ agent_id }) => {
296
+ const params = new URLSearchParams();
297
+ if (agent_id)
298
+ params.set("agent_id", agent_id);
299
+ const qs = params.toString();
300
+ const result = await vorimGet(`/credentials/delegations${qs ? "?" + qs : ""}`);
301
+ return text(result);
302
+ });
242
303
  // ─── Start ────────────────────────────────────────────────────────────────
243
304
  async function main() {
244
305
  const transport = new StdioServerTransport();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vorim/mcp-server",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "MCP server for Vorim AI — AI agent identity, permissions, and audit trails",
5
5
  "type": "module",
6
6
  "bin": {