Repository navigation
feat(agent-vault): take allowedTools on a session's MCP servers - #51
Merged
Merged
Conversation
An MCP server sent with a session can now be limited to some of its tools (Infisical/infisical#9418). AgentVaultInlineMcpServiceInput takes allowedTools, AgentVaultInlineMcpService returns it, and the sessions.create docs no longer say inline MCP servers can't be limited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
💬 Discussion in Slack: #pr-review-node-sdk-v2-51-feat-agent-vault-take-allowedtools-on-a-session-s-mcp-s Posted by Review Police — reviews, comments, new commits, and CI failures will stream into this channel. |
6 of 11 tasks
[Medium impact] The PR appears safe to merge; no blocking issues were found.
|
Vitest ran the tests without checking their types, and the build's tsconfig leaves sink out, so a type regression in the SDK's public types left every test green. npm test now type-checks sink/**/*.test.ts with tsconfig.test.json, which targets ES2022 like the build so Error.cause and AggregateError resolve. Drops the "tsc" devDependency: that npm package is a placeholder whose tsc binary only prints "install typescript", and it shadowed the tsc from the typescript dependency that Vitest's type check runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
saifsmailbox98
requested changes
Nov 13, 2026
The count was wrong (the server allows 500, not 100), and the server's own error names the limit, so the SDK doc no longer states one that can go stale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repo only had release.yml, so npm test never ran on a pull request. This runs npm ci, npm test and npm run build on every pull request and on pushes to main, on the same Node version and pinned actions as the release workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
saifsmailbox98
approved these changes
Nov 13, 2026
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.
Context
Infisical/infisical#9418 lets an MCP server sent with a session (
servicesonsessions.create) takeallowedTools, the same as an MCP server in an access bundle. This brings the SDK's types in line with that change:AgentVaultInlineMcpServiceInputtakesallowedTools?: string[] | null. Without it, a TypeScript caller who adds the field to an inline MCP server gets a compile error.AgentVaultInlineMcpServicereturnsallowedTools?: string[] | null. It'snullwhen the server allows every tool, andundefinedfrom an Infisical version that doesn't return it.sessions.createdocs no longer say an inline MCP server can't be limited to some of its tools.npm testnow also type-checks the tests insink. Before, Vitest ran them without checking types, and the build's tsconfig leavessinkout, so a regression in the SDK's public types left every test green. The check uses a newtsconfig.test.jsonthat targets ES2022 like the build. This change also drops thetscdevDependency: that npm package is a placeholder whosetscbinary only prints "install typescript", and it shadowed the realtscfrom thetypescriptdependency.typescriptstays a runtime dependency.It also adds
.github/workflows/test.yml, which runsnpm ci,npm testandnpm run buildon pull requests and on pushes tomain. Until now the repo only hadrelease.yml, so nothing ran the tests (or the new type check) on a PR. It uses the same pinned actions and Node version asrelease.yml.It's safe to release before or after the server. If a caller sends
allowedToolsto an Infisical version without #9418, that version refuses the session with a 400 that names the field. The read field is optional.Steps to verify the change
npm testpasses with type checking on (276 tests, no type errors), including a new case that sends an inline MCP server withallowedToolsand reads the field back from the created session.main's types,npm testfails its type check:'allowedTools' does not exist in type 'AgentVaultInlineMcpServiceInput'andProperty 'allowedTools' does not exist on type 'AgentVaultInlineMcpService'. It compiles with this change.npm run buildsucceeds.tools/listshowed only the listed tool, and the proxy refused calls to the other tools.🤖 Generated with Claude Code