icarus-0.1.0 has been yanked.
Icarus SDK
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
use *;
use ;
use Serialize;
// Define your data structures
// Use stable storage for persistence
stable_storage!
// Define your tools with automatic metadata generation
// Export the Candid interface
export_candid!;
Installation
Add to your Cargo.toml:
[]
= "0.1"
= "0.16"
= "0.10"
= { = "1.0", = ["derive"] }
Project Structure
The SDK consists of three core crates:
icarus-core
Core traits and types for building MCP servers on ICP:
- Protocol types
- Error handling
- Session management
- Tool and resource abstractions
icarus-derive
Procedural macros that reduce boilerplate:
#[icarus_module]- Generates tool metadata and exports#[icarus_tool]- Marks functions as MCP tools#[derive(IcarusStorable)]- Enables stable storage
icarus-canister
ICP canister integration with stable memory:
stable_storage!macro for declaring persistent data- Memory management utilities
- State persistence helpers
Features
- ๐ง Simple Rust macros for MCP tools
- ๐พ Automatic state persistence with stable structures
- ๐ Global accessibility via ICP
- ๐ Blockchain-grade security
- ๐ Deploy once, run forever
- ๐งช PocketIC integration for testing
- ๐ฆ Zero-copy stable memory operations
How It Works
- Write Tools: Use
#[icarus_tool]to mark functions as MCP tools - Generate Metadata: The
#[icarus_module]macro creates aget_metadata()query - Deploy: Use the Icarus CLI to deploy your canister
- Bridge: The CLI's bridge translates between MCP and your canister
The generated canister is a standard ICP backend with no MCP awareness. All protocol translation happens in the bridge, keeping your code clean and testable.
Requirements
- Rust 1.75+
- dfx (ICP SDK) - via Icarus CLI
- wasm32-unknown-unknown target
Documentation
See the docs/ folder for:
- Getting Started Guide
- API Reference
- Best Practices
- Example Projects
License
Apache 2.0