Skip to content

Commit 1acf0c7

Browse files
committed
poem-mcpserver 0.1.6
1 parent 661ac87 commit 1acf0c7

File tree

5 files changed

+39
-10
lines changed

5 files changed

+39
-10
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ poem = { path = "poem", version = "3.1.7", default-features = false }
2626
poem-derive = { path = "poem-derive", version = "3.1.4" }
2727
poem-openapi-derive = { path = "poem-openapi-derive", version = "5.1.8" }
2828
poem-grpc-build = { path = "poem-grpc-build", version = "0.5.2" }
29-
poem-mcpserver-macros = { path = "poem-mcpserver-macros", version = "0.1.5" }
29+
poem-mcpserver-macros = { path = "poem-mcpserver-macros", version = "0.1.6" }
3030

3131
proc-macro-crate = "3.0.0"
3232
proc-macro2 = "1.0.29"

poem-mcpserver-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "poem-mcpserver-macros"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
authors.workspace = true
55
edition.workspace = true
66
license.workspace = true

poem-mcpserver/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "poem-mcpserver"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
authors.workspace = true
55
edition.workspace = true
66
license.workspace = true
@@ -10,7 +10,7 @@ repository.workspace = true
1010
rust-version.workspace = true
1111
readme = "README.md"
1212
description = "MCP Server implementation for Poem"
13-
keywords = ["framework", "async", "mcp", "ai", "Model-Context-Protocol"]
13+
keywords = ["framework", "async", "mcp", "ai"]
1414
categories = [
1515
"network-programming",
1616
"asynchronous",

poem-mcpserver/src/protocol/initialize.rs

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,19 @@ pub struct InitializeRequest {
2929
pub client_info: ClientInfo,
3030
}
3131

32-
/// A capability information.
32+
/// Prompts capability.
3333
#[derive(Debug, Serialize)]
3434
#[serde(rename_all = "camelCase")]
35-
pub struct Capability {
35+
pub struct PromptsCapability {
36+
/// Indicates whether the server will emit notifications when the list of
37+
/// available prompts changes.
38+
pub list_changed: bool,
39+
}
40+
41+
/// Resources capability.
42+
#[derive(Debug, Serialize)]
43+
#[serde(rename_all = "camelCase")]
44+
pub struct ResourcesCapability {
3645
/// Indicates whether the server will emit notifications when the list of
3746
/// available prompts changes.
3847
pub list_changed: bool,
@@ -41,12 +50,25 @@ pub struct Capability {
4150
pub subscribe: bool,
4251
}
4352

53+
/// Tools capability.
54+
#[derive(Debug, Serialize)]
55+
#[serde(rename_all = "camelCase")]
56+
pub struct ToolsCapability {
57+
/// Indicates whether the server will emit notifications when the list of
58+
/// available prompts changes.
59+
pub list_changed: bool,
60+
}
61+
4462
/// The server capabilities.
4563
#[derive(Debug, Serialize)]
4664
#[serde(rename_all = "camelCase")]
4765
pub struct ServerCapabilities {
48-
/// The tools capability.
49-
pub tools: Capability,
66+
/// Prompts capability.
67+
pub prompts: PromptsCapability,
68+
/// Resources capability.
69+
pub resources: ResourcesCapability,
70+
/// Tools capability.
71+
pub tools: ToolsCapability,
5072
}
5173

5274
/// The server information.

poem-mcpserver/src/server.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ use serde_json::Value;
33
use crate::{
44
protocol::{
55
initialize::{
6-
Capability, InitializeRequest, InitializeResponse, ServerCapabilities, ServerInfo,
6+
InitializeRequest, InitializeResponse, PromptsCapability, ResourcesCapability,
7+
ServerCapabilities, ServerInfo, ToolsCapability,
78
},
89
rpc::{Request, RequestId, Requests, Response},
910
tool::{ToolsCallRequest, ToolsListResponse},
@@ -58,10 +59,16 @@ where
5859
result: Some(InitializeResponse {
5960
protocol_version: MCP_PROTOCOL_VERSION,
6061
capabilities: ServerCapabilities {
61-
tools: Capability {
62+
prompts: PromptsCapability {
63+
list_changed: false,
64+
},
65+
resources: ResourcesCapability {
6266
list_changed: false,
6367
subscribe: false,
6468
},
69+
tools: ToolsCapability {
70+
list_changed: false,
71+
},
6572
},
6673
server_info: ServerInfo {
6774
name: "poem-mcpserver".to_string(),

0 commit comments

Comments
 (0)