@topolo/mcp 0.2.1 → 0.2.2
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 +15 -13
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,8 @@ Either:
|
|
|
27
27
|
- **Long-lived**: mint an API key at the Topolo Developers console
|
|
28
28
|
(`TOPOLO_API_KEY=topo_live_...`). Preferred for persistent agent installs.
|
|
29
29
|
- **Short-lived**: `topolo auth login` with the CLI, then copy the access token
|
|
30
|
-
from `~/.config/topolo/config.json`. Useful for dev and testing.
|
|
30
|
+
from `~/.config/topolo/config.json`. Useful for dev and testing. MCP does
|
|
31
|
+
not read the CLI config directly; pass the token in `TOPOLO_ACCESS_TOKEN`.
|
|
31
32
|
|
|
32
33
|
## Register with an MCP client
|
|
33
34
|
|
|
@@ -94,17 +95,20 @@ Startup is synchronous and fast (< 500 ms typical). If the credential is
|
|
|
94
95
|
rejected, the process logs the error to stderr and exits non-zero — host
|
|
95
96
|
clients surface that as a failed server launch.
|
|
96
97
|
|
|
97
|
-
## Tools
|
|
98
|
+
## Tools
|
|
98
99
|
|
|
99
|
-
| Tool | Required scopes | Destructive |
|
|
100
|
-
| ---------------------------- | --------------------- |
|
|
101
|
-
| `topolo_whoami` | (none) | no
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
100
|
+
| Tool | Required scopes | Destructive hint |
|
|
101
|
+
| ---------------------------- | --------------------- | ---------------- |
|
|
102
|
+
| `topolo_whoami` | (none) | no |
|
|
103
|
+
| `topolo_list_services` | (none) | no |
|
|
104
|
+
| `topolo_crm_list_contacts` | `crm.contacts:read` | no |
|
|
105
|
+
| `topolo_crm_get_contact` | `crm.contacts:read` | no |
|
|
106
|
+
| `topolo_api_call` | (service-enforced) | yes |
|
|
104
107
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
`
|
|
108
|
+
`topolo_api_call` is the escape hatch for endpoints without typed MCP tools
|
|
109
|
+
yet. GET requests work without confirmation; mutating HTTP methods must pass
|
|
110
|
+
`confirm: true` or the SDK rejects the call. Backing services still enforce
|
|
111
|
+
permissions for every request.
|
|
108
112
|
|
|
109
113
|
## Safety rails
|
|
110
114
|
|
|
@@ -159,8 +163,6 @@ build, verify the tag matches `package.json`, and publish to npm via the
|
|
|
159
163
|
|
|
160
164
|
## Phase 2 (planned)
|
|
161
165
|
|
|
162
|
-
-
|
|
163
|
-
in TopoloAuth.
|
|
164
|
-
- Dynamic tool registration as more `@topolo/sdk` modules ship.
|
|
166
|
+
- More typed tools as `@topolo/sdk` modules ship.
|
|
165
167
|
- HTTP transport in addition to stdio, for hosted (non-subprocess) deployments.
|
|
166
168
|
- Optional `--provenance` on npm publish once the repo is public.
|
package/dist/index.js
CHANGED
|
@@ -391,7 +391,10 @@ function hasScope(set, required) {
|
|
|
391
391
|
"*",
|
|
392
392
|
serviceId ? `${serviceId}.*` : null,
|
|
393
393
|
serviceId && resource && actionPart ? `${serviceId}.${resource}:*` : null,
|
|
394
|
-
resource && actionPart ? `${resource}
|
|
394
|
+
serviceId && resource && actionPart ? `${serviceId}.${resource}.${actionPart}` : null,
|
|
395
|
+
resource && actionPart ? `${resource}:*` : null,
|
|
396
|
+
resource && actionPart ? `${resource}.${actionPart}` : null,
|
|
397
|
+
resource && actionPart ? `${resource}:${actionPart}` : null
|
|
395
398
|
].filter((v) => v !== null));
|
|
396
399
|
return set.permissions.some((granted) => candidates.has(granted));
|
|
397
400
|
}
|
|
@@ -569,7 +572,7 @@ function filterToolsByScopes(tools, scopes) {
|
|
|
569
572
|
}
|
|
570
573
|
|
|
571
574
|
// src/version.ts
|
|
572
|
-
var MCP_VERSION = "0.
|
|
575
|
+
var MCP_VERSION = "0.2.2";
|
|
573
576
|
|
|
574
577
|
// src/server.ts
|
|
575
578
|
function buildServer(topolo, scopes, tools = TOOLS) {
|
package/package.json
CHANGED