vantage-peers-mcp 3.0.0 → 4.0.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.
- package/CHANGELOG.md +47 -0
- package/README.md +158 -44
- package/dist/server-http.d.ts +22 -0
- package/dist/server-http.js +760 -249
- package/dist/server.js +28 -11
- package/dist/src/actorFromAgentId.d.ts +19 -0
- package/dist/src/actorFromAgentId.js +137 -0
- package/dist/src/auth.d.ts +250 -70
- package/dist/src/auth.js +326 -141
- package/dist/src/authenticatedConvexClient.d.ts +1 -1
- package/dist/src/authenticatedConvexClient.js +1 -1
- package/dist/src/authorize.d.ts +173 -0
- package/dist/src/authorize.js +546 -0
- package/dist/src/backendContract.d.ts +76 -0
- package/dist/src/backendContract.js +318 -0
- package/dist/src/brand.d.ts +18 -0
- package/dist/src/brand.js +49 -0
- package/dist/src/doorScope.d.ts +57 -0
- package/dist/src/doorScope.js +116 -0
- package/dist/src/fresh-state-guard.d.ts +51 -0
- package/dist/src/fresh-state-guard.js +172 -7
- package/dist/src/list-tasks-gate.d.ts +6 -2
- package/dist/src/list-tasks-gate.js +17 -3
- package/dist/src/listArgs.d.ts +39 -0
- package/dist/src/listArgs.js +68 -0
- package/dist/src/memberAuthor.d.ts +5 -0
- package/dist/src/memberAuthor.js +31 -0
- package/dist/src/normalizeOrchestratorId.d.ts +6 -6
- package/dist/src/normalizeOrchestratorId.js +6 -6
- package/dist/src/paging.d.ts +30 -0
- package/dist/src/paging.js +35 -0
- package/dist/src/registerTool.d.ts +39 -18
- package/dist/src/registerTool.js +277 -31
- package/dist/src/serviceAccountAuth.d.ts +7 -6
- package/dist/src/serviceAccountAuth.js +7 -6
- package/dist/src/tools/exportOkfBundle.d.ts +2 -2
- package/dist/src/tools/exportOkfBundle.js +13 -7
- package/dist/src/tools/importOkfBundle.d.ts +1 -1
- package/dist/src/tools/importOkfBundle.js +3 -3
- package/dist/src/tools/kbIngest.d.ts +17 -6
- package/dist/src/tools/kbIngest.js +196 -32
- package/dist/src/tools/validateOkfBundle.d.ts +1 -1
- package/dist/src/tools/validateOkfBundle.js +4 -4
- package/dist/src/tools.d.ts +67 -65
- package/dist/src/tools.js +1298 -395
- package/dist/src/ui-resources/primitives/diary-entry.js +5 -0
- package/dist/src/verifiedActor.d.ts +37 -0
- package/dist/src/verifiedActor.js +154 -0
- package/dist/src/whoamiIdentity.d.ts +74 -0
- package/dist/src/whoamiIdentity.js +135 -0
- package/package.json +18 -7
- package/tool-exposure.json +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
## [4.0.0] — 2026-11-01
|
|
6
|
+
|
|
7
|
+
Customer-facing summary of every `mcp-server/` change since 3.0.0. Each entry says which product it concerns (VantagePeers Cloud, the hosted service; VantagePeers Self-host, the separate product) and links the README section that documents it. The repository changelog carries the full engineering record of the same release.
|
|
8
|
+
|
|
9
|
+
### Breaking
|
|
10
|
+
|
|
11
|
+
- Cloud: connecting signs in a person. `/authorize` no longer issues a code to a registered client on its own: it redirects to sign-in, then to a consent page where the person chooses one of their own organisations and the agent the connection acts as, and approves. A client ID and secret alone no longer connect. ([Connect to VantagePeers Cloud](README.md#connect-to-vantagepeers-cloud), [The consent page](README.md#the-consent-page))
|
|
12
|
+
- Cloud: agent identity is `strict` by default. With `VANTAGE_ACTOR_CREDENTIAL_MODE` unset, empty or unrecognised, a typed agent name without an agent credential is refused `AGENT_CREDENTIAL_REQUIRED` (the header is named); only an explicit `permissive` restores the old behaviour. A seat whose token lists exactly one agent may still name that agent. The operator master credential always needs the agent credential to act as an agent. `/health` publishes the mode and its source (`configured`, `unset`, `empty`, `coerced`). ([Agent identity](README.md#agent-identity))
|
|
13
|
+
- Cloud: a write through a non-operator credential whose organisation resolves to no active mapping is refused `RBAC_DENIED` instead of being stored without an organisation, and an access token of an inactive or unmapped organisation is refused with HTTP 401. ([Security](README.md#security), [Authentication](README.md#authentication))
|
|
14
|
+
- Cloud and Self-host: `list_peers`, `list_tasks_by_mission` and `list_recurring_tasks` answer `{ items, nextCursor?, scopeFiltered }` instead of a bare array when your scope removed rows of your organisation from the page; the cursor is decided on the raw page. ([Tool inputs and outputs](README.md#tool-inputs-and-outputs))
|
|
15
|
+
- Cloud and Self-host: `send_message` refuses an `evidence:` line that states a live state (pull request, package version, task status) with no command on the same line, even when it is true; nothing is sent. Use the command form or a `{{pr:…}}` / `{{npm:…}}` / `{{task:…}}` token. ([Tool inputs and outputs](README.md#tool-inputs-and-outputs))
|
|
16
|
+
- Cloud and Self-host: the server moves to the MCP server SDK 2.x. A protocol error thrown by a tool reads without the `MCP error <code>:` prefix, `tools/list` stamps the 2020-12 JSON Schema dialect, and `execution.taskSupport` is no longer published. ([Tool inputs and outputs](README.md#tool-inputs-and-outputs))
|
|
17
|
+
- Self-host: the server refuses to start, before it listens or opens stdio, against a backend that has no contract manifest, whose contract version is below 10, or that lacks any of the 141 functions it calls; the log line `BACKEND INCOMPATIBLE (<reason>)` names the missing functions. Deploy the backend first. ([Backend compatibility check](README.md#backend-compatibility-check))
|
|
18
|
+
- Self-host: `engines.node` is pinned to `26.12.1`, the October 2026 security release (was `>=20`), and `.node-version` carries the same value. ([Requirements](README.md#requirements))
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Cloud and Self-host: MCP protocol `2026-07-28` (`server/discover`, used by ChatGPT) is served beside `2025-11-25` (Claude.ai, Claude Code, Codex); each client is answered in its own version. ([Any other MCP client or IDE](README.md#any-other-mcp-client-or-ide), [Self-host](README.md#self-host-a-separate-product))
|
|
23
|
+
- Cloud: the consent page lists the agents of the chosen organisation that designate you or nobody, defaults to **Connect as myself**, and lets an organisation admin create an agent. A person can hold one agent per AI client. A person token can also act as the agent the organisation designates as that person's own. ([The consent page](README.md#the-consent-page), [Agent identity](README.md#agent-identity))
|
|
24
|
+
- Cloud: sign-in from ChatGPT and Claude completes through `GET /authorize/callback` with Clerk's session handshake instead of answering `403 session-required`. New `GET /userinfo` and `/.well-known/openid-configuration`; `scopes_supported` advertises `offline_access`. ([OAuth endpoints](README.md#oauth-endpoints))
|
|
25
|
+
- Cloud: a person's connection gets a refresh token on the code exchange, so it no longer ends when the access token expires. ([Tokens and revocation](README.md#tokens-and-revocation))
|
|
26
|
+
- Cloud and Self-host: new tools `list_blocked_on_me`, `get_bulk_complete_run`, `debate_get_room` and `debate_post_turn`. ([Tools](README.md#tools), [Tool inputs and outputs](README.md#tool-inputs-and-outputs))
|
|
27
|
+
- Cloud and Self-host: agent-ID arguments, each the `agentId` that `list_peers` returns: `send_message` `recipientAgentIds` and `fromAgentId`, `create_task` and `update_task` `assignedToAgentId`. Once a connection resolves to an agent, the acting-name arguments are optional. ([Tool inputs and outputs](README.md#tool-inputs-and-outputs), [Agent identity](README.md#agent-identity))
|
|
28
|
+
- Cloud and Self-host: `create_task` / `update_task` take an optional `deliverable` (`{ pkg, export }`); task reads show `deliverableState` and `deliverableDivergence: "delivered-but-open"`. `get_github_owner_bindings` pages with `limit`, `cursor` and `unprovenCursor`. ([Tool inputs and outputs](README.md#tool-inputs-and-outputs))
|
|
29
|
+
- Cloud and Self-host: `whoami` names the acting agent by ID (`actor`: `agentId`, `orgId`, `agentName`, `orgSlug`, or `null` with `agent_unresolved_reason`) and returns `caller_id` (opaque and stable), `org_slug`, `role` and `acting_name`, with a declared `outputSchema`. ([Check the connection](README.md#check-the-connection))
|
|
30
|
+
- Cloud: the server serves the VantagePeers icon at `/favicon.ico`, `/icon.png` and `/apple-touch-icon.png`; `/health` reports the serving runtime (`runtime`, `bun`, `node`). ([OAuth endpoints](README.md#oauth-endpoints))
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
- Cloud: a person (OAuth or Clerk session) reads `team/<organisation>` and `project/<organisation>` and writes `team/<organisation>` only; writes without an acting agent are recorded as `user:<id>`. A viewer role reads; every write tool needs an editor or admin role. ([Authentication](README.md#authentication), [The consent page](README.md#the-consent-page))
|
|
35
|
+
- Cloud: an acting name is judged once, before the tool runs, by the identity package. Refusals keep their codes (`AGENT_IDENTITY_MISMATCH`, `AGENT_CREDENTIAL_REQUIRED`); a call with no authorization context is refused `RBAC_DENIED` (`no-context`). A mission `pilot` or a task assignee is an assignment checked against your organisation's roster, not an identity claim. ([Agent identity](README.md#agent-identity))
|
|
36
|
+
- Cloud: the consent page uses the VantagePeers design, shows each organisation with your role, and **Deny** redirects to the client with `error=access_denied`, its `state` and `iss`. ([The consent page](README.md#the-consent-page))
|
|
37
|
+
- Cloud and Self-host: every client-filled list argument accepts a JSON array sent as a string (Claude.ai sends `mark_as_read` `receiptIds` that way). The status filters of `list_tasks`, `list_tasks_by_mission` and `list_missions` are published as one shape, an array of statuses; a single status or an alias alone is still accepted. ([Tool inputs and outputs](README.md#tool-inputs-and-outputs))
|
|
38
|
+
- Cloud and Self-host: a recurring schedule whose previous task is still open creates nothing at its next run and records the skip. `bulk_complete_tasks` closes the first 500 matches in the call and the rest in the background. ([Tool inputs and outputs](README.md#tool-inputs-and-outputs))
|
|
39
|
+
|
|
40
|
+
### Security and fixes
|
|
41
|
+
|
|
42
|
+
- Cloud: tenant isolation is keyed on the organisation's permanent ID, never its renamable name, and applied inside each read; Knowledge Base tools act for your verified organisation, and a seat can search the documents it ingested; `store_document_chunked` ingests only a blob your organisation claimed. ([Security](README.md#security))
|
|
43
|
+
- Cloud: a seat's direct messages and broadcasts stay within its organisation; another organisation's agent with the same name can no longer act on your tasks or sign your messages; `list_diaries` and `list_briefing_notes` report a refusal instead of an empty list. ([Security](README.md#security))
|
|
44
|
+
- Cloud: a replayed refresh token revokes every token of its connection; a member removed from an organisation loses its access within seconds and its refresh is answered `invalid_grant`. ([Tokens and revocation](README.md#tokens-and-revocation))
|
|
45
|
+
- Cloud: an `/authorize` request without `resource` (Claude.ai) is bound to the one resource the server publishes instead of being refused, and the consent page's form post no longer fails with `session-required` in a browser. ([OAuth endpoints](README.md#oauth-endpoints), [The consent page](README.md#the-consent-page))
|
|
46
|
+
- Cloud: a person token whose agent joined the organisation after the person connected can write without reconnecting. ([Agent identity](README.md#agent-identity))
|
|
47
|
+
- Cloud and Self-host: a tool's `outputSchema` accepts fields added later, so a client connected before an upgrade no longer rejects `whoami` with "must NOT have additional properties". ([Tool inputs and outputs](README.md#tool-inputs-and-outputs))
|
|
48
|
+
- Cloud and Self-host: dependencies `zod` ^4.6.7 (GHSA-mrhx-c7xc-m3w5 in 4.3.6 and 4.4.3) and `@vantageos/cloud-identity` ^0.27.0. ([Requirements](README.md#requirements))
|
|
49
|
+
|
|
3
50
|
## [3.0.0] — 2026-10-01
|
|
4
51
|
|
|
5
52
|
Customer-facing summary of every `mcp-server/` change since 2.19.0 (commit `f718dd3`). Earlier releases are listed below.
|
package/README.md
CHANGED
|
@@ -19,27 +19,43 @@ Everything your organisation stores is isolated to your organisation (see [Secur
|
|
|
19
19
|
|
|
20
20
|
## Connect to VantagePeers Cloud
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
_Applies to: Cloud._
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
VantagePeers Cloud is hosted: **you do not need to install this package to use it.** You connect your MCP client to the Cloud endpoint, `https://mcp.vantagepeers.com/mcp` (or the endpoint URL your operator gave you). MCP traffic is served on the `/mcp` path over the Streamable HTTP transport.
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
2. **OAuth credentials** (a client ID and client secret) for each seat. Use these; do not register new clients yourself. A client that registers itself through dynamic registration is not attached to your organisation.
|
|
28
|
-
3. Optionally, an **agent credential** for each named agent in your organisation (see [Agent identity](#agent-identity)).
|
|
26
|
+
To connect you need:
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
1. **A VantagePeers account that is a member of your organisation.** Your operator invites you. Every client signs you in through VantagePeers and ends on the [consent page](#the-consent-page); you do not type a client ID or a client secret.
|
|
29
|
+
2. Optionally, an **agent credential** for a named agent of your organisation, for clients that send headers (see [Agent identity](#agent-identity)).
|
|
30
|
+
|
|
31
|
+
Keep agent credentials and tokens out of chat messages, email and source control.
|
|
32
|
+
|
|
33
|
+
The step-by-step guide per assistant, with screenshots of the labels, is at https://vantagepeers.com/docs (Cloud, "Connect your assistants").
|
|
34
|
+
|
|
35
|
+
### The consent page
|
|
36
|
+
|
|
37
|
+
_Applies to: Cloud._
|
|
38
|
+
|
|
39
|
+
Every client that connects through OAuth (Claude.ai, ChatGPT, Claude Code, Codex, any MCP client) sends you to the same flow:
|
|
40
|
+
|
|
41
|
+
1. Sign in with your VantagePeers account. A client that registered itself does not get a code until a signed-in person approves; there is no automatic approval.
|
|
42
|
+
2. Choose the organisation. Only organisations you are a member of are listed, with your role in each.
|
|
43
|
+
3. Choose the agent this connection acts as. **Connect as myself** is the default. A member sees the agents already bound to them; an organisation admin also sees unbound agents and can create one. One person can hold one agent per AI client (for example one for Claude, one for ChatGPT).
|
|
44
|
+
4. Approve. **Deny** returns you to the client with the OAuth error `access_denied`.
|
|
45
|
+
|
|
46
|
+
The token your client receives acts as the agent you chose, or as you (`user:<your id>`) when you chose yourself. A viewer role can read but every write tool is refused; an editor or admin role can write.
|
|
31
47
|
|
|
32
48
|
### Claude.ai
|
|
33
49
|
|
|
34
|
-
1.
|
|
35
|
-
2.
|
|
36
|
-
3.
|
|
50
|
+
1. Add VantagePeers as a connector (the VantagePeers plugin, or a custom MCP connector with the endpoint URL).
|
|
51
|
+
2. Click **Connect**, sign in and complete the [consent page](#the-consent-page).
|
|
52
|
+
3. In a chat, make sure the connector is enabled for that conversation.
|
|
37
53
|
|
|
38
54
|
### ChatGPT
|
|
39
55
|
|
|
40
|
-
1.
|
|
41
|
-
2.
|
|
42
|
-
3. When ChatGPT asks which tools to allow, allow the write tools as well as the read tools. Without them, reads work and every write is refused.
|
|
56
|
+
1. Add a custom MCP server with the endpoint URL and OAuth authentication.
|
|
57
|
+
2. Sign in and complete the [consent page](#the-consent-page).
|
|
58
|
+
3. When ChatGPT asks which tools to allow, allow the write tools as well as the read tools. Without them, reads work and every write is refused. Whether your ChatGPT plan lets a custom connector write is OpenAI's rule.
|
|
43
59
|
|
|
44
60
|
### Claude Code
|
|
45
61
|
|
|
@@ -47,7 +63,7 @@ Keep the client secret and any token out of chat messages, email and source cont
|
|
|
47
63
|
claude mcp add --transport http vantage-peers <ENDPOINT_URL>
|
|
48
64
|
```
|
|
49
65
|
|
|
50
|
-
Then run `/mcp` inside a Claude Code session
|
|
66
|
+
Then run `/mcp` inside a Claude Code session, authenticate `vantage-peers`, and complete the [consent page](#the-consent-page). If you were issued an agent credential, add it as a header when you register the server:
|
|
51
67
|
|
|
52
68
|
```bash
|
|
53
69
|
claude mcp add --transport http vantage-peers <ENDPOINT_URL> \
|
|
@@ -63,56 +79,85 @@ Add the server to `~/.codex/config.toml`:
|
|
|
63
79
|
url = "<ENDPOINT_URL>"
|
|
64
80
|
```
|
|
65
81
|
|
|
66
|
-
Then sign in with `codex mcp login vantage-peers
|
|
82
|
+
Then sign in with `codex mcp login vantage-peers` and complete the [consent page](#the-consent-page).
|
|
67
83
|
|
|
68
84
|
### Any other MCP client or IDE
|
|
69
85
|
|
|
86
|
+
_Applies to: Cloud._
|
|
87
|
+
|
|
70
88
|
Any client that supports remote MCP servers over Streamable HTTP can connect:
|
|
71
89
|
|
|
72
|
-
- **URL:** the endpoint URL
|
|
73
|
-
- **
|
|
74
|
-
-
|
|
90
|
+
- **URL:** the endpoint URL. It always ends in `/mcp` (for example `https://<your-host>/mcp`); enter it exactly, not the bare host.
|
|
91
|
+
- **Protocol:** the server speaks MCP protocol `2026-07-28` (a client that opens with `server/discover`) and `2025-11-25` (a client that opens with `initialize`). Each client is answered in its own version; you choose nothing.
|
|
92
|
+
- **Authentication:** OAuth 2.1. The server publishes its metadata at `/.well-known/oauth-protected-resource/mcp` (also at `/.well-known/oauth-protected-resource`), `/.well-known/oauth-authorization-server` and `/.well-known/openid-configuration`, so a client that supports MCP authorization discovers the rest by itself. The protected-resource `resource` value is the `/mcp` URL itself; a client that sends no `resource` parameter to `/authorize` is bound to that one resource.
|
|
93
|
+
- A client that cannot run OAuth can send an access token as `Authorization: Bearer <token>`. Access tokens last one hour; prefer OAuth with refresh wherever the client supports it (see [Tokens and revocation](#tokens-and-revocation)).
|
|
75
94
|
|
|
76
95
|
### Check the connection
|
|
77
96
|
|
|
78
|
-
|
|
97
|
+
_Applies to: Cloud._
|
|
98
|
+
|
|
99
|
+
Ask your agent who it is (`whoami`), to list your peers (`list_peers`), or to store and then recall a short note (`store_memory`, then `recall`). `whoami` answers the agent your connection acts as (`actor`: `agentId`, `orgId`, `agentName`, `orgSlug`), or `actor: null` with `agent_unresolved_reason` saying why, plus your organisation (`org_slug`), your `role` and an opaque, stable `caller_id`. A permission error means your role or your agent's scope does not cover that action: ask your organisation's admin. You do not need new credentials for that.
|
|
79
100
|
|
|
80
101
|
## Authentication
|
|
81
102
|
|
|
82
|
-
|
|
103
|
+
_Applies to: Cloud._
|
|
104
|
+
|
|
105
|
+
The `/mcp` endpoint of the hosted server accepts exactly these credentials, checked in this order:
|
|
83
106
|
|
|
84
107
|
| Credential | Who holds it | What it grants |
|
|
85
108
|
|---|---|---|
|
|
86
|
-
| OAuth access token issued by this server's `/token` endpoint |
|
|
109
|
+
| OAuth access token issued by this server's `/token` endpoint | A person, through the MCP client they signed in with; or a seat provisioned by your operator | The organisation chosen on the consent page (resolved from its permanent organisation ID), acting as the chosen agent or as the person |
|
|
87
110
|
| Clerk session token of a member of an organisation | Members authenticating with a VantagePeers (Clerk) session | Your organisation's own data only, resolved from the organisation in the verified token |
|
|
88
111
|
| Operator master credential | The service operator only, never issued to customers | Administration |
|
|
89
112
|
|
|
90
|
-
Any other bearer value is refused with HTTP 401. It is never treated as a lower-privilege guest.
|
|
113
|
+
Any other bearer value is refused with HTTP 401. It is never treated as a lower-privilege guest. A token of an organisation that is inactive or no longer mapped is refused with HTTP 401 as well.
|
|
91
114
|
|
|
92
|
-
OAuth
|
|
115
|
+
A person (OAuth from Claude.ai, ChatGPT and other clients, or a Clerk session) reads the `team/<organisation>` and `project/<organisation>` memory namespaces and writes `team/<organisation>` only. Writes are recorded in the person's own name (`user:<id>`) unless the connection acts as an agent.
|
|
116
|
+
|
|
117
|
+
### OAuth endpoints
|
|
118
|
+
|
|
119
|
+
_Applies to: Cloud._
|
|
93
120
|
|
|
94
121
|
| Method | Path | Purpose |
|
|
95
122
|
|---|---|---|
|
|
96
|
-
| `GET` | `/.well-known/oauth-protected-resource` | Protected resource metadata (RFC 9728) |
|
|
97
|
-
| `GET` | `/.well-known/oauth-
|
|
98
|
-
| `
|
|
99
|
-
| `GET` |
|
|
123
|
+
| `GET` | `/.well-known/oauth-protected-resource/mcp` | Protected resource metadata (RFC 9728) for the `/mcp` resource; the 401 from `/mcp` points here |
|
|
124
|
+
| `GET` | `/.well-known/oauth-protected-resource` | Same document, at the bare well-known path |
|
|
125
|
+
| `GET` | `/.well-known/oauth-authorization-server` | Authorization server metadata (RFC 8414). Advertises `none` (public clients with PKCE), RFC 9207 `iss`, and `scopes_supported` `["mcp:full", "offline_access"]`. Client ID Metadata Documents are not supported. |
|
|
126
|
+
| `GET` | `/.well-known/openid-configuration` | OpenID Connect discovery (adds `openid` and `email` to the scopes) |
|
|
127
|
+
| `POST` | `/register` | Dynamic client registration (RFC 7591). Rate-limited to 10 per minute for the same client (same name and redirect URIs) from one IP, and 60 per minute per IP. The IP is `X-Real-IP` from the edge, else the rightmost `X-Forwarded-For` entry |
|
|
128
|
+
| `GET` | `/authorize` | Authorization endpoint (authorization code with PKCE). Redirects to sign-in, then to the [consent page](#the-consent-page); the redirect carries `iss` (RFC 9207) |
|
|
129
|
+
| `GET` | `/authorize/callback` | Return from sign-in; completes the session handshake and continues to the consent page |
|
|
130
|
+
| `POST` | `/authorize/org` | The consent page's form post (organisation, agent, approve or deny), protected by a consent token and a same-origin check |
|
|
100
131
|
| `POST` | `/token` | Token endpoint (`authorization_code`, `refresh_token`) |
|
|
101
|
-
| `GET` | `/
|
|
132
|
+
| `GET` | `/userinfo` | The signed-in person behind an access token |
|
|
133
|
+
| `GET` | `/health` | Public status document: version, commit, serving runtime (`runtime`, `bun`, `node`), transport, agent-identity mode and its source |
|
|
134
|
+
| `GET` | `/favicon.ico`, `/icon.png`, `/apple-touch-icon.png` | The VantagePeers icon, shown by clients next to the connector |
|
|
135
|
+
|
|
136
|
+
### Tokens and revocation
|
|
102
137
|
|
|
103
|
-
|
|
138
|
+
_Applies to: Cloud._
|
|
139
|
+
|
|
140
|
+
- An access token lasts one hour. A refresh token lasts 30 days, and every refresh returns a new refresh token, so a client that keeps refreshing stays connected without signing in again. A person's connection (through `/authorize` and the consent page) gets a refresh token too.
|
|
141
|
+
- A refresh token is single-use. Presenting one that was already spent revokes every token of that connection, so a stolen refresh token stops working for the thief as well.
|
|
142
|
+
- A member removed from an organisation loses that organisation's access within seconds: their live tokens for it are revoked, and a refresh is answered `invalid_grant`.
|
|
104
143
|
|
|
105
144
|
### Agent identity
|
|
106
145
|
|
|
107
|
-
|
|
146
|
+
_Applies to: Cloud._
|
|
147
|
+
|
|
148
|
+
An agent is identified by its **agent ID** (the `agentId` that `list_peers` returns), never by the spelling of its name. A connection resolves to an agent in one of three ways: the agent chosen on the [consent page](#the-consent-page), the agent your organisation designates as a person's own, or an **agent credential** sent in the `x-vantage-agent-credential` header (your organisation's admin mints one per agent).
|
|
108
149
|
|
|
109
|
-
-
|
|
110
|
-
-
|
|
150
|
+
- Once a connection resolves to an agent, every action is recorded as that agent ID. The acting-name arguments (`from`, `createdBy`, `callerOrchestrator`) are optional: omit them. A typed name for a different agent is refused (`AGENT_IDENTITY_MISMATCH`). Renaming an agent keeps its credential and its grants.
|
|
151
|
+
- A typed agent name with no agent credential is refused (`AGENT_CREDENTIAL_REQUIRED`, naming the header). This is the default: the server runs in `strict` mode unless its operator explicitly sets `VANTAGE_ACTOR_CREDENTIAL_MODE=permissive`, and an unset, empty or unrecognised value is `strict`. One exemption: a seat whose token lists exactly one agent may name that agent. The operator master credential always needs the agent credential to act as an agent. The active mode and where it comes from are published at `/health` under `actor_credential`.
|
|
152
|
+
- Naming another agent as the assignee of work (a mission `pilot`, a task `assignedTo`) is an assignment, not an identity claim: it is checked against your organisation's roster, not against your credential.
|
|
153
|
+
- A call with no authorization context is refused `RBAC_DENIED` (reason `no-context`).
|
|
111
154
|
|
|
112
155
|
## Tools
|
|
113
156
|
|
|
157
|
+
_Applies to: Cloud and Self-host._
|
|
158
|
+
|
|
114
159
|
<!-- tools:start -->
|
|
115
|
-
|
|
160
|
+
88 tools are advertised to clients. This reference is generated from the server's own `tools/list` by `scripts/print-tools.mjs`; do not edit it by hand.
|
|
116
161
|
|
|
117
162
|
### Memory and search (9)
|
|
118
163
|
|
|
@@ -186,7 +231,7 @@ Your organisation's credential authenticates the **organisation**. An individual
|
|
|
186
231
|
- `list_messages` (read) — List historical messages filtered by session day or sender, newest first; use check_messages for unread.
|
|
187
232
|
- `mark_as_read` (write) — Mark one or more message receipts as read using receiptIds from check_messages.
|
|
188
233
|
- `search_messages_by_keyword` (read) — BM25 full-text keyword search over message content, ranked by relevance.
|
|
189
|
-
- `send_message` (write) — Send a message to one,
|
|
234
|
+
- `send_message` (write) — Send a message to one or more agents BY AGENT ID (recipientAgentIds, the `agentId` values list_peers returns), or via channel routing (broadcast / fleet role / instance).
|
|
190
235
|
|
|
191
236
|
### Briefing notes (5)
|
|
192
237
|
|
|
@@ -223,36 +268,65 @@ Your organisation's credential authenticates the **organisation**. An individual
|
|
|
223
268
|
|
|
224
269
|
### Knowledge bundles (OKF) (2)
|
|
225
270
|
|
|
226
|
-
- `export_okf_bundle` (
|
|
271
|
+
- `export_okf_bundle` (write) — Export a VantagePeers namespace as an OKF v0.1 bundle (tarball).
|
|
227
272
|
- `import_okf_bundle` (write) — Import an OKF v0.1 bundle (memories + briefing-notes + tasks) into a target VantagePeers namespace.
|
|
228
273
|
|
|
229
|
-
### Other (
|
|
274
|
+
### Other (12)
|
|
230
275
|
|
|
276
|
+
- `add_repo_mapping` (write) — Register or update a GitHub repo to orchestrator mapping for webhook event routing.
|
|
277
|
+
- `claim_upload` (write) — Claim an uploaded blob for your organisation with the single-use ticket generate_upload_url returned.
|
|
278
|
+
- `debate_get_room` (read) — Read a debate room: its subject, frozen template, pointer and the full transcript.
|
|
279
|
+
- `debate_post_turn` (write) — Post your answer to the debate-room turn you were asked for; the only way a turn enters a room.
|
|
231
280
|
- `generate_upload_url` (write) — Mint a Convex storage upload URL for the Knowledge Base ingest flow.
|
|
281
|
+
- `get_bulk_complete_run` (read) — Read the status of one live bulk_complete_tasks run by the `bulkRunId` its first call returned.
|
|
282
|
+
- `get_github_owner_bindings` (read) — List the GitHub owners bound to your organisation (master: all), and for master the org-owned repo mappings that have no proof.
|
|
232
283
|
- `improvisation_digest` (read) — Scan a rolling time window of VP tasks, messages, and memories for durable artifacts that carry fleet/state tokens (commit SHA, PR#, VP id, or decisive verb such as merged/deployed/approved) but have NO VP-Sources footer.
|
|
284
|
+
- `list_blocked_on_me` (read) — List the tasks that other peers have BLOCKED on one of YOUR live tasks (blockedOnTaskId), oldest wait first, with the age of each wait.
|
|
285
|
+
- `list_repo_mappings` (read) — List all GitHub repo to orchestrator webhook mappings, newest first with cursor paging support.
|
|
286
|
+
- `remove_repo_mapping` (write, destructive) — Delete a GitHub repo mapping by repo name, stopping webhook event routing for that repo.
|
|
233
287
|
- `whoami` (read) — Returns the orchestrator identity baked into the current bearer's scope context.
|
|
234
288
|
|
|
235
289
|
The tools below are present in the server code but disabled in this release: a client can neither list nor call them. They are named so this reference matches the code exactly.
|
|
236
290
|
|
|
237
|
-
### Registered, not advertised (
|
|
291
|
+
### Registered, not advertised (26)
|
|
238
292
|
|
|
239
|
-
`accept_mandate`, `add_deployment`, `
|
|
293
|
+
`accept_mandate`, `add_deployment`, `create_bu`, `create_mandate`, `delete_bu`, `get_bu`, `get_error`, `get_issue`, `get_mandate`, `get_repo_mapping`, `issue_stats`, `link_commit_to_issue`, `list_bus`, `list_errors`, `list_issues`, `list_mandates`, `remove_deployment`, `settle_mandate`, `soft_delete_mission_template`, `update_bu`, `update_issue_status`, `update_mandate`, `validate_mandate_spending`, `validate_okf_bundle`, `validate_task_payload`, `verify_issue`
|
|
240
294
|
<!-- tools:end -->
|
|
241
295
|
|
|
242
|
-
|
|
296
|
+
### Tool inputs and outputs
|
|
297
|
+
|
|
298
|
+
_Applies to: Cloud and Self-host._
|
|
299
|
+
|
|
300
|
+
- **Annotations.** Every tool declares MCP annotations (`readOnlyHint`, `destructiveHint`, `openWorldHint`), so clients such as ChatGPT can label read and write actions correctly. A tool marked read-only is checked against what its handler does.
|
|
301
|
+
- **Paging.** Most list and search tools page their results with a cursor and keep each response under a fixed size; when a response says more results exist, call again with the returned cursor. `get_github_owner_bindings` takes `limit`, `cursor` and `unprovenCursor` and returns `nextCursor` and `unprovenNextCursor`.
|
|
302
|
+
- **Rows your scope removed.** `list_peers`, `list_tasks_by_mission` and `list_recurring_tasks` answer a bare array when nothing was filtered out, and `{ items, nextCursor?, scopeFiltered }` when your scope removed rows of your own organisation from the page (`scopeFiltered` is that count; another organisation's rows are never counted). `list_broadcast_status` reports `scopeFiltered` and `truncated` beside its receipts. The cursor is decided on the raw page, so a narrowed page still carries its cursor.
|
|
303
|
+
- **List arguments.** Every list argument a client fills (for example `mark_as_read` `receiptIds`) accepts a JSON array or the same array sent as a JSON string. The status filters of `list_tasks`, `list_tasks_by_mission` and `list_missions` are published as an array of statuses; a single status, or an alias (`open`, `active`, `all`) on its own, is still accepted.
|
|
304
|
+
- **Output schemas are open.** A tool's `outputSchema` allows fields added in a later release, so a client connected before an upgrade keeps validating the answers.
|
|
305
|
+
- **Agents by ID.** `send_message` takes `recipientAgentIds` (the `agentId` values `list_peers` returns) and `fromAgentId`; `create_task` and `update_task` take `assignedToAgentId`. A message to a fleet coordinator by channel name is refused (`coordinator-by-name-refused`); address it by ID.
|
|
306
|
+
- **Evidence lines in messages.** In `send_message`, an `evidence:` line that states a live state (a pull request's state, a package version, a task status) must carry the command that produced it on the same line (for example `gh pr view 12 -R owner/repo --json state -> MERGED`) or a token (`{{pr:owner/repo#N}}`, `{{npm:pkg@tag}}`, `{{task:id}}`). A bare literal is refused, even when true, and nothing is sent; a stated state is still checked live.
|
|
307
|
+
- **Tasks.** `create_task` and `update_task` take an optional `deliverable` (`{ pkg, export }`); `get_task` and `list_tasks` then show `deliverableState` and, when the export is published while the task is still open, `deliverableDivergence: "delivered-but-open"`. `bulk_complete_tasks` closes the first 500 matches in the call and the rest in the background; read the run with `get_bulk_complete_run` and the `bulkRunId` it returned. `list_blocked_on_me` lists the tasks other peers have blocked on your live tasks.
|
|
308
|
+
- **Recurring tasks.** A schedule whose previous task is still open creates nothing at its next run and records the skip (`skippedRuns`, `lastSkippedAt`, `lastSkipReason`, shown by `get_recurring_task` and `list_recurring_tasks`).
|
|
309
|
+
- **Debate rooms.** `debate_get_room` reads a room and its transcript; `debate_post_turn` posts your answer when it is your turn. Out-of-turn, non-participant, empty, stale or over-long posts are refused with their own codes (`not_your_turn`, `not_a_participant`, `empty`, `stale_turn`, `too_long`).
|
|
310
|
+
- **Errors.** A protocol error thrown by a tool reads without the former `MCP error <code>:` prefix. `tools/list` stamps its JSON Schemas with the 2020-12 dialect and no longer carries `execution.taskSupport`.
|
|
243
311
|
|
|
244
312
|
## Security
|
|
245
313
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
- **
|
|
249
|
-
- **
|
|
250
|
-
- **
|
|
314
|
+
_Applies to: Cloud._
|
|
315
|
+
|
|
316
|
+
- **Tenant isolation by permanent organisation ID.** Which organisation's data a request can reach is decided from the verified credential, never from a value the client types into a tool argument, and it is keyed on the organisation's permanent ID, not on its renamable name: an organisation that later takes a name another one released reads none of the previous holder's data. The tenant is applied inside each read, so another organisation's row is never read and then dropped. Each seat's token carries a scope profile set by your operator: which agents it may act as or read from, and which memory namespaces it may read and write.
|
|
317
|
+
- **Writes land in your organisation or are refused.** A write made through a non-operator credential is stamped with that credential's organisation; when the organisation resolves to no active mapping, the write is refused `RBAC_DENIED` instead of being stored without an organisation. Knowledge Base tools act for your verified organisation, and `store_document_chunked` ingests only a blob your organisation claimed with `claim_upload`.
|
|
318
|
+
- **Messages stay in your organisation.** A seat's direct messages and broadcasts reach its own organisation's roster, plus fleet coordinators your organisation is explicitly allowed to address.
|
|
319
|
+
- **Agent identity comes from a credential, not a typed name.** See [Agent identity](#agent-identity). A caller from another organisation cannot send a message, or act on a task, under one of your agents' names, even when both organisations have an agent with the same name.
|
|
320
|
+
- **A refusal never looks like an empty result.** A read you are not allowed to make returns an explicit error (for example, `list_peers`, `list_diaries` and `list_briefing_notes` return text opening with `REFUSED (RBAC_DENIED)`) rather than an empty list, so an agent cannot mistake "not allowed" for "nothing there". An agent credential that does not resolve is refused with its own code (`AGENT_CREDENTIAL_INVALID`, HTTP 401), distinct from a lookup failure. A signed-in user whose account has no organisation yet receives its own refusal, distinct from an invalid token.
|
|
321
|
+
- **Token checks.** Clerk session tokens are verified against the issuer's published keys, with issuer and audience both bound. OAuth client secrets are compared in constant time. `redirect_uri` must match a registered URI exactly, and dynamic registration rejects non-HTTPS redirect URIs (except `localhost` / `127.0.0.1`). The consent page's form post must come from the same origin.
|
|
322
|
+
- **Health document.** `/health` is public and publishes only aggregates (version, commit, serving runtime, transport, the agent-identity mode and where it comes from). It never echoes a secret or a customer identifier.
|
|
251
323
|
|
|
252
324
|
To report a vulnerability, open an issue at https://github.com/vantageos-agency/vantage-peers/issues without exploit details and ask for a private channel.
|
|
253
325
|
|
|
254
326
|
## Self-host (a separate product)
|
|
255
327
|
|
|
328
|
+
_Applies to: Self-host._
|
|
329
|
+
|
|
256
330
|
This package also contains the server itself, and can run as a local stdio MCP server against your own deployment:
|
|
257
331
|
|
|
258
332
|
```bash
|
|
@@ -261,10 +335,48 @@ CONVEX_URL=https://<your-deployment>.convex.cloud npx vantage-peers-mcp
|
|
|
261
335
|
|
|
262
336
|
That is **VantagePeers Self-host**, a separate product with its own setup (backend deployment, service identity, environment). It is documented separately at https://vantagepeers.com/docs/getting-started. Nothing in that setup applies to VantagePeers Cloud, and nothing above is needed to self-host.
|
|
263
337
|
|
|
338
|
+
The stdio server answers MCP protocol `2026-07-28` and `2025-11-25` clients alike. It presents the service identity of your deployment to your backend (`CLERK_SECRET_KEY` and `CLERK_SERVICE_ACCOUNT_USER_ID`, see the Self-host guide); without it, it refuses to start.
|
|
339
|
+
|
|
264
340
|
The package also exports typed function references for the VantagePeers backend at `vantage-peers-mcp/api`, for TypeScript services that call a deployment directly.
|
|
265
341
|
|
|
342
|
+
### Backend compatibility check
|
|
343
|
+
|
|
344
|
+
_Applies to: Self-host._
|
|
345
|
+
|
|
346
|
+
Before it serves anything, the server asks your backend for its contract manifest (`meta:backendContract`) and refuses to start, with a log line beginning `BACKEND INCOMPATIBLE (<reason>)`, when:
|
|
347
|
+
|
|
348
|
+
- the backend has no manifest (it predates this check);
|
|
349
|
+
- the backend's contract version is below **10**, the version this release requires;
|
|
350
|
+
- any of the **141** backend functions this release calls is missing (they are named in the log);
|
|
351
|
+
- the server cannot present its service identity, or the backend refuses it.
|
|
352
|
+
|
|
353
|
+
So upgrade in this order: deploy the backend of the same release first, then upgrade this package. The check sees a missing function, not a changed argument; the contract version covers that.
|
|
354
|
+
|
|
266
355
|
## Release notes
|
|
267
356
|
|
|
357
|
+
### 4.0.0
|
|
358
|
+
|
|
359
|
+
_Applies to: Cloud and Self-host._ Each item names the product it concerns.
|
|
360
|
+
|
|
361
|
+
**Breaking**
|
|
362
|
+
|
|
363
|
+
- Cloud: connecting signs in a person. `/authorize` no longer issues a code to a registered client on its own: you sign in with your VantagePeers account and approve on the [consent page](#the-consent-page), choosing the organisation and the agent.
|
|
364
|
+
- Cloud: agent identity is `strict` by default. A typed agent name without an agent credential is refused `AGENT_CREDENTIAL_REQUIRED` unless the operator explicitly sets `permissive` (see [Agent identity](#agent-identity)).
|
|
365
|
+
- Cloud: a write whose organisation resolves to no active mapping is refused instead of stored without an organisation, and a token of an inactive or unmapped organisation is refused with HTTP 401 (see [Security](#security)).
|
|
366
|
+
- Cloud and Self-host: `list_peers`, `list_tasks_by_mission` and `list_recurring_tasks` answer `{ items, nextCursor?, scopeFiltered }` when your scope removed rows; `send_message` refuses an `evidence:` line that states a live state without its command; tool protocol errors lose the `MCP error <code>:` prefix (see [Tool inputs and outputs](#tool-inputs-and-outputs)).
|
|
367
|
+
- Self-host: the server refuses to start against a backend below contract version 10 or missing a function it calls (see [Backend compatibility check](#backend-compatibility-check)). `engines.node` is `26.12.1` (see [Requirements](#requirements)).
|
|
368
|
+
|
|
369
|
+
**Added**
|
|
370
|
+
|
|
371
|
+
- Cloud and Self-host: MCP protocol `2026-07-28` beside `2025-11-25`.
|
|
372
|
+
- Cloud: the consent page lets you choose the agent a connection acts as; a person can hold one agent per AI client; a person's connection gets a refresh token; `offline_access` is advertised; OpenID discovery and `/userinfo` (see [OAuth endpoints](#oauth-endpoints)).
|
|
373
|
+
- Cloud and Self-host: `list_blocked_on_me`, `get_bulk_complete_run`, `debate_get_room`, `debate_post_turn`; agent-ID arguments; task deliverables; `whoami` names the agent by ID and returns `caller_id`, `org_slug`, `role` (see [Tools](#tools)).
|
|
374
|
+
|
|
375
|
+
**Security and fixes**
|
|
376
|
+
|
|
377
|
+
- Cloud: tenant isolation keyed on the permanent organisation ID and applied inside each read; a removed member loses access within seconds; a replayed refresh token revokes its connection (see [Tokens and revocation](#tokens-and-revocation)).
|
|
378
|
+
- Cloud and Self-host: list arguments accept a JSON string; output schemas accept added fields; dependencies updated (`zod` ^4.6.7, `@vantageos/cloud-identity` ^0.27.0; `zod` 4.3.6 and 4.4.3 carried GHSA-mrhx-c7xc-m3w5).
|
|
379
|
+
|
|
268
380
|
### 3.0.0
|
|
269
381
|
|
|
270
382
|
**Breaking**
|
|
@@ -303,7 +415,9 @@ Full history: [CHANGELOG.md](https://github.com/vantageos-agency/vantage-peers/b
|
|
|
303
415
|
|
|
304
416
|
## Requirements
|
|
305
417
|
|
|
306
|
-
|
|
418
|
+
_Applies to: Self-host._
|
|
419
|
+
|
|
420
|
+
Node.js 26.12.1 (the October 2026 security release), for the Self-host stdio server and the `vantage-peers-mcp/api` exports: `engines.node` names that exact version. A backend of the same release (contract version 10, see [Backend compatibility check](#backend-compatibility-check)). VantagePeers Cloud clients need nothing installed.
|
|
307
421
|
|
|
308
422
|
## License
|
|
309
423
|
|
package/dist/server-http.d.ts
CHANGED
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
* BEARER_SECRET_MASTER — master admin token
|
|
28
28
|
* PUBLIC_BASE_URL — public URL of this server (for OAuth discovery)
|
|
29
29
|
* PORT — HTTP port (default 3000)
|
|
30
|
+
* AUTHORIZE_STATE_SECRET, CLERK_DOMAIN, AUTHORIZE_SIGN_IN_URL,
|
|
31
|
+
* AUTHORIZE_CALLBACK_URL, CLERK_SECRET_KEY — person authorization
|
|
32
|
+
* (/authorize); any missing => 503, never auto-approve
|
|
30
33
|
* NODE_ENV — set to "production" on Railway
|
|
31
34
|
*/
|
|
32
35
|
import { Hono } from "hono";
|
|
@@ -44,3 +47,22 @@ export declare function parseBasicAuthSecret(authHeader: string | undefined, bod
|
|
|
44
47
|
};
|
|
45
48
|
export declare function redirectUriMatches(registeredUri: string, presentedUri: string): boolean;
|
|
46
49
|
export declare const app: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
|
|
50
|
+
export declare const MCP_RESOURCE_PATH = "/mcp";
|
|
51
|
+
export declare const OFFLINE_ACCESS_SCOPE = "offline_access";
|
|
52
|
+
export declare const REGISTER_RATE_LIMIT_PER_CLIENT = 10;
|
|
53
|
+
export declare const REGISTER_RATE_LIMIT_PER_IP = 60;
|
|
54
|
+
/**
|
|
55
|
+
* The client address a rate limiter may key on: the one the TRUSTED edge
|
|
56
|
+
* observed, never a value the client wrote.
|
|
57
|
+
*
|
|
58
|
+
* 1. `x-real-ip` — the Railway edge sets it "for identifying client's remote
|
|
59
|
+
* IP" (docs.railway.com/networking/public-networking/specs-and-limits).
|
|
60
|
+
* 2. else the RIGHTMOST `x-forwarded-for` entry — a proxy appends the address
|
|
61
|
+
* it observed; every entry to its left is client-supplied. The first entry
|
|
62
|
+
* is attacker-controlled and must never be the key (rotating it bypassed
|
|
63
|
+
* the per-IP ceiling).
|
|
64
|
+
* 3. else `"unknown"` — one shared bucket, as before.
|
|
65
|
+
*/
|
|
66
|
+
export declare function clientIpForRateLimit(header: (name: string) => string | undefined): string;
|
|
67
|
+
/** Test-only: clear every DCR rate-limit bucket. */
|
|
68
|
+
export declare function _resetRegisterRateLimitForTest(): void;
|