@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.
Files changed (3) hide show
  1. package/README.md +15 -13
  2. package/dist/index.js +5 -2
  3. 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 (Phase 1)
98
+ ## Tools
98
99
 
99
- | Tool | Required scopes | Destructive |
100
- | ---------------------------- | --------------------- | ----------- |
101
- | `topolo_whoami` | (none) | no |
102
- | `topolo_crm_list_contacts` | `crm.contacts:read` | no |
103
- | `topolo_crm_get_contact` | `crm.contacts:read` | no |
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
- Phase 1 is intentionally read-only. Write tools will be added per-domain in
106
- later phases alongside typed SDK modules, each annotated with
107
- `destructiveHint: true` so host clients can surface confirmation UI.
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
- - Accept OAuth 2.1 access tokens minted via authorization-code + device grants
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}:*` : null
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.1.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topolo/mcp",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Model Context Protocol server for the Topolo platform. Exposes scope-gated tools that third-party agents (Claude, Codex, etc.) can call natively.",
5
5
  "type": "module",
6
6
  "bin": {