> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-migration-04-ai-tools.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-migration-04-ai-tools/KIf_OTv5SVP6Sg0M/images/product/mcp-gateway/architecture.png?fit=max&auto=format&n=KIf_OTv5SVP6Sg0M&q=85&s=4b866d5bd42668838a6426e213763492" width="1070" height="884" data-path="images/product/mcp-gateway/architecture.png" />
</Frame>

<Note>
  The MCP Gateway supports remote MCP servers using HTTP/SSE transport protocols (StreamableHTTP and SSE). If you have a local STDIO-based MCP server that you want to use with the gateway, see our guide on [Converting STDIO MCP Servers to Streamable HTTP](/guides/converting-stdio-to-streamable-http).
</Note>

## 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
