Skip to main content

Build on SmartSupplySystem

Integration guides, code samples, and architecture documentation for engineers evaluating SmartSupplySystem. Everything you need to understand what integration looks like — before you write a line of code.

Architecture Overview

SmartSupplySystem is organized into three integration layers. Your application connects at whichever layer matches your architecture — embedded DLL for native integration, file-based exchange for RIP workflows, or REST API for cloud-connected systems.

No firmware changes required. Every integration point operates at the software level, using standard protocols your engineering team already knows: C++ libraries, CSV file exchange, OPC UA, REST APIs, and WebSockets.

All blockchain complexity is abstracted behind the Transaction Builder service. Your application never constructs, signs, or submits Solana transactions directly — the sponsored transaction model handles gas fees and signing server-side.

Integration Modules

Choose the integration method that fits your architecture.

ConsumableControl.dll

Available

Embedded DLL (C++ / .NET)

Embedded library for consumable verification, settlement, and transfer at point of use.

ConsumableControl.dll is the primary integration point for OEM printer firmware and RIP/DFE host applications. It provides a native API for verifying consumable authenticity, settling usage, and transferring tokens — all without requiring your application to interact with blockchain infrastructure directly.

Key Capabilities

  • Verify — Confirm a consumable token is authentic and matches the expected product definition before allowing use
  • Settle — Record consumable usage on-chain, transferring the token back to the main wallet on consumption
  • Transfer — Move token ownership between wallets (e.g., from distributor to end customer)
  • Sponsor Fallback — If the local signing wallet is unavailable, transactions route through the hosted Transaction Builder for sponsored signing

Integration Pattern

The DLL is deployed alongside your RIP or printer host application. It communicates with the SmartSupplySystem backend over HTTPS — no direct blockchain node access required.

cpp
// Verify a consumable before use
#include "ConsumableControl.h"

auto result = ConsumableControl::Verify(
    "TOKEN_ADDRESS",          // on-chain token address
    "INK_PRODUCT_DEF_ID"      // expected product definition
);

if (result.isAuthentic) {
    // Consumable verified — proceed with print job
    printf("Verified: %s\n", result.productName);
    printf("Remaining uses: %d\n", result.remainingUses);
} else {
    // Authentication failed — block or warn
    printf("Rejected: %s\n", result.rejectionReason);
}
cpp
// Settle a consumable after use
auto settlement = ConsumableControl::Settle(
    "TOKEN_ADDRESS",
    "JOB_ID",
    usageMetrics   // ink volume, media consumed, etc.
);

if (settlement.confirmed) {
    printf("Settlement TX: %s\n", settlement.transactionId);
}

Prerequisites

  • Windows 10+ or Linux (x64)
  • .NET 6.0 runtime or C++ 17 compatible compiler
  • Network access to SmartSupplySystem API endpoints
  • API key issued during pilot onboarding

RIP/Hot-Folder Integration

Available

CSV / Hot-Folder

File-based integration for RIP workflows using CSV exchange and hot-folder monitoring.

For RIP/DFE vendors that prefer file-based integration over embedded libraries, SmartSupplySystem supports a hot-folder workflow using structured CSV files. Your RIP drops a verification request into a watched folder; the system processes it and returns results to an output folder.

This pattern requires zero code changes to your RIP — only a file-system integration point that most production print workflows already support.

How It Works

1. Your RIP generates a CSV file with job and consumable data 2. The file is dropped into a monitored input folder 3. SmartSupplySystem validates each consumable token 4. Results are written to an output folder as a response CSV 5. Your RIP reads the response and proceeds (or blocks) accordingly

CSV Format — Verification Request

csv
JobID,TokenAddress,ProductDefID,Action,Timestamp
JOB-001,TOKEN_ABC123,INK-CYAN-001,VERIFY,2026-02-18T10:30:00Z
JOB-001,TOKEN_DEF456,INK-MAGENTA-001,VERIFY,2026-02-18T10:30:00Z
JOB-001,TOKEN_GHI789,MEDIA-GLOSS-A3,VERIFY,2026-02-18T10:30:01Z

CSV Format — Verification Response

csv
JobID,TokenAddress,Status,ProductName,RemainingUses,Message
JOB-001,TOKEN_ABC123,VERIFIED,Cyan Ink 500ml,847,Authentic
JOB-001,TOKEN_DEF456,REJECTED,,,Token expired
JOB-001,TOKEN_GHI789,VERIFIED,Gloss A3 Media,1200,Authentic

CSV Format — Settlement

csv
JobID,TokenAddress,ProductDefID,Action,Timestamp,InkVolumeML,MediaSheets
JOB-001,TOKEN_ABC123,INK-CYAN-001,CONSUME,2026-02-18T10:31:15Z,12.4,
JOB-001,TOKEN_GHI789,MEDIA-GLOSS-A3,CONSUME,2026-02-18T10:31:15Z,,50

Prerequisites

  • File system access to configure input/output folders
  • SmartSupplySystem agent service running on the same network
  • API key for authentication

SmartDFE Adapter

Beta

OPC UA

OPC UA protocol adapter for press gating, job verification, and automated settlement triggers.

The SmartDFE Adapter connects SmartSupplySystem to digital front-end controllers and press systems using the OPC UA industrial protocol. It enables real-time press gating — the press will not start a job until all consumables are verified authentic.

Key Capabilities

  • Press Gating — Block print execution until consumable verification completes
  • Job Verification — Automatically verify all consumables assigned to a job before the first impression
  • Settlement Triggers — Initiate on-chain settlement when a job completes, recording exact usage metrics
  • Event Streaming — Publish verification and settlement events to OPC UA subscribers

Integration Pattern

The adapter runs as an OPC UA server alongside your DFE. Your press controller connects as a client, reading verification status nodes and subscribing to settlement events.

text
OPC UA Node Structure:
├── SmartSupplySystem/
│   ├── Job/
│   │   ├── CurrentJobID          (String)
│   │   ├── VerificationStatus    (Enum: Pending|Verified|Rejected)
│   │   └── ConsumableCount       (Int32)
│   ├── Consumables/
│   │   ├── [0..n]/
│   │   │   ├── TokenAddress      (String)
│   │   │   ├── ProductName       (String)
│   │   │   ├── IsAuthentic       (Boolean)
│   │   │   └── RemainingUses     (Int32)
│   └── Settlement/
│       ├── LastTransactionID     (String)
│       └── LastSettlementTime    (DateTime)

Prerequisites

  • OPC UA compatible DFE or press controller
  • Network connectivity between DFE and SmartDFE adapter service
  • Pilot onboarding for adapter configuration

Transaction Builder

Available

REST API

Server-side transaction construction and sponsored signing — zero crypto exposure for operators.

The Transaction Builder is the backend service that abstracts all blockchain complexity from your integration. It constructs Solana transactions, handles signing through the sponsor wallet, and pays gas fees — so your operators never need a crypto wallet, tokens, or any blockchain knowledge.

Every other SmartSupplySystem module uses the Transaction Builder internally. When you call ConsumableControl::Verify() or drop a CSV into the hot folder, the Transaction Builder is handling the on-chain work behind the scenes.

Sponsored Transaction Model

In a traditional blockchain application, every user needs a wallet and tokens to pay transaction fees. SmartSupplySystem eliminates this requirement entirely:

1. Your application sends a structured request describing the operation (verify, settle, transfer) 2. The Transaction Builder constructs the appropriate Solana transaction 3. The sponsor wallet signs and pays all gas fees 4. The confirmed transaction hash is returned to your application

Your operators have zero crypto exposure. No wallets to manage, no tokens to purchase, no private keys to secure.

typescript
// Submit a sponsored transaction (no crypto wallet needed)
const response = await fetch('/api/v1/transactions/sponsor', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    type: 'consumable_verification',
    tokenAddress: 'TOKEN_ADDRESS',
    productDefId: 'INK_PRODUCT_DEF_ID',
    operatorId: 'OPERATOR_ID',
  }),
});

const result = await response.json();
// { transactionId: "5Kz9...", status: "confirmed", blockTime: 1708... }

Prerequisites

  • API key issued during pilot onboarding
  • HTTPS connectivity to SmartSupplySystem API
  • Operator IDs provisioned during setup

Mobile Scanner

Beta

WebSocket

Secure QR code scanning and verification via WebSocket pairing with print systems.

The Mobile Scanner app enables secure consumable verification using a smartphone camera. It pairs with your print system via WebSocket, scans QR codes on consumable labels, and relays verification results back to the host application in real time.

Pairing Protocol

The scanner pairs with a host application using a one-time pairing code. Once paired, all communication flows through an encrypted WebSocket channel.

1. Host application displays a pairing QR code (contains session ID and connection endpoint) 2. Mobile app scans the pairing code and establishes a WebSocket connection 3. Subsequent consumable QR scans are relayed through the paired channel 4. Verification results are pushed back to the mobile display and host simultaneously

text
Pairing Flow:

  Host Application              Mobile Scanner
       │                              │
       │──── Display Pairing QR ──────│
       │                              │
       │◄─── WebSocket Connect ───────│
       │     (session_id + auth)      │
       │                              │
       │──── Connection Confirmed ───►│
       │                              │
       │◄─── Consumable QR Scan ──────│
       │     (token_address)          │
       │                              │
       │──── Verification Result ────►│
       │     (authentic: true/false)  │
       │                              │

Security Model

  • Pairing codes are single-use and expire after 60 seconds
  • WebSocket connections are TLS-encrypted
  • Session tokens rotate on each reconnection
  • No consumable data is stored on the mobile device

Prerequisites

  • Mobile Scanner app (iOS/Android — provided during pilot)
  • Host application with WebSocket client support
  • Network connectivity between mobile device and host (same network or via relay)

MCP Integration

Available

MCP Protocol

Connect your AI assistant to 43 live tools for product definition, compilation, wallet management, and supply chain intelligence.

The SmartSupplySystem MCP server is a live, production service that exposes 43 tools across 12 categories. Connect any MCP-compatible AI assistant — Claude, ChatGPT, or any client that supports the Model Context Protocol — and your AI becomes the interface for creating product definitions, compiling blockchain-ready metadata, managing wallets, and querying supply chain analytics. No custom UI required. The AI is the editor.

What MCP Enables

Traditional product lifecycle management tools force you into form-based interfaces with rigid workflows. The SmartSupplySystem MCP server takes a different approach: your AI assistant connects directly to the product definition engine and works through conversation.

  • AI-Powered Product Definition — Create and refine consumable product definitions from natural language, specification documents, or technical data sheets. The AI understands your domain vocabulary and maps it to the correct field structure automatically.
  • 4-Pass Compilation — Validate definitions against structural rules, referential integrity checks, and business logic before compiling to blockchain-ready metadata. Errors surface as clear, actionable diagnostics — not cryptic codes.
  • Wallet Management — Generate Solana wallets, store encrypted mnemonics, and validate addresses without leaving the conversation. Wallets bind to compiled projects for on-chain deployment.
  • Supply Chain Intelligence — Query live event data across your portfolio. Track project status, lifecycle events, and aggregate statistics through conversational analytics.
  • Guided Workflows — Built-in prompts walk the AI through creating definitions from documents, fixing validation errors, and step-by-step guided creation for new users.

Connecting Your AI

Claude Desktop

Add this to your Claude Desktop MCP configuration (claude_desktop_config.json):

json
{
  "mcpServers": {
    "smartsupply": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://mcp.luciddream.com/mcp",
        "--header", "Authorization: Bearer YOUR_API_KEY"
      ]
    }
  }
}

Replace YOUR_API_KEY with an API key generated from your SmartSupplySystem account dashboard. Keys use the luc_sk_ prefix format.

ChatGPT

ChatGPT connects via OAuth 2.1. The SmartSupplySystem MCP server publishes a Protected Resource Metadata document at its well-known endpoint, and ChatGPT handles the authorization flow automatically. No API key configuration is needed — you authorize through your SmartSupplySystem account when prompted.

Other MCP Clients

Any client that supports the Model Context Protocol can connect to https://mcp.luciddream.com/mcp using either authentication method. API key authentication works with any client that can send an Authorization: Bearer header.

Tool Categories

The server exposes 43 tools organized into 12 categories. Each tool is a discrete operation your AI can call during conversation.

Template Tools (7)

Templates are working product definitions — the editable drafts you refine before compilation.

ToolDescription
create_templateCreate a new blank template
create_template_with_fieldsCreate a template pre-populated with fields
create_template_from_starterCreate from a starter template with guidance and defaults
get_templateRetrieve a template by ID
list_templatesList all templates in your organization
update_templateUpdate template metadata (name, description)
delete_templateRemove a template

Starter templates include field-level guidance (hints, importance ratings, display roles) that help the AI understand which fields matter most for a given product type. This guidance is stripped automatically at compile time.

Field Tools (5)

Fields are the individual data points within a template — everything from product name and SKU to viscosity and shelf life.

ToolDescription
add_fieldAdd a new field to a template
update_fieldModify an existing field's value, label, or type
remove_fieldDelete a field from a template
reorder_fieldsChange the display order of fields
replace_all_fieldsReplace the entire field array (bulk operation)

The compiler recognizes 48+ well-known fields with built-in validation rules. Custom fields are supported — the AI can add domain-specific properties beyond the standard set.

Compiler Tools (2)

The compiler is the core of the definition engine. It runs a 4-pass validation pipeline before generating output.

ToolDescription
validateRun all 4 validation passes and return diagnostics (read-only)
compileValidate, generate Display and Operational Profiles, and save as a compiled project

Validation passes cover structure (field shapes, types, vocabulary), referential integrity (unique keys, prompt references), business rules (cross-field consistency, conditional requirements), and warnings (missing optional fields, custom vocabulary usage). Only errors block compilation — warnings are advisory.

Wallet Tools (4)

Wallets are Solana keypairs that anchor compiled projects to the blockchain.

ToolDescription
generate_walletGenerate a new Solana wallet (BIP39 mnemonic + Ed25519 keypair)
validate_wallet_addressCheck if an address is a valid Solana public key
store_wallet_mnemonicEncrypt and store a mnemonic for a compiled project
retrieve_wallet_mnemonicDecrypt and retrieve a stored mnemonic

Wallet generation optionally auto-assigns the address to a template. Mnemonics are stored with AES-256-GCM encryption on the server.

Example Tools (1)

ToolDescription
search_examplesBrowse the example library with optional filters (supports source: "starter" for starter templates)

Examples are curated reference definitions that demonstrate best practices for different product types — UV inks, roll media, substrates, and more.

Builder Tools (9)

The Builder is a session-based workspace for interactive, multi-step product definition.

ToolDescription
connect_to_sessionConnect to an active builder session
read_sessionRead current session state and field values
write_fieldWrite a single field value
bulk_writeWrite multiple fields in one operation
delete_fieldRemove a field from the session
send_messageSend a message within the session context
validate_sessionRun validation against the current session state
suggest_fieldsGet AI-suggested fields based on current context
complete_sessionFinalize and close the builder session

Compile Session (1)

ToolDescription
compile_sessionBridge a builder session to the compiler, including an approval gate for brief-builder workflows

This tool connects the interactive builder workflow to the compilation pipeline, carrying session context through to the final compiled output.

Brief Tools (7)

The Brief is a structured intake workflow that captures product requirements before field-level editing begins.

ToolDescription
get_brief_stateRead the current brief state and progress
set_targetSet the target product type for the brief
set_slot_valueSet a value for a specific brief slot
acknowledge_documentsMark uploaded documents as reviewed
set_critical_fieldsSet fields flagged as critical for the product type
add_user_knowledgeAdd domain knowledge the AI should consider
generate_briefGenerate a complete brief from accumulated inputs

Project Tools (2)

Projects are compiled, finalized definitions ready for blockchain deployment.

ToolDescription
search_projectsSearch projects and templates by name, filter by type or status
get_project_detailRetrieve the full definition of a project or template by ID

Session Tools (1)

ToolDescription
start_sessionInitialize a workspace session — returns role context, available tools, and organization profile

This is typically the first tool your AI calls. It establishes the working context and returns information about your organization's configuration.

Org Tools (2)

ToolDescription
get_org_profileRead your organization profile (company name, resource directory)
update_org_profileUpdate company name and resource directory

The resource directory tells the AI about your organization's specific products and domain context, improving the quality of suggestions and field guidance.

Analytics Tools (4)

ToolDescription
get_portfolio_summaryHigh-level overview of your project portfolio
get_project_statusDetailed status for a specific project
get_lifecycle_eventsQuery lifecycle events for a project (transactions, settlements, usage)
aggregate_statsAggregate statistics across projects with flexible grouping

Supply Chain Intelligence

The four Analytics tools connect to the SmartSupplySystem event pipeline, which captures every significant action across the product lifecycle — from definition and compilation through wallet assignment, consumable settlement, and usage tracking.

These tools query live event data stored in the backend, not cached summaries. When a consumable is settled on-chain, the event propagates through the system and becomes queryable within seconds. Your AI can answer questions like:

  • "What is the current status of all projects in my portfolio?"
  • "Show me lifecycle events for the InkCor Cyan 500mL project from the last 30 days."
  • "Aggregate settlement volume across all ink products this quarter."

Supply Chain Intelligence is designed for operational visibility — understanding what is happening across your consumable supply chain without building custom dashboards or reports.

Windows Session 0 Service Architecture

SmartSupplySystem includes a Windows service — the SSS Gate Service — that runs in Session 0 and connects to production print systems via a hot-folder and CSV file watcher pattern. The Gate Service communicates with the desktop Inventory application over named pipes using the IPC v1.1 protocol, enabling real-time consumable tracking without requiring changes to printer firmware or RIP software.

This is the bridge between the blockchain authentication layer and the physical print production environment. When a print job consumes ink or media, the Gate Service detects the event, the Inventory application processes the spend transaction, and the settlement is recorded on-chain — all without operator intervention.

The MCP server sits upstream of this pipeline. Definitions compiled through your AI assistant flow through the Project Generator to the blockchain, where the Gate Service and Inventory application consume them during production.

Authentication

SmartSupplySystem supports two authentication methods for MCP connections:

API Keys (Claude Desktop and other MCP clients)

Generate API keys from the Connect page in your SmartSupplySystem dashboard. Keys use the luc_sk_ prefix followed by 32 characters. Pass the key in the Authorization: Bearer header. Keys are hashed at rest and scoped to your organization — all operations respect row-level security.

OAuth 2.1 (ChatGPT)

ChatGPT and other OAuth-capable clients authenticate through the standard OAuth 2.1 flow. The server issues Supabase JWTs verified via JWKS. No API key management is needed — authorization happens through your SmartSupplySystem account.

Both methods resolve to the same organization context. Your data is identical regardless of which AI client you use.

Getting Started

1. Create an account at [sss.luciddream.com](https://sss.luciddream.com) and complete onboarding. 2. Generate an API key from the Connect page in your dashboard. 3. Configure your AI client using the connection snippets above. 4. Call `start_session` — your AI will receive its role context, available tools, and your organization profile. 5. Create your first definition — try create_template_from_starter to begin with a guided starter template, or use the create_from_document prompt to import from a product data sheet. 6. Validate and compile — run validate to check for issues, then compile to produce blockchain-ready metadata with Display and Operational Profiles.

Resources

The MCP server exposes read-only resources that AI clients can reference during conversation. These provide the validation rules and reference data that guide the definition process.

ResourceContent
rules://vocabularyControlled value lists — product roles, units of measure, consumption models, field types
rules://field-rulesSingle-field validation rules for all 48+ well-known fields, including type constraints, required/optional status, and legacy mappings
rules://compiler-rulesCross-field validation rule descriptions (referential integrity, business logic)
example://{category}/{id}Example template definitions demonstrating best practices for different product types
template://{template_id}Read-only view of any template in your organization

The server also provides three guided prompts — create_from_document, review_and_fix, and guided_creation — that walk the AI through common workflows step by step.

Prerequisites

  • An MCP-compatible AI assistant (Claude Desktop, ChatGPT, or any Model Context Protocol client)
  • A SmartSupplySystem account with an active API key or OAuth authorization
  • Product specification data — CSV, JSON, technical data sheets, or plain-language descriptions

Getting Started

SmartSupplySystem integration starts with a pilot program. Here is the path from evaluation to production.

1

Start a Pilot Program

Complete the self-assessment to identify the right pilot tier for your integration scenario. We will scope the technical requirements together.

Take the Assessment
2

Receive Sandbox Access

During onboarding you receive API credentials, a sandbox environment with test tokens, and integration documentation specific to your chosen module.

3

Build Your Integration

Use the module guides above to integrate SmartSupplySystem into your existing workflow. Our engineering team is available for technical support throughout the pilot.

4

Validate and Go Live

Run verification and settlement cycles in the sandbox, confirm results against the analytics dashboard, then migrate to production with our support.

Ready to Integrate?

Start with a 90-day pilot program. We provide sandbox access, integration support, and a dedicated technical contact to get your first authenticated consumable verification running.

David Lewis, CEO david@luciddream.com