Connect to SubImage via Model Context Protocol (MCP)
SubImage's HTTP MCP server connects AI assistants like Claude Code and Codex CLI to your security data with OAuth authentication.
SubImage HTTP MCP Server
The SubImage HTTP MCP server provides AI assistants with secure access to SubImage's full API, including findings, rules, inventory, and graph queries. It uses the same authentication and authorization as the web application.
Features
- Full API Access: Query findings, rules, inventory, and infrastructure graph
- Role-Based Access Control: Respects your organization's member/operator/admin roles
- OAuth Authentication: Uses WorkOS AuthKit for secure single sign-on
- M2M Token Support: Automate workflows with machine-to-machine tokens
MCP Server URL
Your tenant-scoped SubImage MCP server is available at:
<MCP_URL>Prefer this direct tenant endpoint when configuring an MCP client. Marketplace
integrations may use https://app.subimage.io/mcp, which resolves the tenant
from the authenticated WorkOS organization.
Authentication Methods
SubImage MCP supports two authentication methods:
A. OAuth Authentication (For Interactive Use)
OAuth authentication uses your SubImage login credentials and respects your organization membership and role (member, operator, or admin).
Setup for Claude Code:
claude mcp add --transport http subimage <MCP_URL>Setup for Codex CLI:
codex mcp add subimage --url <MCP_URL>When you first use the MCP server, you'll be prompted to authenticate via your web browser. The CLI will open your browser to complete the OAuth flow.
B. M2M Token Authentication (For Automation)
Machine-to-machine (M2M) tokens are ideal for automation, CI/CD pipelines, or non-interactive workflows. M2M tokens can be scoped to specific roles (member, operator, admin).
Please see the M2M Authentication documentation for more information: M2M Authentication
M2M Token Best Practices:
- Use member role tokens for read-only automation
- Use operator role tokens for rule management workflows
- Rotate tokens regularly from the API Keys page
- Store tokens securely (e.g., environment variables, secret managers)
- Never commit tokens to version control
Available Tools
Once connected, your AI assistant has access to the following tools:
Security Findings & Compliance
| Tool | Description |
|---|---|
subimageListRules |
List rule summaries with findings counts, or full tenant-authored definitions with view="custom_definitions" |
subimageCreateCustomRule |
Create a custom Cypher-based rule (operator role or above) |
subimageGetRuleFindings |
Get detailed findings for a specific rule including affected resources |
subimageListFrameworks |
List compliance frameworks (CIS AWS, CIS GCP, etc.) with enabled status |
subimageGetFrameworkHistory |
Get compliance history snapshots showing score trends over time |
Vulnerability Management
| Tool | Description |
|---|---|
subimageListVulnerabilities |
List CVEs with severity, CVSS score, and CISA KEV status; supports filtering and sorting |
subimageGetVulnerabilitySummary |
Get total count and breakdown by severity level |
subimageGetVulnerabilityDetails |
Get full CVE details including affected resources, packages, and images |
subimageListVulnerabilityActionItems |
List remediation action items, one per affected service image, with summary fix text and CVE, package, and image counts |
subimageGetVulnerabilityActionItem |
Get one action item's full remediation plan (keyed by its service image): ordered fix steps, affected CVEs, packages, and impacted images |
subimageListPackages |
List software packages discovered across your images |
subimageGetPackageSummary |
Get counts of packages and how many carry vulnerabilities |
subimageGetPackageDetails |
Get package-level details for one package, including the images and containers that ship it |
Attack Path Discovery
| Tool | Description |
|---|---|
subimageListAttackPaths |
List all discovered attack paths sorted by criticality |
subimageGetAttackPathDetails |
Get step-by-step details of an attack chain with impacted resources |
subimageGetAttackPathsFromAsset |
Find attack paths involving a specific asset (e.g., an EC2 instance or S3 bucket) |
subimageGetScenarioCapabilities |
Get valid attacker capabilities for a node type (for what-if scenarios) |
subimageCreateAttackPathScenario |
Create a what-if scenario to simulate attacker capabilities on resources |
Issues
| Tool | Description |
|---|---|
subimageListIssues |
List issues in the queue with priority, state, and owners |
subimageGetIssue |
Get full detail for one issue: signals, triage vector, action items, and timeline |
subimageUpdateIssue |
Assign or replace issue owners, or snooze an issue until a date or indefinitely |
Cloud Inventory
| Tool | Description |
|---|---|
subimageEnrichIp |
Resolve ownership and context for a public IP or domain across your cloud resources |
Listing, counting, and filtering resources runs through subimageRunCypher: each
resource type is one ontology label in the graph. Load the inventory-via-cypher
skill and it maps the type you asked for to its label and query shape. Because it
reads the graph directly, it covers any resource type present, not a fixed list.
Graph Query & Schema
| Tool | Description |
|---|---|
subimageListModules |
List all data source modules (AWS, GCP, GitHub, etc.) with sync status |
subimageListModuleSchemaNodes |
List node types from a module's schema with descriptions |
subimageGetNodesSchema |
Get complete schema (properties, relationships, supporting modules, parallel labels) for one or more labels (resolves ontology aliases) |
subimageRunCypher |
Execute read-only Cypher queries against the Neo4j graph database |
Example Usage
Here are example prompts you can use with your AI assistant once connected to SubImage:
Security Posture
- "Show me all security rules that have findings"
- "Which rules are currently disabled and why?"
- "List the top 10 rules with the most findings"
- "What custom rules has my team created?"
Vulnerability Management
- "List all critical CVEs affecting my infrastructure"
- "Show me CVEs with known exploits (CISA KEV)"
- "What packages can I update to fix the most vulnerabilities?"
- "Give me details on CVE-2024-3094: what resources are affected?"
- "How many vulnerabilities can be fixed by updating base images?"
Attack Path Analysis
- "What attack paths exist in my environment?"
- "Show me the details of the most critical attack path"
- "Are there any attack paths involving my S3 buckets?"
- "What would happen if an attacker gained access to my production EC2 instances?"
- "Run a what-if scenario: what if someone compromised our public-facing load balancer?"
Cloud Inventory
- "List all my containers and their health status"
- "Show me all public S3 buckets"
- "Which compute instances are running in us-east-1?"
- "List all service accounts across all providers"
- "Show me certificates expiring soon"
- "Find users without MFA enabled"
Compliance
- "Which compliance frameworks are enabled for my organization?"
- "Show me the CIS AWS compliance score trend over the last 30 days"
- "How has our compliance posture improved this quarter?"
Graph Queries
- "How many EC2 instances are exposed to the internet?"
- "List all AWS accounts in the graph"
- "Find all RDS instances that are not encrypted"
- "Show me the schema for GCP node types"
- "What data sources are configured and when did they last sync?"
Setup Guides by Client
Below are instructions for configuring the SubImage MCP server in popular AI tools. In all cases, your MCP server URL is:
<MCP_URL>Claude Code
Run this command in your terminal:
claude mcp add --transport http subimage <MCP_URL>Then launch Claude Code with claude. You'll be prompted to authenticate via your browser on first use.
Claude Desktop / Claude.ai
The SubImage MCP server uses Streamable HTTP transport. In Claude Desktop and Claude.ai, remote Streamable HTTP servers are configured as Custom Connectors. claude_desktop_config.json is stdio-only and won't work for this server.
Only the org Owner can add custom connectors to the org catalog. Once added, each member connects their own account.
- As the Owner, go to Organization Settings > Connectors
- Click Add custom connector
- Set the Name to
SubImage - Set the Remote MCP server URL to
<MCP_URL> - Members then go to Settings > Connectors, find SubImage, and click Connect to authenticate
Only users who have been added to your SubImage tenant on the Team settings page can authenticate; the connector signs in with your SubImage account, so members without one will be blocked at the OAuth step.
Cursor
- Open Cursor > Settings > Cursor Settings > Tools & MCPs
- Click New MCP Server. Your
.cursor/mcp.jsonshould open. Enter:
{
"mcpServers": {
"subimage": {
"type": "streamableHttp",
"url": "<MCP_URL>"
}
}
}- The
subimageMCP server should be listed. ClickConnectto authenticate.
VS Code / GitHub Copilot
- Open the Command Palette (
Cmd+Shift+Pon macOS,Ctrl+Shift+Pon Windows/Linux) - Select MCP: Add Server
- Choose HTTP
- Enter the URL:
<MCP_URL> - Name it
subimage
Codex CLI
Run this command in your terminal:
codex mcp add subimage --url <MCP_URL>Then launch Codex with codex. You'll be prompted to authenticate via your browser on first use.
Windsurf
- Open Cascade (
Cmd + L) - Click Configure MCP
- Add a new server with the URL:
<MCP_URL>
Warp
- Go to Settings > MCP Servers
- Click + Add
- Select Streamable HTTP
- Enter the following configuration:
{
"subimage": {
"type": "streamableHttp",
"url": "<MCP_URL>"
}
}Other Clients
For any MCP-compatible client not listed above, use the following connection details:
- URL:
<MCP_URL> - Transport: Streamable HTTP
- Authentication: OAuth (your browser will open to authenticate)