Skip to content

feat: cargo-pmcp DX improvements and v1.9.4 release#155

Merged
guyernest merged 14 commits intopaiml:mainfrom
guyernest:fix/replace-eprintln-with-tracing
Jan 7, 2026
Merged

feat: cargo-pmcp DX improvements and v1.9.4 release#155
guyernest merged 14 commits intopaiml:mainfrom
guyernest:fix/replace-eprintln-with-tracing

Conversation

@guyernest
Copy link
Copy Markdown
Collaborator

@guyernest guyernest commented Jan 4, 2026

Summary

This PR includes several developer experience improvements to cargo-pmcp and bug fixes:

New Features

  • cargo pmcp test check - Quick sanity check command for MCP servers

    • Tests connectivity and JSON-RPC initialize handshake
    • Discovers server capabilities (tools, resources, prompts)
    • Smart transport mismatch detection with actionable hints
    • Verbose mode for debugging
  • OAuth DX improvements (--copy-from parameter)

    • Copy OAuth config from existing server for easy SSO setup
    • Sensible defaults for scopes and public clients
    • Improved help messages
  • Server version extraction for pmcp.run deployments

    • Uses cargo metadata for reliable version detection

Bug Fixes

  • Replace eprintln! with tracing for CloudWatch compatibility
  • Fix landing template repository URL (now uses paiml/rust-mcp-sdk)
  • Prevent git auth prompt hanging with GIT_TERMINAL_PROMPT=0
  • Improve JSON-RPC transport error handling in mcp-tester

Version

  • Bumped to v1.9.4

Test plan

  • All 1074 tests pass
  • Quality gate passes
  • cargo pmcp test check works with transport hint on mismatch
  • OAuth --copy-from parameter works
  • Landing init clones from correct repository

🤖 Generated with Claude Code

actions-user and others added 14 commits January 3, 2026 22:08
  TDG Score: 0.00
  Quality Gate: failing
  Complexity Violations: 0
  Technical Debt: 0h

  🤖 Generated with PMAT Quality Analysis

  Co-Authored-By: GitHub Action <noreply@github.com>
…ompatibility

Debug statements using eprintln! with pretty-printed JSON break CloudWatch
Logs Insights queries because each line becomes a separate log event.

Changes:
- streamable_http_server.rs: Replace 4 eprintln! calls with tracing::debug!
  using compact JSON serialization (target: mcp.http, mcp.sse)
- core.rs: Replace prompt metadata debug statements with structured
  tracing::debug! (target: mcp.prompts)
- mod.rs: Replace warning eprintln with tracing::warn! (target: mcp.auth)

Benefits:
- Single-line JSON-compatible logs for CloudWatch Logs Insights
- Structured metadata (trace_id, span_id, tool_name) as queryable fields
- Level-based filtering (only appears when RUST_LOG=debug)
- Target-based filtering (mcp.http, mcp.sse, mcp.prompts, mcp.auth)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
  TDG Score: 0.00
  Quality Gate: failing
  Complexity Violations: 0
  Technical Debt: 0h

  🤖 Generated with PMAT Quality Analysis

  Co-Authored-By: GitHub Action <noreply@github.com>
  TDG Score: 0.00
  Quality Gate: failing
  Complexity Violations: 0
  Technical Debt: 0h

  🤖 Generated with PMAT Quality Analysis

  Co-Authored-By: GitHub Action <noreply@github.com>
Major fixes for mcp-tester developer experience:

JSON-RPC Transport Fixes:
- Fix CallToolResult deserialization - was destroying JSON with format!(),
  now properly deserializes using serde_json::from_value()
- Fix request ID overflow - changed rand::random::<u64>() to u32 to stay
  within JavaScript's safe integer limit (2^53-1), fixing RequestId
  parsing errors for get_prompt and read_resource operations
- Add call_tool_raw() method returning full CallToolResult for scenario testing

Response Formatting:
- result field now contains clean text content instead of Rust debug format
- Unified HTTP and JSON-RPC handling in scenario executor - both now use
  same code path for content extraction and parsed field population

DX Improvements:
- Assertion failures now show "Expected:" and "Actual:" values
- JSON string auto-parsing populates parsed field for easier assertions
- Transport detection logging at info level
- Verbose mode dumps full JSON response for debugging

Version bumped to 0.2.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Automatically extract and include server version from Cargo.toml when
deploying to pmcp.run managed service.

Version extraction supports:
- Direct package version: [package] version = "1.0.0"
- Workspace root version: [workspace.package] version = "1.0.0"
- Workspace inheritance: version.workspace = true (walks up directories
  to find workspace root Cargo.toml)

The extracted version is displayed during deployment and passed to the
GraphQL API for deployment metadata tracking.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
  TDG Score: 0.00
  Quality Gate: failing
  Complexity Violations: 0
  Technical Debt: 0h

  🤖 Generated with PMAT Quality Analysis

  Co-Authored-By: GitHub Action <noreply@github.com>
…ults

Add developer experience improvements for OAuth configuration on pmcp.run:

- Add --copy-from parameter to copy OAuth config from existing server
  Enables simple SSO setup: `--copy-from advanced-mcp-course`
- Add sensible defaults for scopes and public client patterns
  Defaults: openid,email,mcp/read and claude,cursor,desktop,mcp-inspector,chatgpt
- Improve help messages with comprehensive documentation for all OAuth params
- Add resolve_oauth_config function with priority: explicit > copied > defaults

Before (complex):
  cargo pmcp deploy oauth enable --server my-server \
    --shared-pool us-east-1_xxx --dcr --scopes "openid,email,mcp/read" \
    --public-clients "claude,cursor,desktop,mcp-inspector,chatgpt"

After (simple):
  cargo pmcp deploy oauth enable --server my-server --copy-from other-server

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace manual TOML parsing with `cargo metadata` for extracting server
version during pmcp.run deployments. This properly handles all Cargo.toml
formats including workspace inheritance (`version.workspace = true`).

Benefits:
- Delegates complexity to cargo which knows all edge cases
- Simpler, more maintainable code
- Correctly resolves workspace-inherited versions

Also includes minor formatting fix in mcp-tester.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… checks

Add a new command for quickly verifying MCP server connectivity and compliance
without needing to create test scenarios first.

Features:
- Tests connectivity and JSON-RPC initialize handshake
- Discovers and lists server capabilities (tools, resources, prompts)
- Smart transport mismatch detection with actionable hints
- Verbose mode (--verbose) for debugging non-compliant servers
- Configurable timeout

Usage:
  cargo pmcp test check --url https://example.com/mcp
  cargo pmcp test check --url https://example.com/mcp --verbose
  cargo pmcp test check --url https://example.com/mcp --transport jsonrpc

When transport auto-detection fails, provides specific guidance:
  💡 Transport mismatch detected!
     → Try using JSON-RPC transport:
       cargo pmcp test check --url <url> --transport jsonrpc

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update template repository URL from pmcp-io to paiml organization
- Add GIT_TERMINAL_PROMPT=0 to prevent hanging on authentication prompts
- Provide helpful error message when git auth fails with workaround options

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
  TDG Score: 0.00
  Quality Gate: failing
  Complexity Violations: 0
  Technical Debt: 0h

  🤖 Generated with PMAT Quality Analysis

  Co-Authored-By: GitHub Action <noreply@github.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@guyernest guyernest changed the title fix: Replace eprintln! debug statements with tracing for CloudWatch compatibility feat: cargo-pmcp DX improvements and v1.9.4 release Jan 7, 2026
@guyernest guyernest merged commit 43407fd into paiml:main Jan 7, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants