Expand description
ICP canister integration for Icarus MCP servers
This crate provides the canister implementation details for running MCP servers on the Internet Computer.
Re-exports§
pub use auth::add_user;pub use auth::authenticate;pub use auth::get_auth_audit;pub use auth::get_auth_status;pub use auth::get_user;pub use auth::init_auth;pub use auth::list_users;pub use auth::remove_user;pub use auth::require_any_of_roles;pub use auth::require_exact_role;pub use auth::require_none_of_roles;pub use auth::require_role_or_higher;pub use auth::update_user_role;pub use auth::AuthAction;pub use auth::AuthAuditEntry;pub use auth::AuthInfo;pub use auth::AuthRole;pub use auth::User;pub use endpoints::get_owner as get_canister_owner;pub use endpoints::http_request;pub use endpoints::icarus_metadata;pub use endpoints::HttpRequest;pub use endpoints::HttpResponse;pub use lifecycle::init;pub use lifecycle::init_with_caller;pub use lifecycle::post_upgrade;pub use lifecycle::pre_upgrade;pub use stable_ext::StableBTreeMapExt;pub use stable_ext::StableCellExt;pub use state::assert_owner;pub use state::get_owner;pub use state::is_owner;pub use state::IcarusCanisterState;pub use storage::StableCounter;pub use storage::StableMap;
Modules§
- auth
- Authentication and authorization system for Icarus canisters
- auth_
tools - Authentication tool wrappers module
- easy_
storage - Simplified storage patterns for common use cases
- endpoints
- Canister endpoints for tool metadata discovery
- http
- HTTP Outcalls Module
- lifecycle
- Canister lifecycle hooks
- macros
- Macros for reducing boilerplate in ICP canisters
- memory
- Memory management for ICP stable storage
- prelude
- Comprehensive prelude for Icarus canister development
- result
- Common result types and error handling for Icarus canisters
- stable_
ext - Extension traits for stable structures
- state
- Canister state management
- storage
- Simplified stable storage utilities
- timers
- Timer Module for Autonomous Operations
- tools
- Tool registry and dispatch system
Macros§
- http_
get - Macro for simple GET requests
- http_
post_ json - Macro for POST requests with JSON
- icarus_
metadata - Macro to generate canister metadata function with auto-discovery syntax
- icarus_
storage - A simplified storage pattern that reduces boilerplate
- id_
generator - Helper macro to generate ID sequences
- init_
memory - Macro to initialize canister memory management
- memory_
id - Helper function to create a memory from a memory ID Use this in init_memory! macro for StableBTreeMap initialization
- register_
tools - Macro to generate tool registration code
- require_
admin - require_
auth - require_
owner - stable_
storage - Simplified macro to declare stable storage
- stable_
with - Helper macro to work with thread-local stable storage
- timer_
once - Macro for scheduling one-time tasks
- timer_
periodic - Macro for scheduling periodic tasks
- tool_
metadata - Macro to generate tool metadata function
Attribute Macros§
- icarus_
canister - Crate-level attribute macro that scans for all icarus_tool functions and generates the list_tools query function automatically.
- icarus_
module - Module-level attribute macro that collects all icarus_tool functions and generates the list_tools query function automatically.
- icarus_
tool - Attribute macro for individual tool methods Usage: #[icarus_tool(“Tool description”)]
Derive Macros§
- Icarus
Storable - Derive macro for ICP storable types
- Icarus
Storage - Derive macro for simplified storage declaration
- Icarus
Type - Derive macro for common Icarus type patterns