Skip to content

Commit c545bc7

Browse files
committed
chore: upgrade to pulseengine-mcp v0.9.0 framework
- Update all pulseengine-mcp dependencies to v0.9.0 - Bump template-mcp-server version to 0.2.0 - Temporarily disable resources due to framework bug in v0.9.0 - All 6 template tools tested and working properly - Resources will be re-enabled once framework fixes delegation bug
1 parent 7914b7c commit c545bc7

File tree

3 files changed

+22
-81
lines changed

3 files changed

+22
-81
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ anyhow = "1.0"
1818
async-trait = "0.1"
1919
rand = "0.8"
2020

21-
# PulseEngine MCP Framework - Local development versions
22-
pulseengine-mcp-server = { path = "../mcp-loxone-seperation/pulseengine-mcp/mcp-server", features = ["stdio-logging"] }
23-
pulseengine-mcp-macros = { path = "../mcp-loxone-seperation/pulseengine-mcp/mcp-macros" }
24-
pulseengine-mcp-protocol = { path = "../mcp-loxone-seperation/pulseengine-mcp/mcp-protocol" }
25-
pulseengine-mcp-transport = { path = "../mcp-loxone-seperation/pulseengine-mcp/mcp-transport" }
21+
# PulseEngine MCP Framework - Published v0.9.0
22+
pulseengine-mcp-server = { version = "0.9.0", features = ["stdio-logging"] }
23+
pulseengine-mcp-macros = { version = "0.9.0" }
24+
pulseengine-mcp-protocol = { version = "0.9.0" }
25+
pulseengine-mcp-transport = { version = "0.9.0" }

template-mcp-server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "template-mcp-server"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55
description = "A template MCP server using PulseEngine MCP framework"
66
license = "MIT"

template-mcp-server/src/lib.rs

Lines changed: 16 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! - URI templates for parameterized resources
1010
//! - Proper error handling and async support
1111
12-
use pulseengine_mcp_macros::{mcp_server, mcp_tools, mcp_resource};
12+
use pulseengine_mcp_macros::{mcp_server, mcp_tools};
1313
use serde::{Deserialize, Serialize};
1414

1515
/// Example data structure that your tools might work with
@@ -46,7 +46,7 @@ pub struct ServerConfig {
4646
/// automatically generates the necessary MCP infrastructure.
4747
#[mcp_server(
4848
name = "Template MCP Server",
49-
version = "0.1.0",
49+
version = "0.2.0",
5050
description = "A template MCP server demonstrating basic functionality",
5151
auth = "disabled" // Change to "memory", "file", or remove for production
5252
)]
@@ -165,79 +165,20 @@ impl TemplateMcpServer {
165165
}
166166
}
167167

168-
// Resources - Read-only data accessible via MCP resource URIs
169-
170-
/// Get server status information
171-
///
172-
/// This resource provides read-only access to the server's current status.
173-
/// Resources are for data that clients need to read but not modify.
174-
#[mcp_resource(
175-
uri_template = "template://server-status",
176-
name = "server_status",
177-
description = "Current server status and statistics",
178-
mime_type = "application/json"
179-
)]
180-
pub async fn server_status_resource(&self) -> anyhow::Result<ServerStatus> {
181-
let uptime = self.start_time.elapsed();
182-
183-
Ok(ServerStatus {
184-
name: "Template MCP Server".to_string(),
185-
version: "0.1.0".to_string(),
186-
uptime_seconds: uptime.as_secs(),
187-
tools_count: 6, // Update this if you add/remove tools
188-
resources_count: 3, // Update this if you add/remove resources
189-
})
190-
}
191-
192-
/// Get server configuration
193-
///
194-
/// This resource exposes the server's configuration settings.
195-
/// Resources are perfect for configuration data that clients need to read.
196-
#[mcp_resource(
197-
uri_template = "template://server-config",
198-
name = "server_config",
199-
description = "Server configuration settings",
200-
mime_type = "application/json"
201-
)]
202-
pub async fn server_config_resource(&self) -> anyhow::Result<ServerConfig> {
203-
Ok(ServerConfig {
204-
max_concurrent_requests: 100,
205-
timeout_seconds: 30,
206-
debug_mode: cfg!(debug_assertions),
207-
supported_formats: vec![
208-
"json".to_string(),
209-
"text".to_string(),
210-
"binary".to_string(),
211-
],
212-
})
213-
}
214-
215-
/// Get example data by ID
216-
///
217-
/// This resource demonstrates parameterized resources using URI templates.
218-
/// The {id} parameter is extracted from the URI when the resource is accessed.
219-
#[mcp_resource(
220-
uri_template = "template://example-data/{id}",
221-
name = "example_data",
222-
description = "Example data entry by ID",
223-
mime_type = "application/json"
224-
)]
225-
pub async fn example_data_resource(&self, id: String) -> anyhow::Result<ExampleData> {
226-
// In a real implementation, you'd look up the data by ID
227-
// For this template, we'll generate example data
228-
let id_num = id.parse::<u64>().unwrap_or(1);
229-
230-
Ok(ExampleData {
231-
id: id_num,
232-
name: format!("Example Item {}", id_num),
233-
value: (id_num as f64) * 1.5,
234-
tags: vec![
235-
"example".to_string(),
236-
"template".to_string(),
237-
format!("id-{}", id_num),
238-
],
239-
})
240-
}
168+
// TODO: Resources disabled temporarily due to framework bug in v0.9.0
169+
// The mcp_server macro doesn't properly delegate to McpResourcesProvider
170+
// Will re-enable once framework is fixed
171+
//
172+
// Example resources that will be available once the framework is fixed:
173+
//
174+
// #[mcp_resource(uri_template = "template://server-status")]
175+
// pub async fn server_status_resource(&self) -> anyhow::Result<ServerStatus>
176+
//
177+
// #[mcp_resource(uri_template = "template://server-config")]
178+
// pub async fn server_config_resource(&self) -> anyhow::Result<ServerConfig>
179+
//
180+
// #[mcp_resource(uri_template = "template://example-data/{id}")]
181+
// pub async fn example_data_resource(&self, id: String) -> anyhow::Result<ExampleData>
241182
}
242183

243184
// Add any additional implementation methods here that are NOT tools

0 commit comments

Comments
 (0)