Skip to content
Start here

Read details of an MCP Portal

client.ZeroTrust.Access.AIControls.Mcp.Portals.Read(ctx, id, query) (*AccessAIControlMcpPortalReadResponse, error)
GET/accounts/{account_id}/access/ai-controls/mcp/portals/{id}

Read details of an MCP Portal

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
id string

portal id

maxLength32
minLength1
query AccessAIControlMcpPortalReadParams
AccountID param.Field[string]Optional
ReturnsExpand Collapse
type AccessAIControlMcpPortalReadResponse struct{…}
ID string

portal id

maxLength32
minLength1
Hostname string
Name string
maxLength350
Servers []AccessAIControlMcpPortalReadResponseServer
ID string

server id

maxLength32
minLength1
AuthType AccessAIControlMcpPortalReadResponseServersAuthType
One of the following:
const AccessAIControlMcpPortalReadResponseServersAuthTypeOAuth AccessAIControlMcpPortalReadResponseServersAuthType = "oauth"
const AccessAIControlMcpPortalReadResponseServersAuthTypeBearer AccessAIControlMcpPortalReadResponseServersAuthType = "bearer"
const AccessAIControlMcpPortalReadResponseServersAuthTypeUnauthenticated AccessAIControlMcpPortalReadResponseServersAuthType = "unauthenticated"
Hostname string
formaturi
Name string
maxLength350
Prompts []map[string, unknown]
Tools []map[string, unknown]
CreatedAt TimeOptional
formatdate-time
CreatedBy stringOptional
DefaultDisabled boolOptional
Description stringOptional
maxLength512
Error stringOptional
LastSuccessfulSync TimeOptional
formatdate-time
LastSynced TimeOptional
formatdate-time
ModifiedAt TimeOptional
formatdate-time
ModifiedBy stringOptional
OnBehalf boolOptional
Status stringOptional
UpdatedPrompts []AccessAIControlMcpPortalReadResponseServersUpdatedPromptOptional
Name string
Description stringOptional
Enabled boolOptional
PortalAlias stringOptional
ServerAlias stringOptional
UpdatedTools []AccessAIControlMcpPortalReadResponseServersUpdatedToolOptional
Name string
Description stringOptional
Enabled boolOptional
PortalAlias stringOptional
ServerAlias stringOptional
AllowCodeMode boolOptional

Allow remote code execution in Dynamic Workers (beta)

CreatedAt TimeOptional
formatdate-time
CreatedBy stringOptional
Description stringOptional
maxLength512
ModifiedAt TimeOptional
formatdate-time
ModifiedBy stringOptional
SecureWebGateway boolOptional

Route outbound MCP traffic through Zero Trust Secure Web Gateway

Read details of an MCP Portal

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/zero_trust"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.ZeroTrust.Access.AIControls.Mcp.Portals.Read(
    context.TODO(),
    "my-mcp-portal",
    zero_trust.AccessAIControlMcpPortalReadParams{
      AccountID: cloudflare.F("a86a8f5c339544d7bdc89926de14fb8c"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.ID)
}
{
  "result": {
    "id": "my-mcp-portal",
    "hostname": "exmaple.com",
    "name": "My MCP Portal",
    "servers": [
      {
        "id": "my-mcp-server",
        "auth_type": "unauthenticated",
        "hostname": "https://example.com/mcp",
        "name": "My MCP Server",
        "prompts": [
          {
            "foo": "bar"
          }
        ],
        "tools": [
          {
            "foo": "bar"
          }
        ],
        "created_at": "2019-12-27T18:11:19.117Z",
        "created_by": "created_by",
        "default_disabled": true,
        "description": "This is one remote mcp server",
        "error": "error",
        "last_successful_sync": "2019-12-27T18:11:19.117Z",
        "last_synced": "2019-12-27T18:11:19.117Z",
        "modified_at": "2019-12-27T18:11:19.117Z",
        "modified_by": "modified_by",
        "on_behalf": true,
        "status": "status",
        "updated_prompts": [
          {
            "name": "name",
            "description": "description",
            "enabled": true,
            "portal_alias": "portal-tool-alias",
            "server_alias": "server-tool-alias"
          }
        ],
        "updated_tools": [
          {
            "name": "name",
            "description": "description",
            "enabled": true,
            "portal_alias": "portal-tool-alias",
            "server_alias": "server-tool-alias"
          }
        ]
      }
    ],
    "allow_code_mode": true,
    "created_at": "2019-12-27T18:11:19.117Z",
    "created_by": "created_by",
    "description": "This is my custom MCP Portal",
    "modified_at": "2019-12-27T18:11:19.117Z",
    "modified_by": "modified_by",
    "secure_web_gateway": false
  },
  "success": true
}
Returns Examples
{
  "result": {
    "id": "my-mcp-portal",
    "hostname": "exmaple.com",
    "name": "My MCP Portal",
    "servers": [
      {
        "id": "my-mcp-server",
        "auth_type": "unauthenticated",
        "hostname": "https://example.com/mcp",
        "name": "My MCP Server",
        "prompts": [
          {
            "foo": "bar"
          }
        ],
        "tools": [
          {
            "foo": "bar"
          }
        ],
        "created_at": "2019-12-27T18:11:19.117Z",
        "created_by": "created_by",
        "default_disabled": true,
        "description": "This is one remote mcp server",
        "error": "error",
        "last_successful_sync": "2019-12-27T18:11:19.117Z",
        "last_synced": "2019-12-27T18:11:19.117Z",
        "modified_at": "2019-12-27T18:11:19.117Z",
        "modified_by": "modified_by",
        "on_behalf": true,
        "status": "status",
        "updated_prompts": [
          {
            "name": "name",
            "description": "description",
            "enabled": true,
            "portal_alias": "portal-tool-alias",
            "server_alias": "server-tool-alias"
          }
        ],
        "updated_tools": [
          {
            "name": "name",
            "description": "description",
            "enabled": true,
            "portal_alias": "portal-tool-alias",
            "server_alias": "server-tool-alias"
          }
        ]
      }
    ],
    "allow_code_mode": true,
    "created_at": "2019-12-27T18:11:19.117Z",
    "created_by": "created_by",
    "description": "This is my custom MCP Portal",
    "modified_at": "2019-12-27T18:11:19.117Z",
    "modified_by": "modified_by",
    "secure_web_gateway": false
  },
  "success": true
}