> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-mintlify-enhance-budget-policies-param-docs-45.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Architecture

## System Overview

<Frame>
  <img src="https://mintcdn.com/portkey-docs-mintlify-enhance-budget-policies-param-docs-45/V4kmaPnSQZwF3-fC/images/product/mcp-gateway/architecture.png?fit=max&auto=format&n=V4kmaPnSQZwF3-fC&q=85&s=075056f7f787bffd4d5987d47e017f0c" width="1070" height="884" data-path="images/product/mcp-gateway/architecture.png" />
</Frame>

## Security Architecture

The gateway implements defense-in-depth security:

1. **Client Authentication**: OAuth 2.1 tokens validated on every request
2. **Authorization**: Scope-based access control for MCP operations
3. **Token Isolation**: Client tokens never forwarded to upstream servers
4. **Session Security**: Cryptographically secure session IDs with token-aligned expiration
5. **Transport Security**: TLS encryption for all connections
6. **Audit Logging**: Complete request/response audit trail
