You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,6 +206,55 @@ Here is the output :
206
206
207
207
If you are looking for a step-by-step tutorial on how to get started with `rust-mcp-sdk` , please see : [Getting Started MCP Server](https://github.com/rust-mcp-stack/rust-mcp-sdk/tree/main/doc/getting-started-mcp-server.md)
208
208
209
+
## Features
210
+
211
+
The `rust-mcp-sdk` crate provides three optional features: `server` , `client` and `macros`. By default, all features are enabled for maximum functionality. You can customize which features to include based on your project's needs.
212
+
213
+
### Available Features
214
+
215
+
-`server`: Activates MCP server capabilities in `rust-mcp-sdk`, providing modules and APIs for building and managing MCP services.
216
+
-`client`: Activates MCP client capabilities, offering modules and APIs for client development and communicating with MCP servers.
217
+
-`macros`: Provides procedural macros for simplifying the creation and manipulation of MCP Tool structures.
218
+
219
+
### Default Behavior
220
+
221
+
All features (server, client, and macros) are enabled by default. When you include rust-mcp-sdk as a dependency without specifying features, all will be included:
222
+
223
+
<!-- x-release-please-start-version -->
224
+
225
+
```toml
226
+
[dependencies]
227
+
rust-mcp-sdk = "0.2.0"
228
+
```
229
+
230
+
<!-- x-release-please-end -->
231
+
232
+
### Using Only the server Feature
233
+
234
+
If you only need the MCP Server functionality, you can disable the default features and explicitly enable the server feature. Add the following to your Cargo.toml:
235
+
236
+
<!-- x-release-please-start-version -->
237
+
238
+
```toml
239
+
[dependencies]
240
+
rust-mcp-sdk = { version = "0.2.0", default-features = false, features = ["server","macros"] }
241
+
```
242
+
243
+
<!-- x-release-please-end -->
244
+
245
+
### Using Only the client Feature
246
+
247
+
If you only need the MCP Client functionality, you can disable the default features and explicitly enable the client feature. Add the following to your Cargo.toml:
248
+
249
+
<!-- x-release-please-start-version -->
250
+
251
+
```toml
252
+
[dependencies]
253
+
rust-mcp-sdk = { version = "0.2.0", default-features = false, features = ["client"] }
254
+
```
255
+
256
+
<!-- x-release-please-end -->
257
+
209
258
### Choosing Between `mcp_server_handler` and `mcp_server_handler_core`
210
259
211
260
[rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) provides two type of handler traits that you can chose from:
Copy file name to clipboardExpand all lines: crates/rust-mcp-sdk/README.md
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,6 +206,55 @@ Here is the output :
206
206
207
207
If you are looking for a step-by-step tutorial on how to get started with `rust-mcp-sdk` , please see : [Getting Started MCP Server](https://github.com/rust-mcp-stack/rust-mcp-sdk/tree/main/doc/getting-started-mcp-server.md)
208
208
209
+
## Features
210
+
211
+
The `rust-mcp-sdk` crate provides three optional features: `server` , `client` and `macros`. By default, all features are enabled for maximum functionality. You can customize which features to include based on your project's needs.
212
+
213
+
### Available Features
214
+
215
+
-`server`: Activates MCP server capabilities in `rust-mcp-sdk`, providing modules and APIs for building and managing MCP services.
216
+
-`client`: Activates MCP client capabilities, offering modules and APIs for client development and communicating with MCP servers.
217
+
-`macros`: Provides procedural macros for simplifying the creation and manipulation of MCP Tool structures.
218
+
219
+
### Default Behavior
220
+
221
+
All features (server, client, and macros) are enabled by default. When you include rust-mcp-sdk as a dependency without specifying features, all will be included:
222
+
223
+
<!-- x-release-please-start-version -->
224
+
225
+
```toml
226
+
[dependencies]
227
+
rust-mcp-sdk = "0.2.0"
228
+
```
229
+
230
+
<!-- x-release-please-end -->
231
+
232
+
### Using Only the server Feature
233
+
234
+
If you only need the MCP Server functionality, you can disable the default features and explicitly enable the server feature. Add the following to your Cargo.toml:
235
+
236
+
<!-- x-release-please-start-version -->
237
+
238
+
```toml
239
+
[dependencies]
240
+
rust-mcp-sdk = { version = "0.2.0", default-features = false, features = ["server","macros"] }
241
+
```
242
+
243
+
<!-- x-release-please-end -->
244
+
245
+
### Using Only the client Feature
246
+
247
+
If you only need the MCP Client functionality, you can disable the default features and explicitly enable the client feature. Add the following to your Cargo.toml:
248
+
249
+
<!-- x-release-please-start-version -->
250
+
251
+
```toml
252
+
[dependencies]
253
+
rust-mcp-sdk = { version = "0.2.0", default-features = false, features = ["client"] }
254
+
```
255
+
256
+
<!-- x-release-please-end -->
257
+
209
258
### Choosing Between `mcp_server_handler` and `mcp_server_handler_core`
210
259
211
260
[rust-mcp-sdk](https://github.com/rust-mcp-stack/rust-mcp-sdk) provides two type of handler traits that you can chose from:
0 commit comments