Overview
Understanding Model Context Protocol (MCP) integration in Compozy
Model Context Protocol (MCP) is a standardized protocol that enables AI agents to interact with external tools, services, and data sources through a unified interface. It bridges the gap between language models and the external world, providing a consistent way for agents to extend their capabilities beyond their core language model functionality.
Quick Navigation
What is MCP?
MCP is a protocol that allows AI agents to:
File System Access
Database Operations
API Integration
Code Execution
Architecture Overview
Key Components
MCP Server Types
Remote MCP Servers (HTTP/HTTPS)
Remote servers accessed via network endpoints using Server-Sent Events (SSE) or HTTP streaming:
mcps:
- id: weather-api
url: "https://api.weather-mcp.com/v1"
transport: sse
headers:
Authorization: "Bearer {{ .env.WEATHER_API_KEY }}"
timeout: 30s
auto_reconnect: true
Transport Types Comparison
Transport | Description | Use Case | Performance |
---|---|---|---|
sse | Server-Sent Events | Real-time streaming from HTTP servers | Medium latency, good for real-time |
streamable-http | HTTP with streaming | Large responses, file transfers | High throughput, handles large data |
stdio | Standard I/O | Local processes, Docker containers | Low latency, high performance |
Key Features
Dynamic Registration
Observability & Monitoring
Tool Discovery
Environment Requirements
# Required: MCP proxy service URL
MCP_PROXY_URL=http://localhost:6001
Quick Start with CLI
Get started with MCP in Compozy using the CLI:
# 1. Initialize a new project
compozy init my-mcp-project
cd my-mcp-project
# 2. Start the development environment
compozy dev --watch
# 3. In another terminal, start the MCP proxy
compozy mcp-proxy --debug
Initialize Project
Use compozy init
to create a new project with MCP support and default configurations.
Start Development Server
Run compozy dev --watch
to start the development server with hot reload capabilities.
Start MCP Proxy
Launch compozy mcp-proxy
to handle all MCP server connections and routing.
Test Integration
Use compozy workflow execute --workflow-id <id>
to verify that your workflows can use MCP tools.
Integration with Compozy Workflow System
MCP seamlessly integrates with Compozy's workflow orchestration through a unified architecture: