@vorim/mcp-server 1.0.0 → 1.1.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/README.md +206 -0
- package/build/index.js +61 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# @vorim/mcp-server
|
|
2
|
+
|
|
3
|
+
**MCP server for AI agent identity, permissions, and audit trails.**
|
|
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.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@vorim/mcp-server)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
|
|
10
|
+
> **[vorim.ai](https://vorim.ai)** — Create a free account and get your API key in 30 seconds.
|
|
11
|
+
> **[Documentation](https://vorim.ai/docs)** — Full API reference and guides.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### Claude Desktop
|
|
18
|
+
|
|
19
|
+
Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"vorim": {
|
|
25
|
+
"command": "npx",
|
|
26
|
+
"args": ["@vorim/mcp-server"],
|
|
27
|
+
"env": {
|
|
28
|
+
"VORIM_API_KEY": "agid_sk_live_..."
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Claude Code
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
claude mcp add vorim -- npx @vorim/mcp-server
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Set the API key in your environment:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
export VORIM_API_KEY=agid_sk_live_...
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Cursor
|
|
48
|
+
|
|
49
|
+
Add to `.cursor/mcp.json`:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"mcpServers": {
|
|
54
|
+
"vorim": {
|
|
55
|
+
"command": "npx",
|
|
56
|
+
"args": ["@vorim/mcp-server"],
|
|
57
|
+
"env": {
|
|
58
|
+
"VORIM_API_KEY": "agid_sk_live_..."
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### VS Code
|
|
66
|
+
|
|
67
|
+
Add to `.vscode/mcp.json`:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"servers": {
|
|
72
|
+
"vorim": {
|
|
73
|
+
"command": "npx",
|
|
74
|
+
"args": ["@vorim/mcp-server"],
|
|
75
|
+
"env": {
|
|
76
|
+
"VORIM_API_KEY": "agid_sk_live_..."
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Windsurf
|
|
84
|
+
|
|
85
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"mcpServers": {
|
|
90
|
+
"vorim": {
|
|
91
|
+
"command": "npx",
|
|
92
|
+
"args": ["@vorim/mcp-server"],
|
|
93
|
+
"env": {
|
|
94
|
+
"VORIM_API_KEY": "agid_sk_live_..."
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Tools
|
|
104
|
+
|
|
105
|
+
The server exposes 13 tools across five categories:
|
|
106
|
+
|
|
107
|
+
### Health
|
|
108
|
+
|
|
109
|
+
| Tool | Description |
|
|
110
|
+
|------|-------------|
|
|
111
|
+
| `vorim_ping` | Check API health and connectivity |
|
|
112
|
+
|
|
113
|
+
### Agent Identity
|
|
114
|
+
|
|
115
|
+
| Tool | Description |
|
|
116
|
+
|------|-------------|
|
|
117
|
+
| `vorim_register_agent` | Register a new agent with an Ed25519 keypair |
|
|
118
|
+
| `vorim_get_agent` | Get agent details by ID |
|
|
119
|
+
| `vorim_list_agents` | List all agents (with pagination and status filter) |
|
|
120
|
+
| `vorim_update_agent` | Update agent metadata |
|
|
121
|
+
| `vorim_revoke_agent` | Permanently revoke an agent |
|
|
122
|
+
|
|
123
|
+
### Permissions
|
|
124
|
+
|
|
125
|
+
| Tool | Description |
|
|
126
|
+
|------|-------------|
|
|
127
|
+
| `vorim_check_permission` | Check if an agent has a permission (sub-5ms via Redis) |
|
|
128
|
+
| `vorim_grant_permission` | Grant a scoped permission with optional expiry and rate limits |
|
|
129
|
+
| `vorim_list_permissions` | List all active permissions for an agent |
|
|
130
|
+
| `vorim_revoke_permission` | Revoke a permission from an agent |
|
|
131
|
+
|
|
132
|
+
### Audit
|
|
133
|
+
|
|
134
|
+
| Tool | Description |
|
|
135
|
+
|------|-------------|
|
|
136
|
+
| `vorim_emit_event` | Log a tamper-evident audit event |
|
|
137
|
+
| `vorim_export_audit` | Export a signed audit bundle (SHA-256 manifest) |
|
|
138
|
+
|
|
139
|
+
### Trust
|
|
140
|
+
|
|
141
|
+
| Tool | Description |
|
|
142
|
+
|------|-------------|
|
|
143
|
+
| `vorim_verify_trust` | Verify an agent's identity and trust score (0-100) |
|
|
144
|
+
|
|
145
|
+
### Credential Delegation
|
|
146
|
+
|
|
147
|
+
| Tool | Description |
|
|
148
|
+
|------|-------------|
|
|
149
|
+
| `vorim_register_ephemeral` | Register a short-lived agent with `did:key` identity |
|
|
150
|
+
| `vorim_delegate_credential` | Delegate a scoped credential to an agent |
|
|
151
|
+
| `vorim_request_token` | Request a short-lived access token |
|
|
152
|
+
| `vorim_list_delegations` | List credential delegations |
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Environment Variables
|
|
157
|
+
|
|
158
|
+
| Variable | Description | Default |
|
|
159
|
+
|----------|-------------|---------|
|
|
160
|
+
| `VORIM_API_KEY` | Your Vorim API key (`agid_sk_...`) | **Required** |
|
|
161
|
+
| `VORIM_BASE_URL` | API base URL | `https://api.vorim.ai` |
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Example Prompts
|
|
166
|
+
|
|
167
|
+
Once the MCP server is connected, you can ask your AI assistant:
|
|
168
|
+
|
|
169
|
+
- "Register a new agent called invoice-processor with read and execute permissions"
|
|
170
|
+
- "Check if agent agid_acme_a1b2c3d4 has agent:execute permission"
|
|
171
|
+
- "Show me the trust score for agent agid_acme_a1b2c3d4"
|
|
172
|
+
- "List all active agents"
|
|
173
|
+
- "Emit an audit event for agent agid_acme_a1b2c3d4 performing search_documents"
|
|
174
|
+
- "Export audit logs from the last 7 days"
|
|
175
|
+
- "Grant agent:transact permission to agid_acme_a1b2c3d4 with a rate limit of 100 per hour"
|
|
176
|
+
- "Create an ephemeral agent with a 1-hour TTL for a one-off task"
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Running Standalone
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
VORIM_API_KEY=agid_sk_live_... npx @vorim/mcp-server
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Or install globally:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
npm install -g @vorim/mcp-server
|
|
190
|
+
VORIM_API_KEY=agid_sk_live_... vorim-mcp-server
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Related
|
|
196
|
+
|
|
197
|
+
- [@vorim/sdk](https://www.npmjs.com/package/@vorim/sdk) — TypeScript SDK
|
|
198
|
+
- [vorim (PyPI)](https://pypi.org/project/vorim/) — Python SDK
|
|
199
|
+
- [@vorim/cli](https://www.npmjs.com/package/@vorim/cli) — CLI tool
|
|
200
|
+
- [vorim.ai/docs](https://vorim.ai/docs) — Documentation
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## License
|
|
205
|
+
|
|
206
|
+
MIT
|
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();
|