Skip to content

chrono is flagged unmaintained (RUSTSEC-2026-0543): any plan to move to jiff/time or make it optional? #1469

Open

Description

@Aiddy81

RustSec published RUSTSEC-2026-0543 on 2026-09-14, an informational unmaintained advisory saying all versions of chrono are affected and there is no patched version. The advisory suggests jiff or time instead.

rmcp (3.10.0) depends on chrono unconditionally, for timestamps in the model types (annotations, tasks, progress, the session store). It also enables schemars's chrono04 feature, so every downstream project that runs cargo deny check advisories (or cargo audit with unmaintained warnings denied) now fails, and has to add an ignore entry.

Questions:

  1. Is there a plan to replace chrono (with jiff or time), or to put it behind a feature flag?
  2. Since the timestamps are in the public model types, would this wait for the next major version, or could it go in a minor release by keeping the wire format (RFC 3339 strings) the same?

We've added a scoped ignore in our project for now, and we're happy to test a branch. Thanks for maintaining the SDK.

(Issue drafted with AI assistance and reviewed before posting.)

Activity

  1. added
    enhancement
    P2
    T-dependencies
    T-model
    on Nov 17, 2026
  2. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor

    @michaelneale is on triage rotation this week and is the reviewer for this one.

    Codex labeled this enhancement / P2 (T-dependencies, T-model). Please confirm or correct those labels.

    Automated triage. Labels are a first pass and the assigned maintainer has the final say.

  3. Eli-Goldberg commented on Nov 17, 2026

    @Eli-Goldberg

    Came here for this, for us this is high priority

  4. tirish commented on Nov 17, 2026

    @tirish

    We hit this too: cargo deny check advisories now fails in two downstream projects through rmcp (and schemars's chrono04 feature), and we carry a time-boxed ignore for RUSTSEC-2026-0543 until there is a fix. A chrono feature (on by default, so nothing breaks) or a move to jiff would let us remove the ignore.

  5. andreinknv commented on Nov 17, 2026

    @andreinknv

    On main (3.11.0), chrono is no longer in any model type: Annotations.last_modified is already a String. What remains is:

    • three internal uses: task_manager::current_timestamp() (to_rfc3339), the requestState clock (timestamp_millis) and the ServiceError::Timeout message (chrono::Duration's Display);
    • two builders that take chrono::DateTime<Utc>: Annotations::for_resource and Annotations::with_timestamp;
    • schemars' chrono04 feature, which no rmcp type needs any more.

    That makes a non-breaking minor release possible. I have a working branch that does this (branch chrono-optional, one commit on main):

    • the internal uses move to jiff 1 (default-features = false, features = ["std"]), with small helpers that keep the exact previous text: +00:00 offset, 0/3/6/9 fractional digits, and PT30S / PT1.5S / P0D in the timeout message. Tests pin these against chrono's output.
    • a new default feature chrono keeps the two builders and schemars?/chrono04, so nothing changes with default features.
    • with default-features = false, chrono drops out for every feature except auth*, which still pulls it in through oauth2 5.

    Checks on the branch:

    • nightly fmt;
    • clippy -D warnings with all features, with all features except local, and with 8 smaller feature sets, including none;
    • cargo test --all-features (1213 passed) and --lib --no-default-features (208 passed);
    • cargo semver-checks for both CI feature sets ("no semver update required");
    • nightly docs with --cfg docsrs -Dwarnings;
    • cargo +1.88.0 check --all-targets --all-features.

    A later major release could then remove chrono from the default features. If this direction works for you, I can open the PR. I'm happy to rename the feature or adjust the approach.

    AI assistance: I used an AI coding assistant (Claude Code) to write most of this change and draft this text; I reviewed and tested it.

    🤖 Generated with Claude Code

  6. Aiddy81 commented on Nov 18, 2026

    @Aiddy81
    Author

    Thanks @andreinknv. This direction works for us. Downstream result from patching rmcp and rmcp-macros to a95b804 (chrono-optional) in our project:

    • Our feature set: default-features = false, server, macros, transport-io, transport-streamable-http-server (no auth*). Our own schemars = "1" doesn't enable chrono04.
    • cargo tree -i chrono finds no match, so chrono is gone from the whole workspace.
    • cargo deny check advisories passes without our RUSTSEC-2026-0543 ignore.
    • Our MCP server and CLI tests (stdio and Streamable HTTP, 92 tests) all pass with no code changes on our side.

    So a minor release with this would let us drop the ignore entirely. +1 for opening the PR.

    (Tested and posted with AI assistance.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2T-dependenciesT-modelenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions