agent-envelope-mcp 1.0.2 → 1.0.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
@@ -1,11 +1,16 @@
1
1
  # agent-envelope-mcp
2
2
 
3
- The neutral authority layer for agent runtimes, as an [MCP](https://modelcontextprotocol.io) server.
4
-
5
- Any MCP client — Claude, an OpenAI agent, LangChain, CrewAI, a custom runtime —
6
- can call these tools to **check and issue agent authority** without building its
7
- own policy engine, audit log, or verification stack. AgentEnvelope is owned by
8
- no framework, so every framework can embed it.
3
+ The neutral authority layer for action-performing systems, as an [MCP](https://modelcontextprotocol.io) server.
4
+
5
+ Any MCP client — Claude, an OpenAI agent, LangChain, CrewAI, a custom runtime —
6
+ can call these tools to **check and issue delegated action authority** without
7
+ building its own policy engine, audit log, or verification stack. AgentEnvelope
8
+ is owned by no framework, so every framework can embed it.
9
+
10
+ An AgentEnvelope "agent" is a bounded action identity: a named actor, operation,
11
+ resources, decay policy, and verifiable address. That actor can be an AI agent,
12
+ backend worker, workflow step, service, device command, access grant, order, or
13
+ instruction.
9
14
 
10
15
  ## Run
11
16
 
@@ -13,13 +18,13 @@ no framework, so every framework can embed it.
13
18
  npx agent-envelope-mcp
14
19
  ```
15
20
 
16
- It speaks MCP over stdio. No API key is needed to start, or to use the sovereign
17
- verifier — only the vault-governed tools require `AE_API_KEY`.
21
+ It speaks MCP over stdio. No API key is needed to start, or to use the sovereign
22
+ verifier — only the hosted-governance tools require `AE_API_KEY`.
18
23
 
19
24
  ## Wire it into an MCP client
20
25
 
21
- Point your client at the command and pass the vault-issued key in the
22
- environment (only needed for the custody tools):
26
+ Point your client at the command and pass the portal-issued API key in the
27
+ environment (only needed for hosted-governance tools):
23
28
 
24
29
  ```jsonc
25
30
  {
@@ -27,7 +32,7 @@ environment (only needed for the custody tools):
27
32
  "agent-envelope": {
28
33
  "command": "npx",
29
34
  "args": ["-y", "agent-envelope-mcp"],
30
- "env": { "AE_API_KEY": "your-vault-issued-key" }
35
+ "env": { "AE_API_KEY": "your-portal-issued-api-key" }
31
36
  }
32
37
  }
33
38
  }
@@ -38,19 +43,20 @@ environment (only needed for the custody tools):
38
43
  | Tool | Mode | Credential |
39
44
  |---|---|---|
40
45
  | `ae_verify_sovereign` | Sovereign | none — offline, always free |
41
- | `ae_get_agent` | Custody | `AE_API_KEY` |
42
- | `ae_verify_action` | Custody | `AE_API_KEY` |
43
- | `ae_mint` | Custody | `AE_API_KEY` |
46
+ | `ae_get_agent` | Hosted governance | `AE_API_KEY` |
47
+ | `ae_verify_action` | Hosted governance | `AE_API_KEY` |
48
+ | `ae_mint` | Hosted governance | `AE_API_KEY` |
44
49
 
45
50
  - **`ae_verify_sovereign`** — verify a signed message against a known agent
46
51
  address. Pure crypto: no vault, no key, no network. Verification is always free.
47
- - **`ae_get_agent`** — fetch the vault-registered public record for an agent id.
48
- - **`ae_verify_action`** — verify a signed action against the vault-held record.
49
- - **`ae_mint`** — mint a capability through the vault from a `MintDelegate` and a
50
- signed `MintRequest`, returning a mint receipt. This is a governed action.
51
-
52
- The sovereign verifier needs no vault and no key. The vault-gated tools are the
53
- governed surface a framework offloads rather than rebuilds.
52
+ - **`ae_get_agent`** — fetch the hosted public record for an agent id.
53
+ - **`ae_verify_action`** — verify a signed action against the hosted public record.
54
+ - **`ae_mint`** — verify a `MintDelegate` and signed `MintRequest` through hosted
55
+ governance, returning a mint receipt. This is a governed action.
56
+
57
+ The sovereign verifier needs no account and no key. The hosted-governance tools
58
+ are the governed surface a framework offloads rather than rebuilds. API keys
59
+ meter and protect hosted service routes; signatures prove authority.
54
60
 
55
61
  ## Programmatic use
56
62
 
@@ -63,9 +69,9 @@ import { createServer } from 'agent-envelope-mcp';
63
69
 
64
70
  | Variable | Required for | Purpose |
65
71
  |---|---|---|
66
- | `AE_API_KEY` | `ae_get_agent`, `ae_verify_action`, `ae_mint` | Vault-issued API key |
67
-
68
- The server is fail-closed: vault-gated tools return an error result when
72
+ | `AE_API_KEY` | `ae_get_agent`, `ae_verify_action`, `ae_mint` | Portal-issued API key for hosted governance |
73
+
74
+ The server is fail-closed: hosted-governance tools return an error result when
69
75
  `AE_API_KEY` is absent rather than exposing an unauthenticated surface.
70
76
 
71
77
  ## License
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "agent-envelope-mcp",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "mcpName": "io.github.BlackBoxEngineering/agent-envelope-mcp",
5
- "description": "Neutral MCP server for AgentEnvelope — expose agent authority (sovereign verify + vault-governed verify, lookup, and mint) to any MCP client.",
5
+ "description": "Neutral MCP server for AgentEnvelope delegated action authority: sovereign verify plus hosted-governance verify, lookup, and mint.",
6
6
  "type": "module",
7
7
  "bin": {
8
8
  "agent-envelope-mcp": "bin/agent-envelope-mcp.js"
@@ -11,9 +11,10 @@
11
11
  ".": "./src/server.js"
12
12
  },
13
13
  "files": [
14
- "bin",
15
- "src",
16
- "README.md",
14
+ "bin",
15
+ "src",
16
+ "server.json",
17
+ "README.md",
17
18
  "LICENSE",
18
19
  "NOTICE"
19
20
  ],
@@ -25,7 +26,7 @@
25
26
  },
26
27
  "dependencies": {
27
28
  "@modelcontextprotocol/sdk": "^1.30.0",
28
- "agent-envelope-sdk": "^1.1.0",
29
+ "agent-envelope-sdk": "^1.3.2",
29
30
  "zod": "^4.4.3"
30
31
  },
31
32
  "keywords": [
@@ -34,8 +35,11 @@
34
35
  "agent-envelope",
35
36
  "agent",
36
37
  "authority",
38
+ "delegation",
39
+ "capabilities",
37
40
  "verification",
38
- "identity"
41
+ "identity",
42
+ "sovereign"
39
43
  ],
40
44
  "author": "BlackBox Engineering",
41
45
  "license": "Apache-2.0",
package/server.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.BlackBoxEngineering/agent-envelope-mcp",
4
+ "description": "Neutral MCP server for AgentEnvelope delegated action authority: sovereign verify + hosted-governance verify, lookup, and mint.",
5
+ "repository": {
6
+ "url": "https://github.com/BlackBoxEngineering/agent-envelope-mcp",
7
+ "source": "github"
8
+ },
9
+ "version": "1.0.4",
10
+ "packages": [
11
+ {
12
+ "registryType": "npm",
13
+ "identifier": "agent-envelope-mcp",
14
+ "version": "1.0.4",
15
+ "transport": {
16
+ "type": "stdio"
17
+ },
18
+ "environmentVariables": [
19
+ {
20
+ "name": "AE_API_KEY",
21
+ "description": "Portal-issued API key. Required only for hosted-governance tools (ae_get_agent, ae_verify_action, ae_mint). Sovereign verification needs no key.",
22
+ "isRequired": false,
23
+ "isSecret": true,
24
+ "format": "string"
25
+ }
26
+ ]
27
+ }
28
+ ]
29
+ }
package/src/server.js CHANGED
@@ -1,23 +1,24 @@
1
1
  /**
2
- * AgentEnvelope MCP server — the neutral authority layer for agent runtimes.
2
+ * AgentEnvelope MCP server — the neutral authority layer for action-performing systems.
3
3
  *
4
4
  * Any MCP client (Claude, an OpenAI agent, LangChain, CrewAI, a custom runtime)
5
- * can call these tools to check and issue authority without building its own
6
- * policy engine, audit log, or verification stack. AgentEnvelope is owned by no
7
- * framework, so every framework can embed it.
5
+ * can call these tools to check and issue delegated action authority without
6
+ * building its own policy engine, audit log, or verification stack.
7
+ * AgentEnvelope is owned by no framework, so every framework can embed it.
8
8
  *
9
9
  * Two tiers of tools, matching the two modes:
10
10
  *
11
11
  * Sovereign (free, offline, no credential):
12
12
  * - ae_verify_sovereign verify a signature against a known agent address
13
13
  *
14
- * Custody (vault-governed, requires AE_API_KEY):
15
- * - ae_get_agent look up a registered agent's public record
16
- * - ae_verify_action verify a signed action against the vault record
17
- * - ae_mint mint a capability through the vault (governance event)
14
+ * Hosted governance (requires AE_API_KEY):
15
+ * - ae_get_agent look up a registered agent's public record
16
+ * - ae_verify_action verify a signed action against the hosted record
17
+ * - ae_mint verify a mint request through hosted governance
18
18
  *
19
- * Verification in sovereign mode is always free. The vault-gated tools are the
20
- * governed surface: they are what a framework offloads rather than rebuilds.
19
+ * Verification in sovereign mode is always free. The hosted-governance tools
20
+ * are what a framework offloads rather than rebuilds. API keys meter hosted
21
+ * service routes; signatures prove authority.
21
22
  */
22
23
 
23
24
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
@@ -32,25 +33,25 @@ function getApiKey() {
32
33
  return process.env.AE_API_KEY?.trim() || null;
33
34
  }
34
35
 
35
- let cachedClient = null;
36
- function vaultClient() {
37
- const apiKey = getApiKey();
38
- if (!apiKey) return null;
39
- if (!cachedClient) cachedClient = new AgentEnvelopeClient({ apiKey });
40
- return cachedClient;
41
- }
36
+ let cachedClient = null;
37
+ function governanceClient() {
38
+ const apiKey = getApiKey();
39
+ if (!apiKey) return null;
40
+ if (!cachedClient) cachedClient = new AgentEnvelopeClient({ apiKey });
41
+ return cachedClient;
42
+ }
42
43
 
43
44
  const ok = (value) => ({ content: [{ type: 'text', text: JSON.stringify(value, null, 2) }] });
44
45
  const fail = (message) => ({ content: [{ type: 'text', text: message }], isError: true });
45
- const NEEDS_KEY =
46
- 'AE_API_KEY is not set. This is a vault-governed tool; set the vault-issued API key to use it. (Sovereign verification needs no key — use ae_verify_sovereign.)';
46
+ const NEEDS_KEY =
47
+ 'AE_API_KEY is not set. This is a hosted-governance tool; set the portal-issued API key to use it. (Sovereign verification needs no key — use ae_verify_sovereign.)';
47
48
 
48
49
  /**
49
50
  * Build a fully configured AgentEnvelope MCP server (not yet connected to a
50
51
  * transport). Exported so hosts can mount it on their own transport.
51
52
  */
52
53
  export function createServer() {
53
- const server = new McpServer({ name: 'agent-envelope', version: '1.0.0' });
54
+ const server = new McpServer({ name: 'agent-envelope', version: '1.0.4' });
54
55
 
55
56
  // Sovereign — free, offline, no credential.
56
57
  server.registerTool(
@@ -74,18 +75,18 @@ export function createServer() {
74
75
  },
75
76
  );
76
77
 
77
- // Custody — vault-governed, requires AE_API_KEY.
78
+ // Hosted governance — requires AE_API_KEY.
78
79
  server.registerTool(
79
80
  'ae_get_agent',
80
81
  {
81
82
  title: 'Look up registered agent',
82
- description: 'Fetch the vault-registered public record for an agent id. Requires a vault-issued API key.',
83
+ description: 'Fetch the hosted public record for an agent id. Requires a portal-issued API key.',
83
84
  inputSchema: {
84
85
  agentId: z.string().describe('The registered agent id'),
85
86
  },
86
87
  },
87
88
  async ({ agentId }) => {
88
- const client = vaultClient();
89
+ const client = governanceClient();
89
90
  if (!client) return fail(NEEDS_KEY);
90
91
  try {
91
92
  return ok(await client.getAgent(agentId));
@@ -98,8 +99,8 @@ export function createServer() {
98
99
  server.registerTool(
99
100
  'ae_verify_action',
100
101
  {
101
- title: 'Verify action (vault-anchored)',
102
- description: 'Verify a signed action against the vault-held record for an agent. Requires a vault-issued API key.',
102
+ title: 'Verify action (hosted record)',
103
+ description: 'Verify a signed action against the hosted public record for an agent. Requires a portal-issued API key.',
103
104
  inputSchema: {
104
105
  agentId: z.string().describe('The registered agent id'),
105
106
  actionIndex: z.number().int().nonnegative().describe('The action index'),
@@ -109,7 +110,7 @@ export function createServer() {
109
110
  },
110
111
  },
111
112
  async ({ agentId, actionIndex, payload, signature, expectedActionEnvelopeHash }) => {
112
- const client = vaultClient();
113
+ const client = governanceClient();
113
114
  if (!client) return fail(NEEDS_KEY);
114
115
  try {
115
116
  return ok(await client.verifyAction({ agentId, actionIndex, payload, signature, expectedActionEnvelopeHash }));
@@ -124,14 +125,14 @@ export function createServer() {
124
125
  {
125
126
  title: 'Mint capability (governance event)',
126
127
  description:
127
- 'Mint a capability through the vault from a MintDelegate and a signed MintRequest. Returns a mint receipt. Requires a vault-issued API key. This is a governed action.',
128
+ 'Verify a MintDelegate and signed MintRequest through hosted governance. Returns a mint receipt. Requires a portal-issued API key. This is a governed action.',
128
129
  inputSchema: {
129
- delegate: z.record(z.string(), z.unknown()).describe('The vault-issued MintDelegate'),
130
+ delegate: z.record(z.string(), z.unknown()).describe('The signed MintDelegate'),
130
131
  request: z.record(z.string(), z.unknown()).describe('The bot-signed MintRequest'),
131
132
  },
132
133
  },
133
134
  async ({ delegate, request }) => {
134
- const client = vaultClient();
135
+ const client = governanceClient();
135
136
  if (!client) return fail(NEEDS_KEY);
136
137
  try {
137
138
  return ok(await client.mint({ delegate, request }));