> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-mintlify-add-terraform-provider-docs-72855.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-add-terraform-provider-docs-72855/qsr0evnTREXEwQWU/images/product/mcp-gateway/architecture.png?fit=max&auto=format&n=qsr0evnTREXEwQWU&q=85&s=59f028d3d3bba471ee848481612be4b7" 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
