MCP Transport Modes in CyberStrikeAI: A Complete Guide to External Server Communication
CyberStrikeAI supports four distinct MCP transport modes—stdio, http, sse, and simple_http—to connect with external Meta-Control Program servers, each optimized for different deployment scenarios from local executables to stateless HTTP endpoints.
CyberStrikeAI implements the MCP (Meta-Control Program) protocol to communicate with external tools and services. Understanding the available MCP transport modes in CyberStrikeAI is essential for configuring integrations that match your infrastructure, whether you are running local executables or connecting to remote HTTP services.
What Are MCP Transport Modes?
MCP transport modes define the communication channel between CyberStrikeAI and external MCP servers. The transport layer handles message serialization, connection persistence, and protocol negotiation. According to the source code in internal/config/config.go (line 134), the Transport field accepts one of four string values that determine which handler CyberStrikeAI instantiates.
The Four MCP Transport Modes Explained
CyberStrikeAI implements four transport mechanisms, each suited to specific architectural requirements. The dispatch logic resides in internal/mcp/external_manager.go (lines 877–894), where a switch statement routes to the appropriate implementation based on the configured transport string.
stdio Transport Mode
The stdio transport launches a local subprocess and communicates via standard input and output streams. This mode is ideal for tools distributed as executable scripts or compiled binaries that run on the same host as CyberStrikeAI.
When using stdio, you configure the command and args fields rather than a URL. The external manager spawns the process and maintains a persistent connection through pipes.
{
"config": {
"enabled": true,
"command": "node",
"args": ["/path/to/mcp-server.js"],
"env": {}
}
}
http Transport Mode
The http transport establishes a persistent, streaming HTTP connection using a long-lived request/response pair. This mode supports bidirectional JSON message exchange over a single HTTP connection, making it suitable for services that expose streaming endpoints.
Configure this mode by setting "transport": "http" and providing the service URL. The connection remains open, allowing the server to push messages and the client to send requests over the same channel.
{
"config": {
"enabled": true,
"transport": "http",
"url": "http://127.0.0.1:8081/mcp"
}
}
sse Transport Mode
The sse (Server-Sent Events) transport utilizes a uni-directional HTTP push protocol where the server streams events to CyberStrikeAI. This mode is optimized for scenarios where the external MCP server primarily pushes data to CyberStrikeAI without requiring bidirectional request/response cycles.
The configuration requires "transport": "sse" and the endpoint URL. The client maintains an HTTP connection that receives text/event-stream formatted data.
{
"config": {
"enabled": true,
"transport": "sse",
"url": "http://127.0.0.1:8082/sse"
}
}
simple_http Transport Mode
The simple_http transport sends discrete HTTP POST requests for each message, receiving JSON responses without maintaining a persistent connection. This stateless approach is useful for simple HTTP APIs or when integrating with lightweight endpoints that do not support streaming.
As noted in internal/mcp/client_sdk.go (line 492), this mode requires explicit URL configuration. Each MCP message generates a new HTTP POST request to the configured endpoint.
{
"config": {
"enabled": true,
"transport": "simple_http",
"url": "http://127.0.0.1:8081/mcp"
}
}
How Transport Selection Works in the Source Code
The transport mode configuration is defined in internal/config/config.go at line 134, where the Transport struct field accepts the four valid string values. The field tags support both YAML and JSON serialization:
Transport string `yaml:"transport,omitempty" json:"transport,omitempty"`
The runtime selection occurs in internal/mcp/external_manager.go (lines 877–894), where a switch statement on the transport variable instantiates the appropriate client:
switch transport {
case "stdio":
// Local process spawning logic
case "http":
// Streaming HTTP client initialization
case "simple_http":
// Stateless POST client setup
case "sse":
// Server-Sent Events client configuration
}
The client SDK in internal/mcp/client_sdk.go mirrors this logic at line 492, validating that simple_http configurations include the required URL parameter before attempting connection.
Summary
CyberStrikeAI provides four MCP transport modes to accommodate diverse integration scenarios:
stdiofor local executable tools communicating via standard streamshttpfor persistent, bidirectional streaming HTTP connectionsssefor uni-directional server-push event streamssimple_httpfor stateless, discrete HTTP POST request/response cycles
These modes are configured via the Transport field in internal/config/config.go and dispatched through the switch logic in internal/mcp/external_manager.go, allowing CyberStrikeAI to adapt to both local tooling and remote service architectures.
Frequently Asked Questions
What is the default MCP transport mode in CyberStrikeAI?
CyberStrikeAI does not enforce a single default transport mode; instead, it selects the appropriate handler based on the transport field value provided in the configuration. If no transport is specified, the behavior depends on which other configuration fields are present—for example, specifying command and args without a transport field typically implies stdio mode.
When should I use simple_http instead of http transport?
Use simple_http when integrating with lightweight, stateless HTTP endpoints that do not support persistent connections or streaming protocols. This mode sends discrete POST requests for each MCP message, making it suitable for simple APIs or serverless functions. Choose http when you need bidirectional streaming or when the external server supports long-lived HTTP connections for real-time message exchange.
Can I configure multiple MCP transport modes simultaneously?
Yes, CyberStrikeAI supports configuring multiple external MCP servers simultaneously, each with its own transport mode. The external_manager.go switch statement handles each connection independently based on its specific transport configuration value. This allows you to run a local tool via stdio while simultaneously connecting to remote services via http, sse, or simple_http within the same CyberStrikeAI instance.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →