Actix Backend
Add rust-mcp-actix to your dependencies:
[dependencies]
rust-mcp-actix = "1.0"
rust-mcp-sdk = { version = "1.0", default-features = false, features = ["server", "macros"] }
Creating an Actix MCP Serverโ
use rust_mcp_actix::{create_actix_server, ActixServerOptions};
let server = create_actix_server(
server_info,
handler.to_mcp_server_handler(),
ActixServerOptions {
host: "127.0.0.1".into(),
port: 8080,
event_store: Some(Arc::new(InMemoryEventStore::default())),
task_store: Some(Arc::new(InMemoryTaskStore::new(None))),
auth: None,
health_endpoint: Some("/health".into()),
sse_support: true,
..Default::default()
},
);
server.start().await?;
ActixServerOptions mirrors AxumServerOptions field-for-field.
Feature Comparisonโ
| Feature | Axum | Actix |
|---|---|---|
| Streamable HTTP | โ | โ |
| SSE | โ | โ |
| Resumability | โ | โ |
| Tasks | โ | โ |
| Auth | โ | โ |
| Health Check | โ | โ |
| DNS Rebinding Protection | โ | โ |