---
title: "AIGatewayMCPServerConfig"
url: "https://nov18-dev.movespot.fyi/apis/konnect-ai-gateway-dev-0/versions/eaabd2fa-a9d5-44cc-b086-e210c9c21bf3/schemas/AIGatewayMCPServerConfig"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-ai-gateway-dev-0/versions/eaabd2fa-a9d5-44cc-b086-e210c9c21bf3.md

# AIGatewayMCPServerConfig

Routing, logging, and server configuration for the MCP Server.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Konnect AI Gateway
  version: 0.0.0
servers:
  - url: https://us.api.konghq.com/v1
    description: United-States Production region
  - url: https://eu.api.konghq.com/v1
    description: Europe Production region
  - url: https://au.api.konghq.com/v1
    description: Australia Production region
  - url: https://me.api.konghq.com/v1
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v1
    description: India Production region
  - url: https://sg.api.konghq.com/v1
    description: Singapore Production region
components:
  schemas:
    AIGatewayRouteConfig:
      description: Configuration for an AI Gateway route.
      type: object
      properties:
        destinations:
          description: A list of IP destinations of incoming connections that match this
            route when using stream routing. Each entry is an object with fields
            ip (optionally in CIDR range notation) and/or port.
          type: array
          items:
            type: object
            properties:
              ip:
                type: string
              port:
                type: integer
            example:
              ip: 10.1.0.0/16
              port: 1234
        headers:
          description: "One or more lists of values indexed by header name that will cause
            this route to match if present in the request. The `Host` header
            cannot be used with this attribute: hosts should be specified using
            the `hosts` attribute. When `headers` contains only one value and
            that value starts with the special prefix `~*`, the value is
            interpreted as a regular expression."
          type: object
          example:
            version:
              - v1
              - v2
          additionalProperties: true
        hosts:
          description: A list of domain names that match this route. Note that the hosts
            value is case sensitive.
          type: array
          items:
            type: string
            example: foo.example.com
        https_redirect_status_code:
          description: "The status code Kong responds with when all properties of a route
            match except the protocol i.e. if the protocol of the request is
            `HTTP` instead of `HTTPS`. `Location` header is injected by Kong if
            the field is set to 301, 302, 307 or 308. Note: This config applies
            only if the route is configured to only accept the `https`
            protocol."
          type: integer
          default: 426
        id:
          type: string
          example: 56c4566c-14cc-4132-9011-4139fcbbe50a
        methods:
          description: A list of HTTP methods that match this route.
          type: array
          items:
            type: string
        name:
          description: The name of the route. Route names must be unique, and they are
            case sensitive. For example, there can be two different routes named
            test and Test.
          type: string
        path_handling:
          description: Controls how the service path, route path and requested path are
            combined when sending a request to the upstream. See above for a
            detailed description of each behavior.
          type: string
          default: v0
        paths:
          description: A list of paths that match this route.
          type: array
          items:
            type: string
        preserve_host:
          description: When matching a route via one of the `hosts` domain names, use the
            request `Host` header in the upstream request headers. If set to
            `false`, the upstream `Host` header will be that of the service's
            `host`.
          type: boolean
          default: false
        protocols:
          description: An array of the protocols this route should allow. See the [route
            Object](#route-object) section for a list of accepted protocols.
            When set to only `https`, HTTP requests are answered with an upgrade
            error. When set to only `http`, HTTPS requests are answered with an
            error.
          type: array
          items:
            type: string
          default:
            - http
            - https
        regex_priority:
          description: A number used to choose which route resolves a given request when
            several routes match it using regexes simultaneously. When two
            routes match the path and have the same `regex_priority`, the older
            one (lowest `created_at`) is used. Note that the priority for
            non-regex routes is different (longer non-regex routes are matched
            before shorter ones).
          type: integer
          default: 0
        request_buffering:
          description: Whether to enable request body buffering or not. With HTTP 1.1, it
            may make sense to turn this off on services that receive data with
            chunked transfer encoding.
          type: boolean
          default: true
        response_buffering:
          description: Whether to enable response body buffering or not. With HTTP 1.1, it
            may make sense to turn this off on services that send data with
            chunked transfer encoding.
          type: boolean
          default: true
        service:
          description: The service this route is associated to. This is where the route
            proxies traffic to.
          type: object
          additionalProperties: false
          properties:
            id:
              type: string
        snis:
          description: A list of SNIs that match this route when using stream routing.
          type: array
          items:
            type: string
        sources:
          description: A list of IP sources of incoming connections that match this route
            when using stream routing. Each entry is an object with fields ip
            (optionally in CIDR range notation) and/or port.
          type: array
          items:
            type: object
            properties:
              ip:
                type: string
              port:
                type: integer
            example:
              ip: 10.1.0.0/16
              port: 1234
        strip_path:
          description: When matching a route via one of the `paths`, strip the matching
            prefix from the upstream request URL.
          type: boolean
          default: true
        tags:
          description: An optional set of strings associated with the route for grouping
            and filtering.
          type: array
          items:
            type: string
      additionalProperties: false
    AIGatewayRedisCloudConfiguration:
      description: Config for connecting to a Cloud Provider's Redis instance.
      type: object
      properties:
        cloud_authentication:
          description: Auth related config for connecting to a Cloud Provider's Redis
            instance.
          discriminator:
            propertyName: type
            mapping:
              aws: "#/components/schemas/AIGatewayRedisAWSAuthentication"
              azure: "#/components/schemas/AIGatewayRedisAzureAuthentication"
              gcp: "#/components/schemas/AIGatewayRedisGCPAuthentication"
          oneOf:
            - $ref: "#/components/schemas/AIGatewayRedisAWSAuthentication"
            - $ref: "#/components/schemas/AIGatewayRedisAzureAuthentication"
            - $ref: "#/components/schemas/AIGatewayRedisGCPAuthentication"
        cluster:
          description: Cluster configuration for the Redis connection.
          type: object
          additionalProperties: false
          properties:
            max_redirections:
              description: Maximum retry attempts for redirection.
              type: integer
              default: 5
            nodes:
              description: Cluster addresses to use for Redis connections when the `redis`
                strategy is defined. Defining this field implies using a Redis
                Cluster. The minimum length of the array is 1 element.
              type: array
              items:
                type: object
                properties:
                  ip:
                    description: A string representing a host name, such as example.com.
                    type: string
                    default: 127.0.0.1
                  port:
                    description: An integer representing a port number between 0 and 65535,
                      inclusive.
                    type: integer
                    default: 6379
                    maximum: 65535
                    minimum: 0
              minItems: 1
        connect_timeout:
          description: An integer representing a timeout in milliseconds. Must be between
            0 and 2^31-2.
          type: integer
          default: 2000
          maximum: 2147483646
          minimum: 0
        connection_is_proxied:
          description: If the connection to Redis is proxied (e.g. Envoy), set it `true`.
            Set the `host` and `port` to point to the proxy address.
          type: boolean
          default: false
        database:
          description: Database to use for the Redis connection when using the `redis`
            strategy
          type: integer
          default: 0
        host:
          description: |-
            A string representing a host name, such as example.com. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          default: 127.0.0.1
          x-referenceable: true
        keepalive:
          description: Keepalive configuration for the Redis connection.
          type: object
          additionalProperties: false
          properties:
            backlog:
              description: Limits the total number of opened connections for a pool. If the
                connection pool is full, connection queues above the limit go
                into the backlog queue. If the backlog queue is full, subsequent
                connect operations fail and return `nil`. Queued operations
                (subject to set timeouts) resume once the number of connections
                in the pool is less than `pool_size`. If latency is high or
                throughput is low, try increasing this value. Empirically, this
                value is larger than `pool_size`.
              type: integer
              maximum: 2147483646
              minimum: 0
            pool_size:
              description: The size limit for every cosocket connection pool associated with
                every remote server, per worker process. If neither `pool_size`
                nor `backlog` is specified, no pool is created. If `pool_size`
                isn't specified but `backlog` is specified, then the pool uses
                the default value. Try to increase (e.g. 512) this value if
                latency is high or throughput is low.
              type: integer
              default: 256
              maximum: 2147483646
              minimum: 1
        password:
          description: |-
            Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        port:
          description: |-
            An integer representing a port number between 0 and 65535, inclusive. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: integer
          default: 6379
          maximum: 65535
          minimum: 0
          x-referenceable: true
        read_timeout:
          description: An integer representing a timeout in milliseconds. Must be between
            0 and 2^31-2.
          type: integer
          default: 2000
          maximum: 2147483646
          minimum: 0
        send_timeout:
          description: An integer representing a timeout in milliseconds. Must be between
            0 and 2^31-2.
          type: integer
          default: 2000
          maximum: 2147483646
          minimum: 0
        sentinel:
          description: Configuration for Redis Sentinel.
          type: object
          additionalProperties: false
          properties:
            master:
              description: Sentinel master to use for Redis connections. Defining this value
                implies using Redis Sentinel.
              type: string
            nodes:
              description: Sentinel node addresses to use for Redis connections when the
                `redis` strategy is defined. Defining this field implies using a
                Redis Sentinel. The minimum length of the array is 1 element.
              type: array
              items:
                type: object
                properties:
                  host:
                    description: A string representing a host name, such as example.com.
                    type: string
                    default: 127.0.0.1
                  port:
                    description: An integer representing a port number between 0 and 65535,
                      inclusive.
                    type: integer
                    default: 6379
                    maximum: 65535
                    minimum: 0
              minItems: 1
            password:
              description: |-
                Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels. 
                This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
                This field is [encrypted](/gateway/keyring/).
              type: string
              x-encrypted: true
              x-referenceable: true
            role:
              description: Sentinel role to use for Redis connections when the `redis`
                strategy is defined. Defining this value implies using Redis
                Sentinel.
              type: string
              enum:
                - any
                - master
                - slave
            username:
              description: |-
                Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+. 
                This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
              type: string
              x-referenceable: true
        server_name:
          description: |-
            A string representing an SNI (server name indication) value for TLS. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          x-referenceable: true
        ssl:
          description: If set to true, uses SSL to connect to Redis.
          type: boolean
          default: false
        ssl_verify:
          description: If set to true, verifies the validity of the server SSL
            certificate. If setting this parameter, also configure
            `lua_ssl_trusted_certificate` in `kong.conf` to specify the CA (or
            server) certificate used by your Redis server. You may also need to
            configure `lua_ssl_verify_depth` accordingly.
          type: boolean
          default: true
        username:
          description: |-
            Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          x-referenceable: true
      additionalProperties: false
    AIGatewayRedisAWSAuthentication:
      description: AWS specific configs for connecting to a Cloud Provider's redis instance.
      type: object
      properties:
        type:
          type: string
          enum:
            - aws
        access_key_id:
          description: |-
            AWS Access Key ID to be used for authentication. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        assume_role_arn:
          description: |-
            The ARN of the IAM role to assume for generating ElastiCache IAM authentication tokens. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        cache_name:
          description: |-
            The name of the AWS Elasticache cluster. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          x-referenceable: true
        is_serverless:
          description: This flag specifies whether the cluster is serverless.
          type: boolean
          default: true
        region:
          description: |-
            The region of the AWS ElastiCache cluster. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault).
          type: string
          x-referenceable: true
        role_session_name:
          description: |-
            The session name for the temporary credentials when assuming the IAM role. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        secret_access_key:
          description: |-
            AWS Secret Access Key. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
      additionalProperties: false
      required:
        - type
    AIGatewayRedisAzureAuthentication:
      description: Azure specific configs for connecting to a Cloud Provider's redis
        instance.
      type: object
      properties:
        type:
          type: string
          enum:
            - azure
        client_id:
          description: |-
            Azure Client ID. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        secret:
          description: |-
            Azure Client Secret. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
        tenant_id:
          description: |-
            Azure Tenant ID. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
      additionalProperties: false
      required:
        - type
    AIGatewayRedisGCPAuthentication:
      description: GCP specific configs for connecting to a Cloud Provider's redis instance.
      type: object
      properties:
        type:
          type: string
          enum:
            - gcp
        service_account_json:
          description: |-
            GCP Service Account JSON. 
            This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
            This field is [encrypted](/gateway/keyring/).
          type: string
          x-encrypted: true
          x-referenceable: true
      additionalProperties: false
      required:
        - type
    AIGatewayMCPServerConfig:
      description: Routing, logging, and server configuration for the MCP Server.
      type: object
      properties:
        route:
          $ref: "#/components/schemas/AIGatewayRouteConfig"
        logging:
          description: Configuration for AI Gateway logging.
          type: object
          additionalProperties: false
          properties:
            payloads:
              type: boolean
              default: false
            statistics:
              type: boolean
              default: false
            audits:
              type: boolean
              default: false
          required:
            - payloads
            - statistics
            - audits
        max_request_body_size:
          type: integer
          default: 1048576
        server:
          type: object
          additionalProperties: false
          properties:
            forward_client_headers:
              description: Whether to forward the client request headers to the upstream
                server when calling the tools.
              type: boolean
              default: true
            session:
              description: Enable managed session when Kong responds as MCP server in listener
                or conversion-listener modes. This doesn't affect the
                passthrough-listener mode as the state in that mode is
                maintained by the upstream MCP servers.
              type: object
              additionalProperties: false
              properties:
                client:
                  description: The configuration for client-side session storage.
                  type: object
                  additionalProperties: false
                  properties:
                    secrets:
                      description: The secrets that are used in session encryption. Required when the
                        strategy is 'client'. The first secret is used for
                        encryption, while all secrets are used for decryption to
                        support key rotation.
                      type: array
                      items:
                        type: string
                        minLength: 8
                        x-encrypted: true
                        x-referenceable: true
                        description: |-
                          
                          This field is [referenceable](/gateway/entities/vault/#how-do-i-reference-secrets-stored-in-a-vault). 
                          This field is [encrypted](/gateway/keyring/).
                      minItems: 1
                managed:
                  description: If enabled, Kong will maintain managed sessions with the MCP
                    server.
                  type: boolean
                  default: true
                redis:
                  $ref: "#/components/schemas/AIGatewayRedisCloudConfiguration"
                session_ttl:
                  description: The time-to-live (TTL) for each session in seconds.
                  type: integer
                  default: 86400
                strategy:
                  description: The strategy for the session. If the value is 'client', the session
                    is encrypted into MCP session id assigned to the client. If
                    the value is not 'client', the session is stored in the
                    configured database.
                  type: string
                  enum:
                    - client
                    - redis
            tag:
              description: The tag of the MCP server. This is used to filter the exported MCP
                tools. The field should contain exactly one tag.
              type: string
            timeout:
              description: The timeout for calling the tools in milliseconds.
              type: integer
              default: 10000
      additionalProperties: false
```
