Skip to content
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
3 changes: 2 additions & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"Bash(./target/release/timedate-mcp-server:*)",
"Bash(gh issue list:*)",
"Bash(gh pr view:*)",
"WebSearch"
"WebSearch",
"Bash(git log:*)"
],
"deny": []
}
Expand Down
33 changes: 20 additions & 13 deletions Cargo.lock

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

26 changes: 13 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.10.0"
version = "0.10.1"
rust-version = "1.88"
edition = "2024"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -108,18 +108,18 @@ assert_matches = "1.5"
serde_yaml = "0.9"

# Framework internal dependencies (published versions)
pulseengine-mcp-protocol = { version = "0.10.0", path = "mcp-protocol" }
pulseengine-mcp-logging = { version = "0.10.0", path = "mcp-logging" }
pulseengine-mcp-auth = { version = "0.10.0", path = "mcp-auth" }
pulseengine-mcp-security = { version = "0.10.0", path = "mcp-security" }
pulseengine-mcp-security-middleware = { version = "0.10.0", path = "mcp-security-middleware" }
pulseengine-mcp-monitoring = { version = "0.10.0", path = "mcp-monitoring" }
pulseengine-mcp-transport = { version = "0.10.0", path = "mcp-transport" }
pulseengine-mcp-cli = { version = "0.10.0", path = "mcp-cli" }
pulseengine-mcp-cli-derive = { version = "0.10.0", path = "mcp-cli-derive" }
pulseengine-mcp-server = { version = "0.10.0", path = "mcp-server" }
pulseengine-mcp-macros = { version = "0.10.0", path = "mcp-macros" }
pulseengine-mcp-external-validation = { version = "0.10.0", path = "mcp-external-validation" }
pulseengine-mcp-protocol = { version = "0.10.1", path = "mcp-protocol" }
pulseengine-mcp-logging = { version = "0.10.1", path = "mcp-logging" }
pulseengine-mcp-auth = { version = "0.10.1", path = "mcp-auth" }
pulseengine-mcp-security = { version = "0.10.1", path = "mcp-security" }
pulseengine-mcp-security-middleware = { version = "0.10.1", path = "mcp-security-middleware" }
pulseengine-mcp-monitoring = { version = "0.10.1", path = "mcp-monitoring" }
pulseengine-mcp-transport = { version = "0.10.1", path = "mcp-transport" }
pulseengine-mcp-cli = { version = "0.10.1", path = "mcp-cli" }
pulseengine-mcp-cli-derive = { version = "0.10.1", path = "mcp-cli-derive" }
pulseengine-mcp-server = { version = "0.10.1", path = "mcp-server" }
pulseengine-mcp-macros = { version = "0.10.1", path = "mcp-macros" }
pulseengine-mcp-external-validation = { version = "0.10.1", path = "mcp-external-validation" }

[profile.release]
opt-level = "s"
Expand Down
2 changes: 2 additions & 0 deletions examples/hello-world-with-auth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ tracing-subscriber = { workspace = true }
anyhow = { workspace = true }

# Serialization (required by mcp_tools macro)
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
schemars = { workspace = true, features = ["derive"] }

# HTTP server
axum = { workspace = true }
Expand Down
14 changes: 12 additions & 2 deletions examples/hello-world-with-auth/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@

use pulseengine_mcp_macros::{mcp_server, mcp_tools};
use pulseengine_mcp_security_middleware::*;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use tracing::{info, warn};

#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct SayHelloParams {
/// The name to greet (optional)
pub name: Option<String>,
}

#[mcp_server(name = "Hello World with Auth")]
#[derive(Default, Clone)]
pub struct HelloWorldAuth;
Expand All @@ -41,8 +49,10 @@ impl HelloWorldAuth {
///
/// This tool demonstrates how authentication context can be used in tools.
/// In development mode, authentication is optional but logged when present.
pub async fn say_hello(&self, name: Option<String>) -> anyhow::Result<String> {
let name = name.unwrap_or_else(|| "Authenticated World".to_string());
pub async fn say_hello(&self, params: SayHelloParams) -> anyhow::Result<String> {
let name = params
.name
.unwrap_or_else(|| "Authenticated World".to_string());

// In a real implementation, you could access the auth context here
// let auth = request_context.auth_context();
Expand Down
2 changes: 2 additions & 0 deletions examples/hello-world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ async-trait = "0.1"
thiserror = "1.0"
tracing = "0.1"
tracing-subscriber = "0.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
schemars = { version = "1.0", features = ["derive"] }
12 changes: 10 additions & 2 deletions examples/hello-world/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@

use pulseengine_mcp_macros::{mcp_server, mcp_tools};
use pulseengine_mcp_server::McpServerBuilder;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct SayHelloParams {
/// The name to greet (optional)
pub name: Option<String>,
}

#[mcp_server(name = "Hello World")]
#[derive(Default, Clone)]
Expand All @@ -13,8 +21,8 @@ pub struct HelloWorld;
#[mcp_tools]
impl HelloWorld {
/// Say hello to someone
pub async fn say_hello(&self, name: Option<String>) -> anyhow::Result<String> {
let name = name.unwrap_or_else(|| "World".to_string());
pub async fn say_hello(&self, params: SayHelloParams) -> anyhow::Result<String> {
let name = params.name.unwrap_or_else(|| "World".to_string());
Ok(format!("Hello, {name}!"))
}
}
Expand Down
1 change: 1 addition & 0 deletions examples/test-tools-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"
pulseengine-mcp-macros = { path = "../../mcp-macros" }
pulseengine-mcp-server = { path = "../../mcp-server" }
pulseengine-mcp-protocol = { path = "../../mcp-protocol" }
schemars = { workspace = true }
tokio = { version = "1.0", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
2 changes: 2 additions & 0 deletions examples/ultra-simple/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ pulseengine-mcp-macros = { path = "../../mcp-macros" }
pulseengine-mcp-server = { path = "../../mcp-server" }
pulseengine-mcp-protocol = { path = "../../mcp-protocol" }
async-trait = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
schemars = { version = "1.0", features = ["derive"] }
tokio = { version = "1.0", features = ["full"] }
anyhow = "1.0"
32 changes: 23 additions & 9 deletions examples/ultra-simple/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@

use pulseengine_mcp_macros::{mcp_server, mcp_tools};
use pulseengine_mcp_server::McpServerBuilder;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct SayHelloParams {
/// The name to greet
pub name: String,
/// Optional greeting to use (defaults to "Hello")
pub greeting: Option<String>,
}

#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
pub struct AddParams {
/// First number
pub a: i32,
/// Second number
pub b: i32,
}

#[mcp_server(name = "Ultra Simple")]
#[derive(Default, Clone)]
Expand All @@ -12,18 +30,14 @@ pub struct UltraSimple;
#[mcp_tools]
impl UltraSimple {
/// Say hello to someone with customizable greeting
pub async fn say_hello(
&self,
name: String,
greeting: Option<String>,
) -> anyhow::Result<String> {
let greeting = greeting.unwrap_or_else(|| "Hello".to_string());
Ok(format!("{greeting}, {name}! πŸ‘‹"))
pub async fn say_hello(&self, params: SayHelloParams) -> anyhow::Result<String> {
let greeting = params.greeting.unwrap_or_else(|| "Hello".to_string());
Ok(format!("{greeting}, {}! πŸ‘‹", params.name))
}

/// Add two numbers together
pub fn add(&self, a: i32, b: i32) -> i32 {
a + b
pub fn add(&self, params: AddParams) -> i32 {
params.a + params.b
}

/// Get the answer to the ultimate question
Expand Down
Loading