Context Layer

MCP

10-Second overview

MCP (Model Context Protocol) is an external execution interface for Context Layer. It allows agents and external systems to invoke Flow execution without a wrapper script. Requests are routed through the unified /api/execute endpoint under the same runtime enforcement as direct integrations.

Agent or external system
↓
MCP (SSE)
↓
/api/execute
  • MCP exposes Flow execution to agents and external systems without a wrapper script.
  • Requests use the same /api/execute path and runtime enforcement as direct integrations.

Endpoint

The MCP server is available at https://mcp.cl.kaisek.com/sse using SSE transport. It exposes a single tool: send_message.

Two input modes

Plain message

send_message(message="Generate invoice")

Structured input (State Bridge)

send_message(step_description="Generate invoice", state={"amount": 100, "currency": "USD"}, context="Checkout flow", constraint="Amount must be valid")

Structured input is converted to natural language before being passed to /api/execute. See State Bridge.

Validation rules

  • message and step_description are mutually exclusive.
  • step_description requires state.
  • workflowEnd and stateless cannot coexist.

Flags

workflowEnd and stateless flags are supported on send_message. These follow the same enforcement rules as the wrapper interface. workflowEnd and stateless are not available in agent usage type. See Usage Type.

Runtime behavior

MCP requests travel the same execution path as wrapper requests, i.e., through /api/execute, into the Flow or Pulse runtime, through constraint enforcement, verification, and tier evaluation. No execution guarantees are different for MCP-originated requests.

State Bridge

Structured input mode, state bridging, and how structured payloads become natural language for execution.

Usage Type

Usage types and which flags (including workflowEnd and stateless) apply per type.

API Reference

HTTP contract for /api/execute and related runtime APIs.

Installation

How to install and configure Context Layer for your environment.