Skip to content

Node: expose MCP server instruction policy - #2386

Open
OllieinCanada wants to merge 1 commit into
github:mainfrom
OllieinCanada:fix/typescript-mcp-instructions-2379
Open

Node: expose MCP server instruction policy#2386
OllieinCanada wants to merge 1 commit into
github:mainfrom
OllieinCanada:fix/typescript-mcp-instructions-2379

Conversation

@OllieinCanada

Copy link
Copy Markdown

Fixes #2379

Summary

  • expose allowAllMcpServerInstructions on the shared TypeScript session config
  • forward explicitly configured true and false values through both session.create and session.resume
  • omit the option when it is not configured, preserving the runtime's allowlist-based default

The generated session.rpc.options.update surface already supports this field. This change fills the missing public create/resume path without modifying the generated protocol types.

Security

Enabling this option broadens the session's instruction trust boundary. The public API documentation calls that out, and the SDK does not enable it by default or silently coerce an omitted value.

Tests

Deterministic mocked-transport tests cover explicit true, explicit false, and omission for both create and resume. They require no Copilot model or external service.

Local validation:

  • focused Vitest regression: 3 passed
  • TypeScript typecheck: passed
  • build: passed
  • ESLint: 0 errors (5 pre-existing warnings in untouched tests)
  • Prettier check for all three touched files: passed
  • git diff --check: passed

Signed-off-by: Oliver Slapinski <olliefromcanada@gmail.com>
@OllieinCanada
OllieinCanada requested a review from a team as a code owner August 24, 2026 03:52
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.

Expose and serialize allowAllMcpServerInstructions in TypeScript SDK

1 participant