hyperlane-plugin-mcp 23.3.2

A Model Context Protocol (MCP) Streamable HTTP server plugin for the Hyperlane framework with tool, resource, and prompt registries, session lifecycle management, DNS-rebinding Origin validation, and an opt-in ServerHook.
Documentation
//! hyperlane-plugin-mcp
//!
//! Model Context Protocol (MCP) Streamable HTTP server plugin for Hyperlane
//! with `XxHash3_64` tool/resource/prompt registries, sharded TTL session
//! management with high-entropy IDs, Origin validation, and an opt-in
//! [`ServerHook`].

mod r#const;
mod r#enum;
mod r#fn;
mod r#impl;
mod r#static;
mod r#struct;
mod r#type;

#[cfg(test)]
#[path = "../tests/mod.rs"]
mod tests;

pub use {r#const::*, r#enum::*, r#struct::*, r#type::*};

pub(crate) use {r#fn::*, r#static::*};

use std::{
    array::from_fn,
    borrow::Cow,
    collections::VecDeque,
    error::Error,
    fmt::{self, Display, Formatter},
    future::Future,
    pin::Pin,
    process,
    str::from_utf8,
    sync::{
        Arc, OnceLock, RwLock, RwLockReadGuard, RwLockWriteGuard,
        atomic::{AtomicU64, AtomicUsize, Ordering},
    },
    time::{Duration, Instant, SystemTime, UNIX_EPOCH},
};

use {
    hyperlane::{
        APPLICATION_JSON, CONTENT_TYPE, Context, HashMapXxHash3_64, HttpStatus, ORIGIN, Request,
        ResponseError, ServerHook, Status, Stream, hash_map_xx_hash3_64,
    },
    lombok_macros::*,
    serde::{
        Deserialize, Deserializer, Serialize,
        de::{self, IgnoredAny, MapAccess, SeqAccess, Visitor},
    },
    serde_json::{Map, Number, Value, from_slice, to_vec, to_writer},
};