Implementation Guide

    Restricting Google Drive MCP Agents to IRB-Approved Research Folders

    Restrict a Google Drive MCP agent in two layers. First, shrink what the credential can reach: narrow OAuth scopes, a dedicated service account, and membership limited to approved shared drives or folders. Second, enforce a folder allowlist on each MCP tool call at runtime, resolving the real folder of every requested file and deciding to allow, redact, block, or escalate for human approval. Record each decision as evidence tied to the approved study.

    Enforcing folder policy on each MCP tool call

    1. 1

      Intercept the call

      Capture the tool name and parameters for search, list, read, or export before execution.

    2. 2

      Resolve the target

      Look up the file or folder and its parent chain from Drive rather than from agent input.

    3. 3

      Evaluate against the allowlist

      Check the resolved folder against approved study folders and explicit deny entries.

    4. 4

      Decide: allow, redact, block, or escalate

      Allow calls inside approved scope. Redact identifiers from returned content where a folder is permitted but a field is not. Block calls outside scope. Escalate ambiguous or sensitive calls to a human approver.

    5. 5

      Record the decision

      Write the outcome, with the resolved path and any approver, as evidence before returning results.

    Evidence to capture for each tool call

    • Timestamp and the agent and credential identity that made the call
    • Tool name and the full call parameters as received
    • Resolved file ID, folder path, and parent chain at the time of the call
    • The approved study the matched folder is mapped to
    • Policy version and decision: allow, redact, block, or escalate
    • Approver identity, decision, and time for any escalated call
    • A record of which fields were redacted, without storing the redacted values

    Where access boundaries are set, and where they stop

    A Google Drive MCP server acts on Drive through whatever credential authorizes it. That is usually either a user's OAuth grant or a service account. The boundary therefore comes from two places: the OAuth scopes the server was granted, and the Drive permissions held by the identity behind the credential.

    Both are coarse relative to the question a security engineer actually needs answered. A scope describes a category of access, not a list of folders. Drive permissions describe what an identity can reach, not what an agent should request for a given task. If a user authorizes the agent, the agent inherits that user's reach, which in a research organization may include unapproved studies, identifiable participant data, or documents under consent restrictions.

    Neither mechanism evaluates individual tool calls. When an agent invokes search, list, read, or export, the platform checks whether the credential is permitted. It does not check whether this specific request falls inside the protocol the agent is supposed to be working on. That gap is why permissions alone do not constrain what an agent requests, and why the design needs a second layer in the execution path.

    Layer one: reduce permissions in Google Workspace

    Start by making the credential as small as possible. This layer does not replace runtime policy, but it limits the damage when policy is misconfigured or bypassed.

    • Use a dedicated service account where possible: Avoid binding the MCP server to an individual researcher's OAuth grant. A dedicated identity has a reach you can define and review.
    • Request the narrowest scopes the tools need: If the agent only reads, do not grant write or full-drive access. Remove capabilities the use case does not require.
    • Scope membership to approved containers: Add the service account only to the shared drives or folders that belong to approved studies. Do not add it to parent containers that also hold other work.
    • Separate sensitive material: Keep identifiable participant data and consent documents in locations the agent identity cannot reach unless a specific policy permits it.
    • Review inherited access: Folder permissions can propagate to child items. Check what the identity actually receives, not only what was granted directly.

    Layer two: build a folder allowlist tied to approved studies

    IRB approval is a per-study determination. Covered research may not begin before the institution certifies that the study has been reviewed and approved by an IRB, and research subject to the policy must be reviewed and approved by an IRB operating under its requirements. A useful allowlist reflects that. Each entry should map a Drive folder or shared drive to an identified, approved study, with a named owner who maintains the mapping.

    Consider enabling a study folder for agents only after approval is recorded, and removing it when the study closes or the approval changes. Consent forms and approved protocol documents are IRB-controlled artifacts, since informed consent is documented on a form the IRB approves. Treat folders holding them as explicit allow or deny entries rather than leaving them to inherit a parent's treatment.

    The harder part is reliability. A file ID tells you nothing about where the file lives, and a file can sit in a location different from the one a name suggests. Do not trust folder names or paths supplied by the agent. At call time, resolve the requested file's parent chain from Drive and compare it against the allowlist. If the chain cannot be resolved, or resolves partly outside an approved folder, treat the call as ambiguous and do not allow it by default.

    Tradeoffs and what escalation should not mean

    Runtime checks add a lookup per call, and search is the awkward case. A search can return results from many folders, so the policy has to filter or constrain the result set instead of judging a single file. Decide up front whether broad search is blocked, restricted to approved folders, or escalated.

    Blocking is the safest default and the most disruptive. Escalation for human approval handles the cases where a researcher has a legitimate need that the allowlist did not anticipate. Keep escalation narrow, and define who may approve it. It should not be framed as a substitute for IRB approval. Institutional officials may add their own review of IRB-approved research but may not approve research the IRB has not approved, and an agent access approver is in the same position. Confirm with your IRB and counsel how consent-related documents and identifiable data should be handled.

    No configuration here should be described as IRB compliance certification. The controls constrain and document agent access. Whether a given study's handling meets its approved protocol remains an institutional determination.

    Layered restriction for Drive MCP agents

    1. Credential scope

    Narrowest OAuth scopes and a dedicated identity for the MCP server.

    2. Drive permissions

    Service account access limited to approved shared drives or folders.

    3. Folder allowlist

    Each approved folder mapped to an identified IRB-approved study.

    4. Runtime policy

    Allow, redact, block, or escalate on every tool call.

    5. Evidence

    Per-call records of parameters, resolved folder, decision, and approver.

    Enforce folder-level policy where the agent acts

    See how policy enforcement on MCP tool calls and audit-ready evidence work in a regulated enterprise deployment.

    See How Evidence Is Produced
    Next step

    How does your AI governance program compare?

    See where your program has gaps in less than 2 minutes.