{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Creates a new MCP portal for managing AI tool access through Cloudflare Access.","properties":{"path":{"type":"object","properties":{"account_id":{"type":"string","examples":["a86a8f5c339544d7bdc89926de14fb8c"]}},"required":["account_id"],"additionalProperties":false},"body":{"type":"object","properties":{"allow_code_mode":{"description":"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400.","type":"boolean","examples":[true]},"code_mode":{"description":"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.","type":"string","enum":["off","opt_in","default_on","enforced"],"examples":["opt_in"]},"description":{"description":"Optional description of the MCP portal.","type":"string","maxLength":512,"examples":["This is my custom MCP Portal"]},"hostname":{"description":"Hostname where the MCP portal is available.","type":"string","pattern":"^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$","examples":["example.com"]},"id":{"description":"Unique identifier for the MCP portal.","type":"string","maxLength":32,"minLength":1,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$","examples":["my-mcp-portal"]},"name":{"description":"Display name for the MCP portal.","type":"string","maxLength":350,"examples":["My MCP Portal"]},"secure_web_gateway":{"description":"Route outbound MCP traffic through Zero Trust Secure Web Gateway.","type":"boolean","default":false,"examples":[false]},"servers":{"description":"MCP servers attached to the portal and their portal-specific settings.","type":"array","items":{"properties":{"default_disabled":{"description":"Hide this server's tools and prompts by default. To expose specific capabilities, set enabled: true for them in this server entry's updated_tools or updated_prompts fields when creating or updating the portal.","type":"boolean"},"on_behalf":{"description":"Use end-user OAuth credentials when connecting this server to the portal.","type":"boolean"},"server_id":{"description":"Unique identifier for the MCP server.","type":"string","maxLength":32,"minLength":1,"pattern":"^[a-z0-9_]+(?:-[a-z0-9_]+)*$","examples":["my-mcp-server"]},"updated_prompts":{"description":"Portal-specific prompt overrides.","type":"array","items":{"properties":{"alias":{"description":"Custom name exposed for the capability.","type":"string","maxLength":40,"pattern":"^[a-zA-Z0-9]+([_-][a-zA-Z0-9]+)*$","examples":["my-custom-alias"]},"description":{"description":"Custom description exposed for the capability.","type":"string"},"enabled":{"description":"Whether the capability is available through the MCP server.","type":"boolean"},"name":{"description":"Name of the tool or prompt capability to override.","type":"string"}},"required":["name"],"type":"object"}},"updated_tools":{"description":"Portal-specific tool overrides.","type":"array","items":{"properties":{"alias":{"description":"Custom name exposed for the capability.","type":"string","maxLength":40,"pattern":"^[a-zA-Z0-9]+([_-][a-zA-Z0-9]+)*$","examples":["my-custom-alias"]},"description":{"description":"Custom description exposed for the capability.","type":"string"},"enabled":{"description":"Whether the capability is available through the MCP server.","type":"boolean"},"name":{"description":"Name of the tool or prompt capability to override.","type":"string"}},"required":["name"],"type":"object"}}},"required":["server_id"],"type":"object"},"maxItems":80}},"required":["id","name","hostname"]}},"required":["path"],"additionalProperties":false},"name":"Create a new MCP Portal","id":"cloudflare.mcp-portals-api-create-portals","example":{"path":{"account_id":"a86a8f5c339544d7bdc89926de14fb8c"}},"maxRequests":1,"summary":false}}