🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@dcprotocol/server

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dcprotocol/server

REST API server for DCP Vault - localhost:8420

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

@dcprotocol/server

Local REST API + approval UI for DCP Vault. Binds to 127.0.0.1 only.

Use this when:

  • You want browser‑based approvals
  • Your agent runtime can’t spawn MCP subprocesses
  • You need a local HTTP interface
  • You want to connect a local vault to the default public relay or your own relay for remote agents

Install

npm install @dcprotocol/server

On Debian/Ubuntu, local keychain-backed usage may require libsecret-1-0.

Run

npx -y @dcprotocol/server

Open:

http://127.0.0.1:8420

Environment Variables

VariablePurposeDefault
VAULT_DIRVault storage directory~/.dcp
VAULT_PORTServer port8420
DCP_RELAY_URLRelay URL for remote agent accessunset
DCP_MCP_SESSION_MINUTESMCP auto‑unlock window after UI unlock30

If DCP_RELAY_URL is set, the server will connect the local vault to that relay after startup/unlock.

Use wss://relay.dcp.1ly.store if you want the default public relay run by the DCP maintainers, or set your own relay URL instead.

Unlock / Lock

Unlock the REST process:

curl -X POST http://127.0.0.1:8420/v1/vault/unlock \
  -H "Content-Type: application/json" \
  -d '{"passphrase":"<your-passphrase>"}'

Lock:

curl -X POST http://127.0.0.1:8420/v1/vault/lock

Unlock MCP via the UI or:

curl -X POST http://127.0.0.1:8420/v1/vault/unlock-mcp \
  -H "Content-Type: application/json" \
  -d '{"passphrase":"<your-passphrase>"}'

Unlock‑MCP uses the OS keychain; the passphrase is never written to disk.

Read / Sign (REST)

curl -X POST http://127.0.0.1:8420/v1/vault/read \
  -H "Content-Type: application/json" \
  -d '{"scope":"identity.email","agent_name":"my-bot"}'

curl -X POST http://127.0.0.1:8420/v1/vault/sign \
  -H "Content-Type: application/json" \
  -d '{"chain":"solana","unsigned_tx":"<base64>","agent_name":"my-bot"}'

Endpoints

Browser UI

  • GET / — local approval UI (dark/light toggle, auto‑refresh)

Core

  • GET /health
  • GET /scopes
  • GET /address/:chain
  • GET /budget/check (requires chain for USDC/USDT)
  • GET /agents
  • GET /consent
  • POST /consent/:id/approve
  • POST /consent/:id/deny
  • POST /revoke/:agent

v1

  • POST /v1/vault/read
  • POST /v1/vault/sign
  • GET /v1/vault/activity (supports limit, agent, type, since)
  • POST /v1/vault/unlock
  • POST /v1/vault/lock
  • POST /v1/vault/agents/:id/revoke
  • GET /v1/vault/mcp-status

Owner / relay

  • GET /v1/relay/info
  • POST /v1/relay/config
  • POST /v1/pairing/start
  • GET /v1/services
  • POST /v1/services
  • PATCH /v1/services/:id
  • DELETE /v1/services/:id

Remote Agent Flow

This package is the local vault side of the relay flow:

  • Start the server locally
  • Set a relay URL
  • Create a pairing token or trust a service
  • Let a remote agent connect through @dcprotocol/client or the DCP proxy
  • Approve consent locally when required

For the full end-user flow, see the root README and the desktop package README.

Docs: see the root README for the full security model.

Keywords

vault

FAQs

Package last updated on 18 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts