Transport Configuration
MCP supports three transport mechanisms for communication between clients and servers. Each transport has different characteristics and use cases optimized for specific scenarios.
Supported Transport Types
Compozy supports the following transport types:
- Stdio - Standard I/O for local processes
- SSE - Server-Sent Events for HTTP streaming
- Streamable HTTP - HTTP with streaming capabilities
Transport Configuration
Stdio Transport
Standard I/O transport for local processes and command execution:
# compozy.yaml
mcps:
- name: filesystem_server
transport: stdio
command: npx
args: ["-y", "@modelcontextprotocol/server-filesystem", "./workspace"]
env:
NODE_ENV: production
DEBUG: "mcp:*"
Option | Description | Required | Default |
---|---|---|---|
command | Executable command | Yes | — |
args | Command arguments | No | — |
env | Environment variables | No | — |
Use Cases:
- Local MCP server processes
- Docker containers
- Command-line MCP tools
- Development and testing
SSE Transport
Server-Sent Events for real-time HTTP streaming:
# compozy.yaml
mcps:
- name: remote_server
transport: sse
url: "https://example.com/mcp"
headers:
Authorization: "Bearer token123"
User-Agent: "Compozy/1.0"
timeout: 30s
Option | Description | Required | Default |
---|---|---|---|
url | SSE endpoint URL | Yes | — |
headers | HTTP headers | No | — |
timeout | Request timeout | No | 30s |
Use Cases:
- Remote MCP servers
- Real-time data streaming
- Web-based MCP services
- Cloud deployments
Streamable HTTP Transport
HTTP with streaming for large responses and file transfers:
# compozy.yaml
mcps:
- name: file_server
transport: streamable-http
url: "https://api.example.com/mcp-stream"
headers:
Content-Type: "application/json"
timeout: 60s
Option | Description | Required | Default |
---|---|---|---|
url | HTTP endpoint URL | Yes | — |
headers | HTTP headers | No | — |
timeout | Request timeout | No | 30s |
Use Cases:
- Large file transfers
- Streaming responses
- High-throughput scenarios
- API-based MCP servers
Transport Selection Guidelines
Choose stdio when:
- Running MCP servers locally
- Using Docker containers
- Development and testing scenarios
- Direct process communication is preferred
Choose sse when:
- Connecting to remote MCP servers
- Real-time streaming is required
- Using web-based MCP services
- Server-sent events are supported
Choose streamable-http when:
- Handling large file transfers
- Streaming responses are needed
- HTTP-based communication is preferred
- API integration is required
Related Documentation
MCP Proxy Server
Understanding the MCP proxy server architecture and deployment
Security & Authentication
The MCP Proxy provides comprehensive security features including token-based authentication, IP filtering, rate limiting, and security headers. This guide covers configuring and managing security for your MCP deployments with multi-layered protection strategies.