Repository navigation
feat(mcp): answer an MCP agent's scope request on Vana Web or in the terminal - #86
Merged
Merged
Conversation
…the terminal When a connected agent calls request_scope_access, the server vana runs now hands it a link to a loopback page where the owner ticks which of the requested scopes to share, or declines. `vana mcp requests`, `vana mcp approve <id> [--scopes a,b]` and `vana mcp deny <id>` give the same answer from the terminal, and `vana status` shows one line while a request waits. `vana mcp` with no arguments still runs the stdio MCP server. Needs personal-server-ts PR 372 (mcpScopeRequestApprovalUrl and the scope-request approve/deny endpoints); an older server keeps working and the commands say it is too old. Claude-Session: https://claude.ai/code/session_01Fcv6uEy4zcXaigzDNxeW3j
The approval surface for `request_scope_access` is now Vana Web, the same place app data requests are answered, and it works from a phone. The local server passes personal-server-ts 1.30.0's `vanaWebMcpScopeRequestApprovalUrl` hook, so the agent gets `<web>/mcp/requests/<id>?ps_origin=<tunnel URL>`: app.vana.org on mainnet, app-dev.vana.org on moksha (served by the dev deployment). A `--local` server has no public https origin and gets no link. The loopback scope-request page and `.vana-cli-approval.json` are gone; the MCP OAuth approval page is back to what main has. `vana mcp requests` shows the same Vana Web link per request when the server has a public origin (from its /health `apiOrigin`), and otherwise says to answer with `vana mcp approve|deny`. An unknown connection's MCP_CONNECTION_NOT_FOUND maps to not_found. Pins personal-server-ts 1.30.0 (and its core package, which entry.mjs now imports directly). Claude-Session: https://claude.ai/code/session_01Fcv6uEy4zcXaigzDNxeW3j
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 7, 2026
## [0.39.0](v0.38.10...v0.39.0) (2026-10-07) ### Features * **mcp:** answer an MCP agent's scope request on Vana Web or in the terminal ([#86](#86)) ([00c19ca](00c19ca))
Contributor
|
🎉 This PR is included in version 0.39.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an agent connected to your Personal Server (Claude, Claude Code, Cursor) needs data it was not given, it calls
request_scope_access. Until now nothing on a CLI-run server let the owner answer that. With this PR:vana server startruns passesvanaWebMcpScopeRequestApprovalUrlfrom personal-server-ts 1.30.0, sorequest_scope_accesshands the agent a Vana Web link:https://app.vana.org/mcp/requests/<connection id>?ps_origin=<the server's tunnel URL>. That is the same approval surface as app data requests, and it works from a phone. Moksha useshttps://app-dev.vana.org, since the CLI's moksha server already runs on the dev deployment (dev gateway, storage and relay). The page itself is unity-surfaces PR 1517.--localserver (no public https origin), or a server whose tunnel is not up yet, gets no link; the agent is told to wait for approval in Vana.vana mcp requestslists waiting requests (who, scopes, reason, age, what it already has) with the same Vana Web link per request when the server has a public origin (its /healthapiOrigin). Without one it says to answer withvana mcp approve <id>orvana mcp deny <id>.vana mcp approve <id> [--scopes a,b]andvana mcp deny <id>answer from the terminal through the owner endpoints, with the PS session token the CLI already holds. All three emit one outcome with--json; exit codes follow the table (2 bad scopes, 5 no server or gateway down, 6 concurrent update, 1 otherwise).vana statusadds one "Agents" line while a request waits, andaccessRequestsin--json.vana mcpwith no arguments still runs the stdio MCP server..vana-cli-approval.jsonfile are removed.Server version
Pins personal-server-ts 1.30.0 (
PERSONAL_SERVER_VERSION, runtime-pkg package.json and lockfile). The only change since 1.29.2 is personal-server-ts PR 372: the scope-request approve/deny endpoints,grantedScopesin the connection list,GET /v1/mcp/connections/:id, and the approval URL hook.@opendatalabs/personal-server-ts-coreis now a direct runtime dependency at the same version because entry.mjs imports the hook from@opendatalabs/personal-server-ts-core/mcp. Install scripts are unchanged (better-sqlite3 12.11.1, secp256k1 5.0.2). A running server picks up 1.30.0 on its nextvana server stop && vana server start. Against an older server the commands still list requests and say the server is too old to take the answer.Tests
pnpm validategreen (741 tests).--scopesvalidation, old server, 401, the status line.@opendatalabs/personal-server-ts-core/mcpexports the hook and that it builds the same URL the CLI shows.https://claude.ai/code/session_01Fcv6uEy4zcXaigzDNxeW3j