How Cortex Code connects to a partner's remote MCP server and how Skills layer domain expertise on top of MCP tool access for powerful integrations.
Connects Cortex Code to the partner's remote server at runtime.
Bearer, API keys) or OAuth~/.snowflake/cortex/mcp.jsonmcp__<server>__<tool>Guides how and when the agent uses those tools.
$skill-name or auto-triggered$skill-development
%%{init: {
'theme': 'base',
'themeVariables': {
'primaryColor': '#E8F7FC',
'primaryTextColor': '#0D2B3E',
'primaryBorderColor': '#29B5E8',
'secondaryColor': '#F4FBFE',
'tertiaryColor': '#EEF2F5',
'lineColor': '#29B5E8',
'textColor': '#1A2530',
'fontSize': '13px'
},
'flowchart': { 'nodeSpacing': 40, 'rankSpacing': 60, 'padding': 20 }
}}%%
flowchart LR
DEV["Developer"]
subgraph HOST["Cortex Code"]
direction TB
SKILL["Skill: $partner-sync"]
AGENT["AI Agent"]
CLIENT["MCP Client"]
SKILL -.- AGENT
AGENT --> CLIENT
end
subgraph REMOTE["MCP Server"]
direction TB
TOOLS["Tools"]
end
subgraph BACKEND["Backend"]
direction TB
API["REST APIs"]
DB["Databases"]
SVC["Services"]
end
DEV -->|"prompt"| SKILL
CLIENT <-->|"JSON-RPC over HTTPS"| TOOLS
TOOLS --> API
TOOLS --> DB
TOOLS --> SVC
AGENT -->|"response"| DEV
style DEV fill:#29B5E8,stroke:#11567F,color:#FFFFFF
style HOST fill:#0D2B3E,stroke:#29B5E8,color:#FFFFFF
style SKILL fill:#7254A3,stroke:#9B8EC4,color:#FFFFFF
style AGENT fill:#11567F,stroke:#29B5E8,color:#FFFFFF
style CLIENT fill:#1B6D9C,stroke:#29B5E8,color:#FFFFFF
style REMOTE fill:#E8F7FC,stroke:#29B5E8,color:#0D2B3E
style TOOLS fill:#FFFFFF,stroke:#29B5E8,color:#0D2B3E
style BACKEND fill:#FFF8F0,stroke:#FF9F36,color:#0D2B3E
style API fill:#FFFFFF,stroke:#FF9F36,color:#2D3842
style DB fill:#FFFFFF,stroke:#FF9F36,color:#2D3842
style SVC fill:#FFFFFF,stroke:#FF9F36,color:#2D3842
$partner-sync skill, Cortex Code follows the skill's workflow to discover, validate, and invoke the partner's MCP tools in sequence. The skill provides the guardrails; MCP provides the transport.
%%{init: {
'theme': 'base',
'themeVariables': {
'actorBkg': '#11567F',
'actorTextColor': '#FFFFFF',
'actorBorder': '#29B5E8',
'activationBkgColor': '#E8F7FC',
'activationBorderColor': '#29B5E8',
'signalColor': '#0D2B3E',
'signalTextColor': '#0D2B3E',
'noteBkgColor': '#FFF8F0',
'noteTextColor': '#0D2B3E',
'noteBorderColor': '#FF9F36',
'sequenceNumberColor': '#FFFFFF',
'fontSize': '13px'
},
'sequence': { 'mirrorActors': false, 'messageMargin': 35 }
}}%%
sequenceDiagram
participant Dev as Developer
participant CoCo as Cortex Code
participant MCP as Partner MCP Server
participant API as Partner Backend
Dev->>CoCo: "$partner-sync orders to analytics"
activate CoCo
Note over CoCo: Skill loaded: workflow begins
Note over CoCo,MCP: Step 1 — Discover datasets
CoCo->>MCP: tools/call("list_datasets")
MCP->>API: GET /datasets
API-->>MCP: [{id: "ds_17", name: "analytics"}, ...]
MCP-->>CoCo: datasets list
Note over CoCo,MCP: Step 2 — Validate schema
CoCo->>MCP: tools/call("validate_schema", {source, target})
MCP->>API: POST /validate
API-->>MCP: {compatible: true, warnings: []}
MCP-->>CoCo: schema validated
CoCo-->>Dev: "Schema compatible. Push 12,450 rows?"
Note over Dev,CoCo: Stopping point — user approval
Dev->>CoCo: "Yes, go ahead"
Note over CoCo,MCP: Step 3 — Push data
CoCo->>MCP: tools/call("push_data", {source, target})
MCP->>API: POST /sync
API-->>MCP: {rows: 12450, status: "complete"}
MCP-->>CoCo: sync result
CoCo-->>Dev: "Synced 12,450 rows to analytics dataset"
deactivate CoCo
The quickest way to connect. The cortex mcp add command registers the remote server and writes the configuration to ~/.snowflake/cortex/mcp.json.
Tools become available as mcp__partner-analytics__<tool_name> in Cortex Code. Use ${VAR} syntax for secrets so they expand from your environment at runtime.
For repeatable setup or when configuring multiple servers, edit the config file directly. Environment variable expansion (${VAR}) keeps secrets out of the file.
You can also use OAuth for authentication. The headers field supports any standard HTTP header, including OAuth Bearer tokens obtained from your identity provider. Use ${VAR} syntax so secrets expand from your environment at runtime.
Restart Cortex Code or use /mcp to reload after editing.
$skill-development best practices: name and description in frontmatter (description includes trigger keywords), structured workflow with goals and actions per step, mandatory stopping points before destructive operations, and an output section.