Skip to content

Commit 1cf1877

Browse files
authored
feat: add sse transport support (#32)
* feat: add sse transport support * chore: fmt * chore: update doc * chore: v * chore: update readme * chore: update docs * update assets * chore: readme
1 parent c2854e1 commit 1cf1877

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+6487
-337
lines changed

Cargo.lock

Lines changed: 2411 additions & 228 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ members = [
88
"examples/simple-mcp-client-core",
99
"examples/hello-world-mcp-server",
1010
"examples/hello-world-mcp-server-core",
11+
"examples/hello-world-server-sse",
12+
"examples/hello-world-server-core-sse",
13+
"examples/simple-mcp-client-sse",
14+
"examples/simple-mcp-client-core-sse",
1115
]
1216

1317
[workspace.dependencies]
@@ -26,13 +30,20 @@ async-trait = { version = "0.1" }
2630
strum = { version = "0.27", features = ["derive"] }
2731
thiserror = { version = "2.0" }
2832
tokio-stream = { version = "0.1" }
33+
uuid = { version = "1" }
2934
tracing = "0.1"
3035
tracing-subscriber = { version = "0.3", features = [
3136
"env-filter",
3237
"std",
3338
"fmt",
3439
] }
3540

41+
axum = "0.8"
42+
rustls = "0.23"
43+
tokio-rustls = "0.26"
44+
axum-server = { version = "0.7" }
45+
reqwest = "0.12"
46+
bytes = "1.10.1"
3647

3748
# [workspace.dependencies.windows]
3849

Makefile.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ args = ["fmt", "--all", "--", "--check"]
88

99
[tasks.clippy]
1010
command = "cargo"
11-
args = ["clippy"]
11+
args = ["clippy", "--workspace", "--all-targets", "--all-features"]
1212

1313
[tasks.test]
1414
install_crate = "nextest"

README.md

Lines changed: 141 additions & 28 deletions
Large diffs are not rendered by default.
504 KB
Loading
283 KB
Loading

crates/rust-mcp-sdk/Cargo.toml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,35 @@ async-trait = { workspace = true }
2222
futures = { workspace = true }
2323
thiserror = { workspace = true }
2424

25+
axum = { workspace = true, optional = true }
26+
uuid = { workspace = true, features = ["v4"], optional = true }
27+
tokio-stream = { workspace = true, optional = true }
28+
axum-server = { version = "0.7", features = [], optional = true }
29+
tracing.workspace = true
30+
31+
# rustls = { workspace = true, optional = true }
32+
hyper = { version = "1.6.0" }
33+
34+
[dev-dependencies]
35+
tracing-subscriber = { workspace = true, features = [
36+
"env-filter",
37+
"std",
38+
"fmt",
39+
] }
40+
2541
[features]
26-
default = ["client", "server", "macros"] # All features enabled by default
27-
server = [] # Server feature
28-
client = [] # Client feature
42+
default = [
43+
"client",
44+
"server",
45+
"macros",
46+
"hyper-server",
47+
"ssl",
48+
] # All features enabled by default
49+
server = [] # Server feature
50+
client = [] # Client feature
51+
hyper-server = ["axum", "axum-server", "uuid", "tokio-stream"]
52+
ssl = ["axum-server/tls-rustls"]
2953
macros = ["rust-mcp-macros"]
3054

31-
3255
[lints]
3356
workspace = true

crates/rust-mcp-sdk/README.md

Lines changed: 142 additions & 30 deletions
Large diffs are not rendered by default.
Loading
Loading

0 commit comments

Comments
 (0)