> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Give an AI agent secure, permission-aware access to enterprise documents

> Give an AI agent secure access to enterprise documents in Box. The Box MCP server and Box APIs act as the authenticated user or application. Scopes, collaborations, and waterfall permissions still apply.

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = localizeLink(href);
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

Connect the agent as an authenticated Box identity.

Use the hosted <Link href="/guides/box-mcp">Box MCP server</Link> (`https://mcp.box.com`) when the agent supports MCP. Use the Box APIs, SDKs, or <Link href="/guides/cli">Box CLI</Link> when the agent runs code. Either way, the agent only sees files the authenticated user or application can already access.

Connecting any agent platform to Box does **not** bypass file permissions. Box checks collaborations, waterfall folder permissions, and application scopes on every request.

## How access works

Three layers apply on every request:

| Layer                   | What it controls                                                                                              |
| ----------------------- | ------------------------------------------------------------------------------------------------------------- |
| **Identity**            | Who the agent is: an end user (OAuth) or a service account / CCG application.                                 |
| **Scopes**              | The maximum actions the integration can request. Scopes never grant access to files the identity cannot open. |
| **Content permissions** | Collaborations, waterfall folder permissions, shared links, Shield, and classification policies.              |

The MCP server does not impersonate other users or search the enterprise unless the identity already can. See <Link href="/guides/getting-started/why-box#does-the-box-mcp-server-bypass-box-permissions">Does the Box MCP server bypass Box permissions?</Link>

## Choose an identity

<AccordionGroup>
  <Accordion title="End-user OAuth (default for MCP)">
    The agent acts as the Box user who signs in. Use this for assistants that work on that person's files: Copilot, Cursor, Claude, Foundry Tools, and similar clients.

    Enable MCP in the Admin Console, create integration credentials, and request only the scopes the agent needs. See <Link href="/guides/box-mcp/setup">Set up the MCP server</Link>.
  </Accordion>

  <Accordion title="Service account or CCG (automation)">
    Server-side jobs (extract on upload, publish to a hub, scheduled review) typically authenticate as a service account with <Link href="/guides/authentication/client-credentials">Client Credentials Grant</Link>.

    Collaborate that service account onto specific folders. Do not use a service account as a hidden superuser for an interactive agent. Downscope tokens when you pass credentials to a browser or untrusted runtime. See <Link href="/guides/authentication/tokens/downscope">Downscope a token</Link>.
  </Accordion>
</AccordionGroup>

## Production versus local tests

Use a <Link href="https://account.box.com/signup/developer">free developer account</Link> and sample files while you learn the tools. The <Link href="/tutorials/connect-an-agent-to-box">Connect an AI agent to Box</Link> tutorial covers local setup and warns against pointing a coding agent at production content.

For production:

1. An admin enables MCP (or authorizes the Platform App) in the Admin Console.
2. Create dedicated integration credentials and request only the scopes you need.
3. Choose the Box user or service account deliberately. Collaborate it onto the folders the agent should access.
4. Test with that identity. If a file is missing from search or Ask, check collaborations first, not the model.

## Microsoft agent platforms

GitHub Copilot and Microsoft Foundry Tools connect to Box through MCP with the same permission model as any other client:

* The Box user who authorizes the connection is the identity.
* Admin-configured scopes cap what the client can request.
* SharePoint or Graph permissions do not replace Box permissions on Box files.

For setup steps, see <Link href="/guides/box-mcp/integrations/microsoft-foundry-tools">Microsoft Foundry Tools</Link> and <Link href="/guides/box-mcp/integrations/github-copilot">GitHub Copilot</Link>. For the tool list, see <Link href="/guides/box-mcp/tools">Available tools</Link>.

## Related patterns

* Query a curated knowledge base with hubs and Ask: <Link href="/guides/hubs-api/access-controlled-knowledge-base">Access-controlled AI knowledge base</Link>.
* Start with Box-managed retrieval before exporting to a vector index: <Link href="/ai/rag">Build RAG over enterprise documents stored in Box</Link>.

<RelatedLinks
  title="RELATED GUIDES"
  items={[
{ label: translate("Box MCP server"), href: "/guides/box-mcp", badge: "GUIDE" },
{ label: translate("Set up the MCP server"), href: "/guides/box-mcp/setup", badge: "GUIDE" },
{ label: translate("Security overview"), href: "/guides/security", badge: "GUIDE" },
{ label: translate("Connect an AI agent to Box (lab)"), href: "/tutorials/connect-an-agent-to-box", badge: "TUTORIAL" }
]}
/>
