Skip to content

Model Context Protocol (MCP)

Overview

The Escape platform supports the Model Context Protocol (MCP), connecting AI assistants to Escape's security platform. MCP provides standardized access to application management, security scanning, and vulnerability analysis directly from your development environment or AI interface.

What Is the Model Context Protocol?

The Model Context Protocol (MCP) is an open standard that connects AI assistants with external tools, services, and data sources.

MCP enables AI assistants to:

  • Access real-time data from external systems
  • Execute operations through standardized APIs
  • Provide context-aware responses based on your specific data
  • Automate complex workflows across multiple services

Escape MCP Server

The Escape MCP server is hosted at https://mcp.escape.tech/mcp and provides authenticated access to the Escape platform through the Public API.

Two authentication flows are supported, both using your Escape API key. Pick the one that matches your client:

  • OAuth 2.1 (recommended for AI assistants and IDEs): your client opens a browser, you click Allow on a consent page hosted on app.escape.tech, and the client receives a bearer token. The server publishes Protected Resource Metadata for discovery. No copy-pasting of API keys.
  • Authorization: Key <api-key> (for CLI, CI, scripts, custom integrations): pass your API key as a static HTTP header. Same path used since day one of the MCP server; unchanged for backward compatibility.

Key Features:

  • Application Management: Create, update, and manage security scan profiles
  • Scan Operations: Initiate scans, monitor status, and retrieve results
  • Domain Management: Manage monitored domains and FQDNs
  • Vulnerability Analysis: Access detailed security findings and recommendations
  • Archive Access: Retrieve scan exchange archives for deep analysis
  • Tool Discovery: list_capabilities lists tools, with optional objective and limit inputs. Call escape_get_tool_spec with the exact tool name to retrieve its full input schema after receiving a compact definition.
  • Documentation Lookup: knowledge_answer_question takes a required question and optional topic and limit to return documentation and platform links.

Authentication Flows

For AI assistants and IDEs that natively implement the MCP 2025-06-18 Authorization spec. The client discovers the OAuth endpoints, opens a browser to https://app.escape.tech/oauth/mcp/authorize, you click Allow, and the client receives a bearer token. You never paste an API key into the client.

Configure your client with the server URL:

{
  "mcpServers": {
    "escape": {
      "type": "http",
      "url": "https://mcp.escape.tech/mcp"
    }
  }
}

On first use the client opens a browser, the consent page reuses your existing app.escape.tech session (or asks you to log in), and you click Allow. Token storage and reconnection behavior depend on the client.

Supported callbacks: the server accepts the callback forms below, including callbacks on your own domain. There isn't a vendor allowlist.

Callback form Accepted
HTTPS, any host https://<any host>/<any path>, with or without a port
Loopback (any client) http://127.0.0.1:*, http://localhost:*, http://[::1]:*
Custom URI scheme (native) cursor://…, vscode://…, com.example.app:/…

Cleartext http:// is rejected for anything other than loopback, as required by OAuth 2.1.

Check the destination before you click Allow

Because any callback is accepted, the consent page is what protects your account. It shows the destination host that will receive an access token for your account. If you didn't start the connection, or don't recognise that host, click Deny.

How the OAuth handshake works under the hood

  1. Client posts to /mcp without credentials → server returns 401 + WWW-Authenticate: Bearer realm="mcp", resource_metadata="https://mcp.escape.tech/.well-known/oauth-protected-resource".
  2. Client reads the Protected Resource Metadata (RFC 9728) and the Authorization Server Metadata (RFC 8414).
  3. Client performs Dynamic Client Registration (RFC 7591).
  4. Browser is opened at /oauth/mcp/authorize with PKCE S256; you click Allow.
  5. Client redeems the authorization code at /oauth/mcp/token and receives the bearer token.
  6. Subsequent /mcp calls send Authorization: Bearer <token>.

For headless or scripted use cases: CI jobs, custom integrations, your own MCP client, or any environment where launching a browser to consent isn't practical. Continues to work exactly as before; no migration required for existing setups.

Pass your API key in either of these two equivalent header forms:

Authorization: Key <your-api-key>

Or, equivalently:

X-ESCAPE-API-KEY: <your-api-key>

Example MCP client config:

{
  "mcpServers": {
    "escape": {
      "type": "http",
      "url": "https://mcp.escape.tech/mcp",
      "headers": {
        "Authorization": "Key <your-api-key>"
      }
    }
  }
}

Treat your API key like a password

The API key inherits your full user permissions on the Escape Public API. Never commit it to version control: store it in a secrets manager (Vault, GitHub Actions secrets, GitLab CI variables, AWS Secrets Manager, …) and inject it at runtime.

Generate / rotate your API key

Both flows use your Escape API key. Generate or rotate it from your User Settings on the Escape dashboard. Rotating the key revokes the old credential, but MCP authentication may continue to accept it briefly after rotation. Reconnect your client with the new credential; consent behavior depends on the client.

Use Cases

IDE Integration

Integrate the Escape MCP server directly into your development environment to access security capabilities alongside your coding workflow.

Supported IDEs:

  • Visual Studio Code
  • Cursor
  • Any MCP-compatible editor

Capabilities:

  • Query application security status without leaving your IDE
  • Initiate security scans from your editor
  • Review vulnerability findings in context
  • Manage scan configurations programmatically

Learn how to configure IDE integration →

Asking Questions About the Public API

The MCP server exposes a public_api_answer_question tool that grounds any question about the Escape Public API in the live OpenAPI spec at https://public.escape.tech/v3/openapi.json and returns a cURL example. Before running generated output, use double quotes around the API-key header so your shell expands $ESCAPE_API_KEY.

Example question:

How do I list scans from the last 3 days?

Example with Shell Expansion:

curl -X GET 'https://public.escape.tech/v3/scans' \
  --get \
  --data-urlencode 'after=<ISO8601>' \
  --data-urlencode 'before=<ISO8601>' \
  --data-urlencode 'size=50' \
  --data-urlencode 'cursor=<cursor>' \
  -H "X-ESCAPE-API-KEY: $ESCAPE_API_KEY" \
  -H 'Accept: application/json'

The tool returns the best-matching operation (or up to 3 with limit) and never echoes the caller's real API key. It renders $ESCAPE_API_KEY as a placeholder; the example above uses double quotes to allow shell expansion.

Escape Copilot

Interact with the Escape platform through natural language using the Escape Copilot, an AI assistant specialized in cybersecurity workflows.

Capabilities:

  • Natural language application management
  • Conversational scan initiation and monitoring
  • Intelligent vulnerability analysis and recommendations
  • Automated security workflow orchestration

Explore Escape Copilot capabilities →

Getting Started

  1. Choose your auth flow (see Authentication flows above):
    • OAuth 2.1 if your client is Claude (Desktop / Code / web), Cursor, ChatGPT, Continue.dev, Zed, Windsurf, Codeium, or any other MCP-2025-06-18-compliant client.
    • Authorization: Key if you're scripting against MCP from CI, a custom integration, or any headless context.
  2. Generate an API key (only required for the legacy header flow: OAuth handles this for you): User Settings → API Key.
  3. Configure your client:
  4. Start using MCP: your client will discover the available tools automatically.

Security Considerations

  • API key protection: The API key inherits your full Escape account permissions. Store it in a secrets manager and never commit it to version control. OAuth avoids manually copying the key, but the client receives the same reusable API key as its access token and must protect it.
  • OAuth scope: The hosted MCP server publishes a single scope (mcp) covering full Public API access. There is no per-tool scoping today.
  • Scoped access: API keys inherit your user permissions. Ensure your account has only the necessary access level.
  • Key rotation: Rotate the key to revoke the old credential. MCP authentication may continue to accept it briefly after rotation. Reconnect clients with the new credential.
  • Network security: All MCP communication (and the OAuth handshake) is HTTPS-only. Loopback (http://127.0.0.1, http://localhost, http://[::1]) is permitted only for the OAuth callback step, which is what local MCP clients need for their redirect_uri.
  • Consent is the gate on the OAuth callback: callback hosts aren't registered in advance, so any redirect_uri in one of the accepted forms goes through, and the consent page shows the full destination URI that will receive an access token for your account. Treat an unexpected consent page as a phishing attempt and click Deny: nothing is issued until you approve.

Technical Details

Field Value
Resource endpoint https://mcp.escape.tech/mcp
Protocol Stateless Streamable HTTP (JSON-RPC over POST; streaming disabled)
Authorization server https://app.escape.tech (advertised at /.well-known/oauth-authorization-server)
Protected Resource Metadata https://mcp.escape.tech/.well-known/oauth-protected-resource (RFC 9728)
Token endpoint https://mcp.escape.tech/oauth/mcp/token
Authentication methods OAuth 2.1 PKCE S256 bearer token, Authorization: Key <api-key>, X-ESCAPE-API-KEY: <api-key>
PKCE code_challenge_method = S256 (only supported method)
API scope mcp: full Public API access

Support

For questions or issues with MCP integration: