Skip to content

Outbound MCP consent should be per server and per remote tool, not one global write grant #262

Description

@serge-ivo

Problem

mcp_call_tool is correctly marked as write-scoped because an arbitrary remote MCP tool may mutate external state. But the current consent model is too coarse:

  • read-only remote tools are blocked unless the generic write-scoped mcp_call_tool is permitted
  • granting write access to connector mcp potentially allows all calls to all configured MCP endpoints available to that instance
  • user consent UI cannot distinguish Figma read actions from Figma edits, ProAgentStore reads from destructive changes, etc.

Why this matters

MCP servers publish tool metadata, and users need understandable control over what an agent can do in each connected app. A single global mcp write toggle is not enough for valuable app-operating agents.

Expected behavior

Consent should be scoped at least by MCP connection/server, and preferably by remote tool. Remote tool annotations such as read-only/destructive hints should inform UX, but must be treated as hints rather than trusted security boundaries. PAGS should keep server-side enforcement based on user grants and explicit confirmations.

Acceptance criteria

  • Consent state distinguishes between different MCP endpoints/connections.
  • User can allow read-only remote tools without granting all remote writes.
  • User can approve individual write-capable remote tools or tool groups for a specific MCP connection.
  • Destructive/overwrite-style remote tools require an additional explicit confirmation path when identifiable.
  • Consent checks happen before dispatch to the remote MCP server.
  • Audit records show which endpoint and remote tool consent allowed or denied the call.
  • Existing connector write-consent behavior remains fail-closed for the generic escape hatch.

Related

Code pointers

  • workers/api/src/lib/tool-registry.ts
  • workers/api/src/lib/connector-consent.ts
  • workers/api/src/lib/connectors/mcp.ts
  • store/console/src/tabs/SettingsTab.tsx

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions