AI agent integration
Use the DALP CLI with AI coding agents like Claude Code, OpenCode, and Codex for automated platform operations and development workflows.
The DALP CLI is designed to work seamlessly with AI coding agents. Its structured JSON output, Zod-validated inputs, and comprehensive command coverage make it an ideal tool for LLM-driven workflows in development environments.
Why use the CLI with AI agents?
AI coding agents excel at orchestrating multi-step platform operations:
- Token lifecycle automation – Create tokens, configure compliance, mint supply, and manage roles in a single conversation
- Bulk operations – Onboard hundreds of users, process batch transfers, or update compliance across all tokens
- Exploratory analysis – Query system state, cross-reference holders, and generate reports
- Development workflows – Deploy to staging, run smoke tests, and validate configuration
Supported agents
The DALP CLI works with any agent that can execute shell commands:
| Agent | How it uses the CLI |
|---|---|
| Claude Code | Bash tool executes dalp commands directly |
| Codex | Shell execution in sandboxed environments |
| OpenCode | Terminal tool runs CLI commands |
Setup for AI agents
1. Install and authenticate
npm install -g @settlemint/dalp-cli
dalp login --url https://your-platform.example.comThe agent inherits your authenticated session. Credentials persist across agent sessions.
2. Set JSON output
Configure JSON as the default format so agents can parse responses:
dalp config set format json3. Register MCP and skills
Register the CLI as an MCP server and install skill files in one step:
# Register as MCP server (auto-detects Claude Code, Cursor, etc.)
dalp mcp add
# Install skill files for agent discovery
dalp skills add
# Enable shell completions
dalp completionsOptionally, create a .dalprc.json in your project root so the CLI picks up project-specific settings:
{
"apiUrl": "https://your-platform.example.com",
"defaultOrg": "your-org",
"format": "json"
}MCP server integration
The DALP CLI has a built-in MCP (Model Context Protocol) server. When started with --mcp, it exposes every command as a typed tool that AI agents can call directly – no shell parsing required.
Automatic registration
The fastest way to register the MCP server with your agent:
dalp mcp addThis writes the correct configuration for detected agents (Claude Code, Cursor, etc.).
Manual configuration
If you prefer manual setup, add the MCP server to your agent's configuration:
Claude Code (.claude/mcp.json):
{
"mcpServers": {
"dalp": {
"command": "dalp",
"args": ["--mcp"],
"env": {
"DALP_URL": "https://your-platform.example.com"
}
}
}
}OpenCode:
{
"mcpServers": {
"dalp": {
"command": "dalp",
"args": ["--mcp"]
}
}
}When running as an MCP server, the CLI exposes each command as a typed tool with Zod-validated parameters. The agent sees tool descriptions, parameter types, and examples from the command metadata.
Skills integration
The CLI auto-generates skill files from command metadata (descriptions, examples, argument schemas). Install them for your agent:
dalp skills addThis creates Markdown skill files in ~/.config/agents/skills/ that agents like Claude Code discover automatically. Each skill documents the command's arguments, options, output schema, and usage examples.
You can also view the full skill manifest directly:
# Output Markdown skill docs for all commands
dalp --llms
# Output JSON Schema for all commands
dalp --schemaPatterns for agents
Idempotent operations
When agents retry operations, use list-before-create patterns:
# Check if token exists before creating
existing=$(dalp tokens list --query "My Token" --format json | jq 'length')
if [ "$existing" -eq 0 ]; then
dalp tokens create --type equity --name "My Token" --symbol MTK --decimals 18 --countryCode 840
fiError recovery
Agents should check exit codes and parse error messages:
# The CLI returns structured errors in JSON format
result=$(dalp tokens mint --address 0x... --to 0x... --amount 1000 --format json 2>&1) || {
echo "$result" | jq -r '.message'
# Agent can decide: retry, adjust amount, or escalate
}Progressive discovery
Agents can explore the platform systematically:
# 1. Discover system capabilities
dalp system factories available --format json
# 2. List existing tokens
dalp tokens list --format json
# 3. Inspect a specific token
dalp tokens read <address> --format json
# 4. Check holder balances
dalp users assets --wallet <wallet> --format jsonSecurity considerations
- Credential scope: The CLI authenticates as your user with your permissions. Agents inherit your access level.
- Organization isolation: Operations are scoped to the active organization. Use
dalp auth org-switchto change context. - Audit trail: All CLI operations are logged with
User-Agent: DALP CLI v{version}for traceability. - Read-before-write: Configure agents to query state before making mutations to prevent unintended changes.
Next steps
- Command reference – Full list of available commands
- Scripting – Shell scripting patterns and CI/CD integration
- API integration – Direct API access for custom integrations