Transport Modes
automagik-tools supports three transport modes for MCP communication.stdio
Protocol
JSON-RPC 2.0 over standard input/output pipes.Connection Model
1:1 process relationship. AI agent spawns automagik-tools as subprocess.Latency
~1ms (inter-process communication)Usage
Configuration
Claude Desktop:Characteristics
- No network ports opened
- Process-isolated execution
- Automatic lifecycle management
- Single-user only
- No remote access
SSE (Server-Sent Events)
Protocol
JSON-RPC 2.0 over HTTP long-polling with server-push.Connection Model
Many:1 server. Multiple agents connect to persistent server.Latency
~50ms (HTTP overhead + network)Usage
Start server:Configuration
Characteristics
- Persistent HTTP connections
- Real-time event push
- Multiple concurrent clients
- Stateful session management
- Requires network access
HTTP
Protocol
JSON-RPC 2.0 over HTTP request-response.Connection Model
Stateless REST API. Each request independent.Latency
~100ms (HTTP overhead + network + connection setup)Usage
Start server:Authentication
API key:Characteristics
- Stateless requests
- Standard REST API
- Horizontal scaling support
- OpenAPI documentation
- Load balancing compatible
Technical Comparison
| Feature | stdio | SSE | HTTP |
|---|---|---|---|
| Protocol | JSON-RPC/stdin | JSON-RPC/SSE | JSON-RPC/REST |
| Connection | 1:1 process | Many:1 persistent | Stateless |
| Latency | 1ms | 50ms | 100ms |
| Network | No | Yes | Yes |
| Real-time push | No | Yes | No |
| Scalability | 1 user | 10-100 users | Unlimited |
| State | Per process | Persistent | None |
| Auth | Process isolation | Bearer/API key | Bearer/API key |
Performance Measurements
Measured on local machine (Linux, 6 cores):| Operation | stdio | SSE | HTTP |
|---|---|---|---|
| Tool discovery | 0.8ms | 48ms | 95ms |
| Simple tool call | 1.2ms | 52ms | 103ms |
| Tool with I/O | 15ms | 63ms | 112ms |
| Batch 10 tools | 12ms | 180ms | 420ms |
Use Cases
stdio
- Single developer local setup
- AI clients: Claude Desktop, Cursor, Windsurf
- Maximum security (no network)
- Development and testing
SSE
- Team sharing (5-50 users)
- Remote development
- Cloud deployment
- Real-time notifications
- CI/CD integration
HTTP
- Programmatic API access
- Service integrations
- Webhooks
- Frontend applications
- Large scale deployment (50+ users)
- Kubernetes/cloud native
Security
stdio
- No network exposure
- Process-level isolation
- Credentials via environment variables
- No authentication needed (local-only)
SSE
- HTTPS required for production
- Bearer token authentication
- CORS controls
- Rate limiting per client
- Connection monitoring
HTTP
- HTTPS required for production
- API key or OAuth authentication
- CORS controls
- Rate limiting per endpoint
- Request logging
Mixed Mode
Run multiple transports simultaneously:Environment Variables
Next Steps
- Plugin System: How tools are discovered and loaded
- MCP Architecture: MCP protocol implementation
- OpenAPI Generation: Generate tools from APIs

