Skip to content

Commit a8ab770

Browse files
committed
Comprehensive code quality and reliability improvements
- Fix panic-prone .unwrap() calls with proper error handling - Fix SystemTime unwraps with safe fallback (unwrap_or(0)) - Fix infinite retry loop in client.rs with transport tracking - Add exponential backoff for retries (100ms base, doubles each attempt) - Forward MCP notifications instead of silently dropping them - Add connection state tracking in multiplexing to avoid reconnecting - Add graceful shutdown handling (SIGTERM/SIGINT) in stdio_proxy - Mask bearer tokens in debug logs for security - Secure OAuth token storage with 0600 file permissions - Optimize Tokio features (specific vs "full") for smaller binary - Use static OnceLock regex to avoid recompilation - Support lowercase environment variables in config - Remove panicking Default implementations - Fix hardcoded response IDs to echo original request ID - Pre-allocate vectors and reduce excessive cloning - Store JoinHandle for spawned log task in server - Add OAuth discovery with dynamic client registration
1 parent 6a139eb commit a8ab770

File tree

20 files changed

+1649
-194
lines changed

20 files changed

+1649
-194
lines changed

Cargo.lock

Lines changed: 97 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ members = [
1111
resolver = "2"
1212

1313
[workspace.dependencies]
14-
tokio = { version = "1.0", features = ["full"] }
14+
tokio = { version = "1.0", features = ["rt-multi-thread", "io-std", "io-util", "net", "sync", "time", "macros", "process", "signal"] }
1515
serde = { version = "1.0", features = ["derive"] }
1616
serde_json = "1.0"
1717
thiserror = "1.0"

crates/mcp-client/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ oauth2 = { workspace = true }
2121
url = { workspace = true }
2222
uuid = { workspace = true }
2323
urlencoding = { workspace = true }
24+
sha2 = "0.10"
25+
rand = "0.8"
26+
open = "5.0"
27+
dirs = "5.0"
28+
md5 = "0.7"

0 commit comments

Comments
 (0)