MCP Server
Overviewβ
The StackGuardian MCP Server connects AI tools directly to the StackGuardian Platform. This gives AI agents, assistants, and chatbots the ability to query workflows, retrieve stack information, and analyze deployments through natural language.
Built for platform engineers and developers who want AI-powered assistance for their StackGuardian operations.
The StackGuardian MCP Server works well with all AI models. However, premium models deliver exceptional results with minimal prompting. Free and entry-level models perform reliably for standard queries and may simply need slightly more detailed instructions for complex tasks.
What you can doβ
- Workflow management: View workflow runs, check execution status, and fetch logs for troubleshooting.
- Stack operations: Query stack information, check deployment status, and retrieve configuration details.
- Infrastructure insights: Monitor deployment runs, analyze failures, and get comprehensive visibility into your infrastructure state.
- Organization intelligence: Access organization settings, retrieve connectors, and understand team structure.
Prerequisitesβ
Before you begin:
- A StackGuardian account with API access
- A compatible MCP host application
- The following configuration parameters:
- API Token (SG_API_TOKEN): Your StackGuardian API key
- Organization name (SG_ORG): Your StackGuardian organization identifier
The API key inherits permissions from your user role. Ensure you have the necessary access rights for the operations you want to perform.
Installationβ
All installation methods require the same three configuration parameters. Replace these placeholder values with your actual credentials:
SG_API_TOKEN: Your StackGuardian API tokenSG_ORG: Your organization name
ChatGPT
Prerequisites
- ChatGPT Plus, Pro, Team, or Enterprise subscription
- Your StackGuardian API token (
SG_API_TOKEN) - Your StackGuardian organization name (
SG_ORG)
Installation
Step 1: Enable developer mode
- Log in to ChatGPT
- Click your profile icon (bottom-left) > Settings
- Go to Apps & Connectors
- Scroll to Advanced settings and toggle on Developer mode
Step 2: Create the connector
- In Apps & Connectors, click Create App
- Configure:
- Name:
StackGuardian - Description: (Optional)
- MCP Server URL:
- For EU Region:
https://api.app.stackguardian.io/mcp?SG_API_TOKEN=<YOUR_TOKEN>&SG_ORG=<YOUR_ORG> - For US Region:
https://api.us.stackguardian.io/mcp?SG_API_TOKEN=<YOUR_TOKEN>&SG_ORG=<YOUR_ORG>
- For EU Region:
- Authentication: None
- Name:
- Check I trust this application
- Click Create

Integration with ChatGPT
Codex CLI
Add this configuration to your Codex CLI MCP settings:
[mcp_servers.StackGuardian]
command = "npx"
args = [
"-y",
"mcp-remote",
"https://api.app.stackguardian.io/mcp",
"--header",
"SG_API_TOKEN: <YOUR_TOKEN>",
"--header",
"SG_ORG: <YOUR_ORG>",
]
startup_timeout_sec = 60
tool_timeout_sec = 120
For US Region, use https://api.us.stackguardian.io/mcp as URL.
GPT Codex connects to MCP servers through commands rather than direct URLs, which requires npx. Ensure Node.js and npm are installed on your system.
Claude Code
After installing Claude Code, run this command in your terminal to add the StackGuardian MCP server:
claude mcp add --transport http StackGuardian https://api.app.stackguardian.io/mcp \
--header "SG_API_TOKEN: <YOUR_TOKEN>" \
--header "SG_ORG: <YOUR_ORG>"
For US Region, use https://api.us.stackguardian.io/mcp as URL.
Claude Web/Desktop
Connect your StackGuardian tools to Claude (Web or Desktop) using the MCP.
Prerequisites
- Claude Pro, Team, or Enterprise account
- Your StackGuardian API token (
SG_API_TOKEN) - Your StackGuardian organization name (
SG_ORG)
Installation
Step 1: Enable developer mode
- Open Claude.ai or Claude Desktop
- Click your profile icon (bottom-left) > Settings
- Select the Developer tab
- Developer features activate automatically
Step 2: Add the connector
- In Settings, go to Connectors
- Click Add custom connector
- Configure:
- Name:
StackGuardian MCP - Remote URL:
- For EU Region:
https://api.app.stackguardian.io/mcp?SG_API_TOKEN=<YOUR_TOKEN>&SG_ORG=<YOUR_ORG> - For US Region:
https://api.us.stackguardian.io/mcp?SG_API_TOKEN=<YOUR_TOKEN>&SG_ORG=<YOUR_ORG>
- For EU Region:
- Name:
- Click Add

Integration with Claude Web/Desktop
Gemini CLI
After installing Gemini CLI, run this command in your terminal to add the StackGuardian MCP server:
gemini mcp add StackGuardian https://api.app.stackguardian.io/mcp \
--transport http \
--header "SG_API_TOKEN: <YOUR_TOKEN>" \
--header "SG_ORG: <YOUR_ORG>" --scope user
For US Region, use https://api.us.stackguardian.io/mcp as URL.
VSCode Copilot
Integrate StackGuardian into VSCode with GitHub Copilot Chat using the Model Context Protocol (MCP).
Prerequisites
- VS Code
1.99or later - GitHub Copilot extension (any plan, including free)
- Your StackGuardian API token (
SG_API_TOKEN) - Your StackGuardian organization name (
SG_ORG)
Installation
Step 1: Configure the MCP server
Create .vscode/mcp.json in your project root, or run MCP: Open User Configuration from the Command Palette for a global config:
{
"servers": {
"stackguardian": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.app.stackguardian.io/mcp?SG_API_TOKEN=<YOUR_TOKEN>&SG_ORG=<YOUR_ORG>"
]
}
}
}
For the US region, use https://api.us.stackguardian.io/mcp?SG_API_TOKEN=<YOUR_TOKEN>&SG_ORG=<YOUR_ORG> as the URL.
Step 2: Start the MCP server
A Start button will appear at the top of the mcp.json file after saving. Click it to start the server and discover available tools.

Start the MCP server
Step 3: Access via Copilot Chat
- Open Copilot Chat (
Ctrl+Alt+Ion Windows/Linux orCmd+Ctrl+Ion macOS) - Switch to Agent mode from the mode dropdown
- Click the tools icon (π ) to verify StackGuardian tools are listed
MCP tools are only available in Agent mode. They will not appear in Ask or Edit mode.
Use casesβ
- "Why did workflow run #1247 fail? Help me to figure out what happened."
- "What's the status of my latest workflow run?"
- "What's the current status of all stacks in the engineering organization?"
- βWhich workflows are still using template empty-tf-resource revision Revision: 2β
- βHow healthy are the workflows in the mcp-testing workflow group?β
Security and permissionsβ
The MCP server respects the permissions associated with your API key. If your key doesn't have access to certain resources, those operations will fail with a permission error.