Packages Overview

DCP consists of 8 packages, each designed for a specific use case. This guide helps you understand which packages you need.

Package Architecture

┌─────────────────────────────────────────────────┐
│              END USER LAYER                      │
│  ┌──────────────┐      ┌──────────────────────┐ │
│  │  Desktop App │      │  CLI                 │ │
│  └──────────────┘      └──────────────────────┘ │
└─────────────────────────────────────────────────┘
                     │
┌─────────────────────────────────────────────────┐
│           INTEGRATION LAYER                      │
│  ┌──────┐  ┌────────┐  ┌────────────────────┐  │
│  │ MCP  │  │ Server │  │ Client SDK         │  │
│  └──────┘  └────────┘  └────────────────────┘  │
└─────────────────────────────────────────────────┘
                     │
┌─────────────────────────────────────────────────┐
│         INFRASTRUCTURE LAYER                     │
│  ┌─────────┐              ┌──────────────────┐  │
│  │ Proxy   │──── WSS ────▶│ Relay Server     │  │
│  └─────────┘              └──────────────────┘  │
└─────────────────────────────────────────────────┘
                     │
┌─────────────────────────────────────────────────┐
│              CORE LAYER                          │
│         ┌────────────────────┐                   │
│         │  @dcprotocol/core  │                   │
│         └────────────────────┘                   │
└─────────────────────────────────────────────────┘

Quick Decision Guide

I want to...Use this package
Manage vault manually (GUI)@dcprotocol/desktop
Manage vault from terminal@dcprotocol/cli
Integrate with Claude Desktop@dcprotocol/mcp
Build custom agent (local)@dcprotocol/client
Run agent on VPS@dcprotocol/proxy
Self-host relay server@dcprotocol/relay

Package Details

@dcprotocol/core

Category: Foundation
When to use: Building custom implementations or understanding DCP internals

The cryptographic heart of DCP. Handles encryption, wallet management, storage, and budget enforcement.

Key features:

  • XChaCha20-Poly1305 encryption engine
  • Argon2id key derivation
  • Wallet generation (Solana, Ethereum, Base)
  • Transaction signing (never exposes keys)
  • SQLite storage with envelope encryption
npm install @dcprotocol/core

View detailed documentation →


@dcprotocol/cli

Category: Human Interface
When to use: Vault setup, management, and scripting automation

Command-line interface for vault management. For operators and power users.

Key commands:

  • dcp init - Create vault
  • dcp create-wallet - Generate wallets
  • dcp add/read - Store/retrieve data
  • dcp pairing - Generate VPS tokens
  • dcp activity - View audit log
npm install -g @dcprotocol/cli

View detailed documentation →


@dcprotocol/server

Category: Local API
When to use: Local agents that need HTTP access (non-MCP frameworks)

Fastify-based REST server running on localhost:8420. Provides HTTP interface for local agents.

Key features:

  • REST API endpoints (localhost only)
  • Browser-based consent UI
  • WebSocket support for real-time updates
  • Desktop app integration
npm install @dcprotocol/server

View detailed documentation →


@dcprotocol/mcp

Category: AI Integration
When to use: Integrating with Claude Desktop, Cursor, or MCP-compatible tools

Model Context Protocol server for Claude Desktop, Cursor, and other MCP clients.

Available tools:

  • vault_get_address - Get wallet addresses
  • vault_sign_tx - Sign transactions
  • vault_read - Read stored data
  • vault_budget_check - Check spending limits
npm install @dcprotocol/mcp

View detailed documentation →


@dcprotocol/client

Category: Agent SDK
When to use: Building custom agents or integrating DCP into existing codebases

TypeScript SDK for integrating DCP into any agent. Supports local and relay modes with auto-detection.

Key methods:

  • getAddress() - Get wallet addresses
  • signTx() - Sign transactions
  • readCredential() - Read stored data
  • budgetCheck() - Verify spending limits
npm install @dcprotocol/client

View detailed documentation →


@dcprotocol/proxy

Category: Remote Access
When to use: Running agents on VPS/cloud servers that need vault access

Lightweight VPS proxy. Creates a local DCP endpoint on remote servers that forwards to your vault via relay.

Key features:

  • Single-command setup on VPS
  • Pairing token authentication
  • HPKE end-to-end encryption
  • No key material on VPS
npm install @dcprotocol/proxy

View detailed documentation →


@dcprotocol/relay

Category: Infrastructure
When to use: Self-hosting the relay instead of using the public one

WebSocket relay server for remote vault access. Self-host or use the public relay at relay.dcp.1ly.store.

Key features:

  • WebSocket + HTTP long-polling
  • HPKE encryption (transport-only)
  • Rate limiting (60 req/min per vault)
  • No plaintext access to vault data
npm install @dcprotocol/relay

View detailed documentation →


@dcprotocol/desktop

Category: End User
When to use: You want a GUI instead of CLI

Cross-platform desktop app built with Tauri + React. Visual vault management for non-technical users.

Key features:

  • Visual wallet management
  • GUI consent popups
  • VPS pairing token generator
  • Activity dashboard

View detailed documentation →

Download from GitHub releases →


Common Integration Patterns

Pattern 1: Local Development

┌──────────────┐
│ Your Agent   │ (TypeScript/Python/etc)
└──────┬───────┘
       │ HTTP
       ▼
┌──────────────────────┐
│ @dcprotocol/server   │ localhost:8420
└──────┬───────────────┘
       │
       ▼
┌──────────────────────┐
│ @dcprotocol/core     │ SQLite vault
└──────────────────────┘

Pattern 2: MCP Integration

┌──────────────────┐
│ Claude Desktop   │
└──────┬───────────┘
       │ MCP (stdio)
       ▼
┌──────────────────────┐
│ @dcprotocol/mcp      │
└──────┬───────────────┘
       │
       ▼
┌──────────────────────┐
│ @dcprotocol/core     │ SQLite vault
└──────────────────────┘

Pattern 3: Remote VPS Agent

VPS:                      YOUR MACHINE:
┌──────────────┐          ┌──────────────────┐
│ Your Agent   │          │ DCP Vault        │
└──────┬───────┘          └────────▲─────────┘
       │                           │
       ▼                           │
┌──────────────────┐               │
│ @dcprotocol/     │               │
│ proxy            │               │
└──────┬───────────┘               │
       │                           │
       └───────────────────────────┘
          Via Relay (WSS)

Need Help Choosing?

Still unsure which package to use? Check the detailed documentation for each package or ask in Discord.