Skip to content

feat(agent-vault): take allowedTools on a session's MCP servers - #51

Merged
scott-ray-wilson merged 4 commits into
mainfrom
scott/av-inline-mcp-allowed-tools
Nov 13, 2026
Merged

scott-ray-wilson merged 4 commits into
mainfrom
scott/av-inline-mcp-allowed-tools

Conversation

@scott-ray-wilson

@scott-ray-wilson scott-ray-wilson commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Context

Infisical/infisical#9418 lets an MCP server sent with a session (services on sessions.create) take allowedTools, the same as an MCP server in an access bundle. This brings the SDK's types in line with that change:

  • AgentVaultInlineMcpServiceInput takes allowedTools?: string[] | null. Without it, a TypeScript caller who adds the field to an inline MCP server gets a compile error.
  • AgentVaultInlineMcpService returns allowedTools?: string[] | null. It's null when the server allows every tool, and undefined from an Infisical version that doesn't return it.
  • The sessions.create docs no longer say an inline MCP server can't be limited to some of its tools.

npm test now also type-checks the tests in sink. Before, Vitest ran them without checking types, and the build's tsconfig leaves sink out, so a regression in the SDK's public types left every test green. The check uses a new tsconfig.test.json that targets ES2022 like the build. This change also drops the tsc devDependency: that npm package is a placeholder whose tsc binary only prints "install typescript", and it shadowed the real tsc from the typescript dependency. typescript stays a runtime dependency.

It also adds .github/workflows/test.yml, which runs npm ci, npm test and npm run build on pull requests and on pushes to main. Until now the repo only had release.yml, so nothing ran the tests (or the new type check) on a PR. It uses the same pinned actions and Node version as release.yml.

It's safe to release before or after the server. If a caller sends allowedTools to 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 test passes with type checking on (276 tests, no type errors), including a new case that sends an inline MCP server with allowedTools and reads the field back from the created session.
  • Against main's types, npm test fails its type check: 'allowedTools' does not exist in type 'AgentVaultInlineMcpServiceInput' and Property 'allowedTools' does not exist on type 'AgentVaultInlineMcpService'. It compiles with this change.
  • npm run build succeeds.
  • I tested the server side against a local Infisical running #9418, with a real proxy: the session's tools/list showed only the listed tool, and the proxy refused calls to the other tools.

🤖 Generated with Claude Code

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>
@infisical-review-police

Copy link
Copy Markdown

💬 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.

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

Adds optional, nullable allowedTools to inline MCP service inputs and responses.

  • Session callers can limit an inline MCP service to named tools.
  • Test runs now check test types, and CI runs the tests and build.

No new actionable issues were found.

Reviews (4) · Last reviewed commit: "ci: run the tests and build on pull requ..." · Reviewed by Greptile

Comment thread sink/agent-vault.test.ts Resolved
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>
@linear

linear Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

AGE2-369

AGE2-370

Comment thread src/api/types/agent-vault.ts Resolved
Comment thread vitest.config.ts Resolved
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>
@scott-ray-wilson
scott-ray-wilson merged commit b5500f0 into main Nov 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants