@topolo/mcp 0.11.12 → 0.13.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 (4) hide show
  1. package/README.md +33 -15
  2. package/dist/http.js +893 -695
  3. package/dist/index.js +1190 -76
  4. package/package.json +10 -5
package/README.md CHANGED
@@ -24,16 +24,29 @@ Customers install only `@topolo/cli`; it owns an exact compatible MCP and SDK.
24
24
  `topolo setup` registers the resolved local Node entry point, so agent startup
25
25
  does not depend on `npx`, network access, or a separately synchronized package.
26
26
 
27
- ## Get a credential
27
+ ## Register an accountable agent installation
28
28
 
29
- Either:
29
+ For Codex, Claude, and other persistent agent hosts, register the host once
30
+ from an organization context:
30
31
 
31
- - **Long-lived**: mint an API key at the Topolo Developers console
32
- (`TOPOLO_API_KEY=topo_live_...`). Preferred for persistent agent installs.
33
- - **Short-lived**: run `topolo auth login`. The stdio MCP reads and refreshes
34
- the same environment-specific credential store, so no token copying is
35
- needed. Explicit `TOPOLO_API_KEY` or `TOPOLO_ACCESS_TOKEN` values still take
36
- precedence for headless installations.
32
+ ```bash
33
+ topolo installations register \
34
+ --name "Codex on my workstation" \
35
+ --provider openai \
36
+ --host codex \
37
+ --grant app_topolo_agent:actions
38
+ ```
39
+
40
+ The CLI creates an accountable external principal, generates a device-local
41
+ DPoP key, stores the client secret and private key in the operating system's
42
+ protected credential store, and configures the host with only
43
+ `TOPOLO_AGENT_INSTALLATION_ID`. The MCP exchanges short-lived credentials for
44
+ the exact service, task, and resource being accessed. No reusable secret is
45
+ written to Codex or Claude configuration.
46
+
47
+ Human OAuth contexts and explicit API keys remain supported for interactive
48
+ and compatibility use, but they are never used as a fallback when an
49
+ installation ID is configured.
37
50
 
38
51
  ## Register with an MCP client
39
52
 
@@ -50,11 +63,13 @@ must not use an `npx` launcher because that makes startup network-dependent.
50
63
  | `TOPOLO_ACCESS_TOKEN` | Short-lived JWT (dev/testing) |
51
64
  | `TOPOLO_ENV` | Credential environment (production by default) |
52
65
  | `TOPOLO_CONTEXT` | Pin one stored personal/org context without activating it |
66
+ | `TOPOLO_AGENT_INSTALLATION_ID` | Use a protected accountable agent installation |
67
+ | `TOPOLO_AGENT_TASK_ID` | Optional stable host task identifier |
53
68
  | `TOPOLO_AGENT_NAME` | Human-readable agent label for audit logs |
54
69
  | `TOPOLO_SERVICE_URL_<ID>` | Override a service base URL (e.g. `_AUTH`, `_MAIL`) |
55
70
 
56
- Exactly one credential var must be set. If both are present, `TOPOLO_API_KEY`
57
- wins.
71
+ An installation ID cannot be combined with a human context, API key, or access
72
+ token. The MCP rejects ambiguous configuration instead of choosing one.
58
73
 
59
74
  For concurrent organization or environment operation, run one named MCP server
60
75
  per stored context. `TOPOLO_CONTEXT` accepts an exact key from `topolo context
@@ -83,11 +98,12 @@ credentials already carry their own immutable context.
83
98
 
84
99
  ## Startup sequence
85
100
 
86
- 1. Resolve an injected credential, a pinned stored context, or the environment's
87
- active stored credential. **Refuse to start** if none is available.
101
+ 1. Resolve a protected installation, injected credential, pinned stored
102
+ context, or the environment's active stored credential. **Refuse to start**
103
+ if none is available. Installation mode exchanges a short-lived Auth token
104
+ bound to the MCP task, organization, and local DPoP key.
88
105
  2. Call `GET /api/me` to load the user's granted scopes + role.
89
106
  3. Connect the stdio transport and begin serving MCP requests.
90
-
91
107
  4. Advertise a fixed, bounded discovery/invocation surface. Agents search one
92
108
  application at a time and call exact action IDs; the server never expands
93
109
  one MCP tool per action or materializes the global catalog.
@@ -100,8 +116,10 @@ clients surface that as a failed server launch.
100
116
 
101
117
  TopoloMCP is a transport adapter and does not persist customer data. It has no
102
118
  database, KV, R2, Durable Object, filesystem-write, analytics, or log-storage
103
- binding. Credentials remain in the caller-owned environment or the shared CLI
104
- credential store, and every request is authorized by the target Topolo service.
119
+ binding. Credentials remain in the caller-owned environment, shared CLI
120
+ credential store, or operating-system protected installation store.
121
+ Installation secrets and private keys are never copied into MCP host
122
+ configuration. Every request is authorized by the target Topolo service.
105
123
 
106
124
  Only messages raised by TopoloMCP's own input validators are returned verbatim.
107
125
  Authentication, SDK, provider, session-construction, and unexpected runtime