AI Gateway MCP Servers

Create an MCP Server

Changed on

Registers a new MCP Server for the AI Gateway.

post/v1/ai-gateways/{gatewayId}/mcp-servers

Request

  • Base URL: https://global.api.konghq.com
  • URL: https://global.api.konghq.com/v1/ai-gateways/{gatewayId}/mcp-servers
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Request body

OR
OR
OR
OR

Example request

{
  "config": {
    "route": {
      "headers": {
        "version": [
          "v1",
          "v2"
        ]
      },
      "hosts": [
        "foo.example.com"
      ]
    },
    "url": "https://mcp.internal.kongair.com",
    "upstream": {
      "auth": {
        "type": "aws",
        "region": "us-east-1",
        "access_key_id": "AKIAIOSFODNN7EXAMPLE"
      }
    }
  },
  "tools": [
    {
      "access": {
        "acls": {
          "allow": [
            "gold-partner"
          ],
          "deny": [
            "bronze-partner"
          ]
        }
      },
      "description": "Search for available flights",
      "parameters": [
        {
          "name": "origin",
          "in": "query",
          "description": "The origin airport code.",
          "required": true
        }
      ]
    }
  ],
  "display_name": "Kong Air Flights",
  "name": "my-entity-name",
  "enabled": true,
  "labels": {
    "category": "finance"
  },
  "managed_by": {
    "owner": "terraform"
  }
}

Response

MCP Server created successfully.

OR
OR
OR
OR

Example response

{
  "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z",
  "config": {
    "route": {
      "headers": {
        "version": [
          "v1",
          "v2"
        ]
      },
      "hosts": [
        "foo.example.com"
      ]
    },
    "url": "https://mcp.internal.kongair.com",
    "upstream": {
      "auth": {
        "type": "aws",
        "region": "us-east-1",
        "access_key_id": "AKIAIOSFODNN7EXAMPLE"
      }
    }
  },
  "tools": [
    {
      "access": {
        "acls": {
          "allow": [
            "gold-partner"
          ],
          "deny": [
            "bronze-partner"
          ]
        }
      },
      "description": "Search for available flights",
      "parameters": [
        {
          "name": "origin",
          "in": "query",
          "description": "The origin airport code.",
          "required": true
        }
      ]
    }
  ],
  "display_name": "Kong Air Flights",
  "name": "my-entity-name",
  "enabled": true,
  "labels": {
    "category": "finance"
  },
  "managed_by": {
    "owner": "terraform"
  }
}

Changes

    • breaking

      added to the / response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the ////// response property for the response status

    • warning

      added the new unique enum value to the ////// response property for the response status

    • breaking

      the ////// request property's minLength was increased from 0 to 1

    • breaking

      the ////// request property's minLength was increased from 0 to 1

    • breaking

      the ////// request property's minLength was increased from 0 to 1

    • breaking

      the ////// request property's minLength was increased from 0 to 1

    • breaking

      the ////// request property's minLength was increased from 0 to 1

    • breaking

      the ////// request property's minLength was increased from 0 to 1

    • breaking

      added the pattern ^[A-Za-z0-9._-]+$ to the request property //////

    • breaking

      added the pattern ^[A-Za-z0-9._-]+$ to the request property //////

    • breaking

      added the pattern ^[A-Za-z0-9._-]+$ to the request property //////

    • warning

      the ////// request property's maxLength was set to 128

    • warning

      the ////// request property's maxLength was set to 128

    • warning

      the ////// request property's maxLength was set to 128

    • info

      the /// response's property pattern ^[A-Za-z0-9._-]+$ was added for the status

    • info

      the /// response's property pattern ^[A-Za-z0-9._-]+$ was added for the status

    • info

      the /// response's property pattern ^[A-Za-z0-9._-]+$ was added for the status