{"id":15998049,"url":"https://github.com/DANP-LABS/DANP-Engine","last_synced_at":"2025-08-23T22:31:23.875Z","repository":{"id":234402275,"uuid":"788804121","full_name":"IceFireLabs/WASM-IPFS-Serverless","owner":"IceFireLabs","description":"WASM-IPFS-Serverless combines WebAssembly computing, IPFS storage and retrieval, and is a serverless framework for decentralized applications.","archived":false,"fork":false,"pushed_at":"2024-12-12T12:22:07.000Z","size":6724,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-15T05:41:46.109Z","etag":null,"topics":["decentralized-computing","filecoin","framework","ipfs","wasm"],"latest_commit_sha":null,"homepage":"https://wis.icefirelabs.xyz","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IceFireLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-19T05:47:26.000Z","updated_at":"2024-12-12T12:22:04.000Z","dependencies_parsed_at":"2024-04-28T10:29:14.694Z","dependency_job_id":"5eb5df33-e9c9-44ef-8e7d-c9d7eb368c64","html_url":"https://github.com/IceFireLabs/WASM-IPFS-Serverless","commit_stats":{"total_commits":46,"total_committers":3,"mean_commits":"15.333333333333334","dds":0.5652173913043479,"last_synced_commit":"f4f6e659604468d491f340224e1d97dbcc1ffdf2"},"previous_names":["blockcraftsman/wasm-ipfs-serverless"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceFireLabs%2FWASM-IPFS-Serverless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceFireLabs%2FWASM-IPFS-Serverless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceFireLabs%2FWASM-IPFS-Serverless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IceFireLabs%2FWASM-IPFS-Serverless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IceFireLabs","download_url":"https://codeload.github.com/IceFireLabs/WASM-IPFS-Serverless/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230744462,"owners_count":18273998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decentralized-computing","filecoin","framework","ipfs","wasm"],"created_at":"2024-10-08T08:06:48.048Z","updated_at":"2025-08-23T22:31:23.858Z","avatar_url":"https://github.com/IceFireLabs.png","language":"Go","funding_links":[],"categories":["📚 Projects (1974 total)"],"sub_categories":["MCP Servers"],"readme":"# DANP-Engine: Trusted AI MCP Runtime\n\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/DANP-LABS/DANP-Engine)\n![build](https://github.com/DANP-LABS/DANP-Engine/actions/workflows/build.yml/badge.svg)\n![test](https://github.com/DANP-LABS/DANP-Engine/actions/workflows/test.yml/badge.svg)\n\n**DANP-Engine** is a trusted runtime for AI Model Context Protocol (MCP), providing a secure execution environment for decentralized AI tools and services. Built on four foundational technologies:\n\n- **IPFS**: Decentralized storage for immutable WASM MCP AI tools modules\n- **WASM**: Portable, sandboxed execution of AI workloads\n- **AI MCP Server**: Hosts and manages registered AI tools\n- **AI MCP Client**: Provides standardized access to AI capabilities\n\nAs an AI MCP runtime, DANP-Engine enables:\n- Trusted execution of AI tools via WASM sandboxing\n- IPFS Decentralized Verifiable Storage WASM Tool for AI MCP Server\n- Standardized interfaces via MCP protocol\n\n---\n## System Architecture\n\n```mermaid\ngraph TD\n    %% DANP-Engine Architecture Diagram\n    DANP[DANP-Engine\\nTrusted AI MCP Runtime] --\u003e IPFS\n    DANP --\u003e WASM\n    DANP --\u003e MCPServer[AI MCP Server]\n    DANP --\u003e MCPClient[AI MCP Client]\n\n    %% IPFS Component\n    subgraph IPFS[IPFS Storage]\n        direction LR\n        ipfs_node1[IPFS Node]\n        ipfs_node2[IPFS Node]\n        ipfs_node3[IPFS Node]\n        ipfs_node1 \u003c--\u003e ipfs_node2\n        ipfs_node2 \u003c--\u003e ipfs_node3\n    end\n\n    %% WASM Component\n    subgraph WASM[WASM Runtime]\n        direction LR\n        wasm1[WASM Module]\n        wasm2[WASM Module]\n        wasm3[WASM Module]\n    end\n\n    %% MCP Server Component\n    subgraph MCPServer[AI MCP Server]\n        direction LR\n        server1[Server Node]\n        server2[Server Node]\n        server1 \u003c--\u003e server2\n    end\n\n    %% MCP Client Component\n    subgraph MCPClient[AI MCP Client]\n        direction LR\n        client1[Client]\n        client2[Client]\n        client3[Client]\n    end\n\n    %% Connections\n    IPFS --\u003e WASM\n    WASM --\u003e MCPServer\n    MCPServer --\u003e MCPClient\n\n    %% Styling\n    style DANP fill:#ffebee,stroke:#333,stroke-width:2px\n    style IPFS fill:#e3f9ff,stroke:#333\n    style WASM fill:#fff2e6,stroke:#333\n    style MCPServer fill:#e6ffe6,stroke:#333\n    style MCPClient fill:#f9e6ff,stroke:#333\n```\n\n\n## Core Components and Features\n\n### IPFS Integration Layer\n- **Decentralized Storage**: All WASM modules and AI tools are stored on IPFS with content addressing\n- **Immutable Artifacts**: Ensures tool integrity via cryptographic hashes\n- **Global Distribution**: Tools are available from any IPFS node worldwide\n\n### WASM Runtime Layer  \n- **Secure Sandboxing**: Isolates tool execution for safety\n- **Cross-platform**: Runs anywhere WASM is supported\n- **High Performance**: Near-native execution speed\n\n### AI MCP Server\n- **Tool Hosting**: Manages lifecycle of registered AI tools\n- **Discovery Service**: Enables tool lookup and metadata access  \n- **Execution Engine**: Runs WASM modules with resource controls\n\n### AI MCP Client  \n- **Standard Interface**: Uniform access to all registered tools\n- **Session Management**: Handles authentication and state\n- **Multi-client Support**: CLI, Web, and programmatic access\n\n\n## How It's Made\n\n**DANP-Engine** is built on four core components that work together to provide a trusted AI MCP runtime:\n\n### IPFS Integration\n- **Role**: Provides decentralized, immutable storage for WASM modules and AI tools\n- **Implementation**: \n  - Integrated IPFS nodes for distributed content addressing\n  - Uses Filecoin-Lassie for efficient IPFS file retrieval\n  - Supports IPFS Car file extraction via Filecoin-IPLD-Go-Car\n\n### WASM Runtime\n- **Role**: Executes trusted, portable code in a secure sandbox\n- **Implementation**:\n  - Leverages wazero for efficient WASM execution\n  - Uses Extism for WASM plugin management\n  - Supports both local and IPFS-hosted WASM modules\n\n### AI MCP Server\n- **Role**: Hosts and manages AI tools and services\n- **Implementation**:\n  - Built with Fiber for high-performance HTTP serving\n  - Provides tool registration and discovery\n  - Manages WASM module lifecycle and execution\n\n### AI MCP Client\n- **Role**: Interfaces with the MCP Server and provides user access\n- **Implementation**:\n  - Supports multiple client implementations (CLI, Web, etc.)\n  - Provides tool discovery and invocation\n  - Handles authentication and session management\n\n### Integrated Benefits\n- **Trusted Execution**: Combines IPFS immutability with WASM sandboxing\n- **Decentralized AI**: Enables distributed AI tool hosting and execution\n- **Interoperability**: Standard MCP protocol connects all components\n\n---\n\n## Quick Start\n\n### 1. Clone the Repository\n```bash\ngit clone https://github.com/DANP-LABS/DANP-Engine.git\ncd DANP-Engine\n```\n\n### 2. Configure Your Wallet\nThe MCP Server requires a Web3 wallet to operate. The wallet's private key is encrypted in a `wallet.json` file, which is protected by a password.\n\n**Set the Wallet Password**\n\nYou must provide this password to the server via the `WALLET_PASSWORD` environment variable.\n\nYou can set it directly in your terminal:\n```bash\nexport WALLET_PASSWORD=\"your-strong-password-here\"\n```\n\nAlternatively, you can create a `.env` file in the `cmd/DANP-MCP-SERVER/` directory. This file is ignored by Git, so your password will not be committed.\n\n**Example `cmd/DANP-MCP-SERVER/.env` file:**\n```\n# This password encrypts your wallet.json file.\n# Keep this password and your wallet file secure.\nWALLET_PASSWORD=\"your-strong-password-here\"\n```\nWhen the server starts for the first time, it will automatically generate a `config/wallet.json` file for you using this password. **Do not commit `config/wallet.json` to version control.**\n\n### 3. Build the Project\n\nThe project provides several Makefile targets for building and development:\n\n#### Basic Builds\n```bash\n# Build both client and server\nmake all\n\n# Build just the client\nmake build-client\n\n# Build just the server \nmake build-server\n```\n\n#### Cross-Compilation\n```bash\n# Build for all platforms (Linux, Windows, macOS, ARM)\nmake build-all\n\n# Platform-specific builds\nmake build-linux    # Linux amd64\nmake build-windows  # Windows amd64 (.exe)\nmake build-darwin   # macOS amd64  \nmake build-arm      # Linux ARM64\n```\n\n#### Development\n```bash\n# Run client directly (no build)\nmake run-client\n\n# Run server directly (no build)\nmake run-server\n\n# Clean build artifacts\nmake clean\n```\n\nBuild flags include version information:\n- `BuildVersion`: Short git commit hash\n- `BuildDate`: UTC timestamp of build\n\n### 3. Adjust Configuration File\n```yaml\n# MCP Server Manifest\nserver_config:\n  host: \"0.0.0.0\"\n  port: 18080\n  max_connections: 100\n  timeout: 30s\n\nipfs:\n  enable: true  # Set to true to enable IPFS support\n  lassie_net:\n    scheme: \"http\"  # http or https\n    host: \"127.0.0.1\"\n    port: 31999\n  cids: []  # Optional list of pre-loaded CIDs\n\nllm_config:\n  base_url: \"\"  # Optional base URL for API endpoints\n  provider: \"openai\"  # Default provider\n  openai:  # OpenAI-specific config\n    api_key: \"\"\n    model: \"gpt-4\"\n    temperature: 0.7\n    max_tokens: 2048\n  # Add other provider configs here as needed\n\n# Defines WASM modules and their exposed MCP tools\nmodules:\n  - name: \"hello\"\n    #wasm_path: \"file://config/hello.wasm\"  # Supports file:// or IPFS:// schemes\n    wasm_path: \"IPFS://QmeDsaLTc8dAfPrQ5duC4j5KqPdGbcinEo5htDqSgU8u8Z\"  # Supports file:// or IPFS:// schemes\n    tools:\n      - name: \"say_hello\"\n        description: \"Greet someone by name\"\n        inputs:\n          - name: \"name\"\n            type: \"string\"\n            required: true\n            description: \"Name to greet\"\n        outputs:\n          type: \"string\"\n          description: \"Greeting message\"\n\n```\n\n### 4. Load Configuration and Run MCP Server\n```bash\ngo run cmd/DANP-MCP-SERVER/main.go\n```\n\n### 5. Interact with MCP Server using Client\n```bash\ngo run cmd/DANP-MCP-CLIENT/main.go -http http://localhost:18080/\n```\n\n### 6. Example AI Interaction\n```bash\n# Server startup log showing WASM module loading from IPFS\n2025/06/29 14:06:10 Loading WASM module from IPFS CID: QmeDsaLTc8dAfPrQ5duC4j5KqPdGbcinEo5htDqSgU8u8Z\n2025/06/29 14:06:10 Successfully loaded WASM module: IPFS://QmeDsaLTc8dAfPrQ5duC4j5KqPdGbcinEo5htDqSgU8u8Z\n2025/06/29 14:06:10 Registering tool: say_hello\n2025/06/29 14:06:10 MCP server listening on 0.0.0.0:18080\n\n# Client interaction example\nEnter your request (empty line to submit, 'exit' to quit):\n\u003e Could you please greet my friend John for me?\n\u003e \n\nAI Response:\nI've greeted your friend John for you! Here's the message: \n\n👋 Hello John\n```\n\n---\n\n## Contributing\n\nWe welcome contributions from the community! To contribute to **DANP-Engine**:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature/your-feature`).\n3. Make your changes and commit them (`git commit -am 'Add new feature'`).\n4. Push your changes to the branch (`git push origin feature/your-feature`).\n5. Create a new Pull Request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDANP-LABS%2FDANP-Engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDANP-LABS%2FDANP-Engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDANP-LABS%2FDANP-Engine/lists"}