Skip to content

feat: re-export transport and macros for seamless user experience #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ members = [

[workspace.dependencies]
# Workspace member crates
rust-mcp-transport = { version = "0.1.0", path = "crates/rust-mcp-transport" }
rust-mcp-sdk = { version = "0.1.0", path = "crates/rust-mcp-sdk" }
rust-mcp-macros = { version = "0.1.0", path = "crates/rust-mcp-macros" }
rust-mcp-transport = { path = "crates/rust-mcp-transport" }
rust-mcp-sdk = { path = "crates/rust-mcp-sdk" }
rust-mcp-macros = { path = "crates/rust-mcp-macros" }

# External crates
rust-mcp-schema = { version = "0.2.1" }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ async fn main() -> SdkResult<()> {

Here is the output :

![rust-mcp-sdk-client-output](https://github.com/rust-mcp-stack/rust-mcp-sdk/tree/main/assets/sample/mcp-client-sample-code.jpg)
![rust-mcp-sdk-client-output](assets/examples/mcp-client-sample-code.jpg)

> your results may vary slightly depending on the version of the MCP Server in use when you run it.

Expand Down
3 changes: 1 addition & 2 deletions crates/rust-mcp-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ description = "A procedural macro, part of the rust-mcp-sdk ecosystem, that deri

[dependencies]
serde_json = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
syn = "2.0"
quote = "1.0"
proc-macro2 = "1.0"

[dev-dependencies]
rust-mcp-schema = { version = "0.2.1" }
serde = { version = "1.0", features = ["derive"] }
serde_json = { version = "1.0" }

[lints]
workspace = true
Expand Down
4 changes: 4 additions & 0 deletions crates/rust-mcp-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ edition = "2021"
[dependencies]
rust-mcp-schema = { workspace = true }
rust-mcp-transport = { workspace = true }
rust-mcp-macros = { workspace = true, optional = true }

tokio.workspace = true
serde = { workspace = true }
Expand All @@ -21,6 +22,9 @@ async-trait = { workspace = true }
futures = { workspace = true }
thiserror = { workspace = true }

[features]
default = ["macros"] # Default features
macros = ["rust-mcp-macros"]

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/rust-mcp-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ async fn main() -> SdkResult<()> {

Here is the output :

![rust-mcp-sdk-client-output](https://github.com/rust-mcp-stack/rust-mcp-sdk/tree/main/assets/sample/mcp-client-sample-code.jpg)
![rust-mcp-sdk-client-output](assets/examples/mcp-client-sample-code.jpg)

> your results may vary slightly depending on the version of the MCP Server in use when you run it.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions crates/rust-mcp-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@ pub mod mcp_server {

pub use mcp_traits::mcp_client::*;
pub use mcp_traits::mcp_server::*;

pub use rust_mcp_transport::*;

#[cfg(feature = "macros")]
pub mod macros {
pub use rust_mcp_macros::*;
}