Expand description
§Icarus SDK - Licensed under BSL-1.1
NOTICE: This SDK includes signature verification and telemetry. Tampering with these mechanisms violates the license agreement. See LICENSE and NOTICE files for complete terms.
Build MCP (Model Context Protocol) servers that run as Internet Computer canisters.
§Overview
Icarus SDK enables developers to create persistent AI tools by combining:
- MCP: The Model Context Protocol for AI assistant tools
- ICP: The Internet Computer’s blockchain-based compute platform
Write your MCP servers in Rust, deploy them to ICP, and they run forever with built-in persistence.
§Quick Start
ⓘ
// This example requires IC-specific dependencies and procedural macros that aren't available in doc tests
use icarus::prelude::*;
use candid::{CandidType, Deserialize};
use serde::Serialize;
// Define your data structures
#[derive(Debug, Clone, Serialize, Deserialize, CandidType)]
pub struct MemoryEntry {
id: String,
content: String,
created_at: u64,
}
// Define your tools with automatic metadata generation
#[icarus_module]
mod tools {
use super::*;
#[update]
#[icarus_tool("Store a new memory")]
pub fn memorize(content: String) -> Result<String, String> {
Ok(format!("Stored: {}", content))
}
}
Re-exports§
pub use icarus_derive as derive;
pub use icarus_canister as canister;
Modules§
- prelude
- Prelude module for convenient imports
Attribute Macros§
- 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”)]