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.1"
# Or if you need individual crates:
# icarus-canister = "0.1.1"
# ic-cdk = "0.16"
# candid = "0.10"
# serde = { version = "1.0", features = ["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
Testing
The SDK includes a comprehensive test suite:
# Run all tests
# Run with coverage
# Install pre-commit hooks
# Run CI tests locally
See tests/README.md for more details.
License
โ ๏ธ IMPORTANT: This SDK is licensed under the Business Source License 1.1 (BSL-1.1), which is NOT an open source license.
Version Notice
- โ Version 0.1.0 was published in error and has been yanked - DO NOT USE
- โ Version 0.2.0+ is the official release under BSL-1.1
โ You CAN:
- Build and deploy MCP tools to Icarus Marketplace
- Modify the SDK for internal use
- Integrate with your applications that use Icarus
- Use for education and research
- Create commercial MCP tools using this SDK
โ You CANNOT:
- Create competing MCP marketplaces
- Redistribute the SDK or derivatives
- Remove signature verification
- White-label or rebrand the SDK
- Reverse engineer for competition
- Offer SDK as a service
- Bypass telemetry or usage reporting
๐ Security & Verification
This SDK includes:
- Cryptographic signature verification for authenticity
- Telemetry for service improvement and compliance
- Connection restrictions to official Icarus infrastructure
Tampering with these mechanisms violates the license and may result in legal action.
๐ Open Source Conversion
On January 1, 2029, this SDK automatically converts to Apache License 2.0.
๐ Legal
- See LICENSE for complete BSL-1.1 terms
- See NOTICE for important restrictions
- Commercial licenses available: licensing@icarus.dev
- Report violations: legal@icarus.dev
โข๏ธ Trademarks
"Icarus" and the Icarus logo are registered trademarks. Unauthorized use is prohibited.