CLI / MCP Server

The Storno CLI is a Model Context Protocol (MCP) server that exposes the full Storno.ro API as AI-callable tools. It lets you manage invoices, clients, payments, and e-invoice submissions through natural language in any MCP-compatible AI assistant.

Features

  • 228 tools covering the complete e-invoicing workflow
  • Works with Claude Code, Claude Desktop, Cursor, Windsurf, and any MCP client
  • Automatic JWT token refresh
  • Multi-company support with context switching
  • File uploads and binary downloads (PDF, XML, exports)

The fastest way to get started — no installation, no API keys. Storno hosts a public MCP server at https://mcp.storno.ro/mcp with OAuth authentication.

Visit mcp.storno.ro for setup instructions and a one-click "Add to Claude" button.

Claude (claude.ai)

  1. Copy the URL: https://mcp.storno.ro/mcp
  2. Go to claude.ai/settings/connectors
  3. Click "Add" and paste the URL
  4. Authorize via OAuth

Claude Code

claude mcp add storno --transport http https://mcp.storno.ro/mcp

Cursor / Windsurf

{
  "mcpServers": {
    "storno": {
      "url": "https://mcp.storno.ro/mcp"
    }
  }
}

Claude Desktop

{
  "mcpServers": {
    "storno": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.storno.ro/mcp"]
    }
  }
}

Self-hosted / Token-based Setup

For self-hosted Storno instances or if you prefer using JWT tokens directly.

Installation

npm install -g storno-cli

Requires Node.js 20 or later.

Configuration

The CLI uses environment variables for authentication and configuration:

VariableDefaultDescription
STORNO_BASE_URLhttps://api.storno.roAPI endpoint
STORNO_TOKENJWT access token
STORNO_REFRESH_TOKENRefresh token for automatic rotation
STORNO_COMPANY_IDDefault company UUID
STORNO_EMAILEmail for auto-login on startup
STORNO_PASSWORDPassword for auto-login on startup

Authentication methods

1. Pre-configured token (recommended for production):

Set STORNO_TOKEN and optionally STORNO_REFRESH_TOKEN. The server auto-refreshes expired tokens.

2. Auto-login on startup:

Set STORNO_EMAIL and STORNO_PASSWORD. The server authenticates automatically when it starts.

3. Interactive login:

Call the auth_login tool from your AI assistant with your credentials.

IDE Setup

Claude Code / Claude Desktop

Add to your MCP configuration (~/.claude/claude_desktop_config.json or project .mcp.json):

{
  "mcpServers": {
    "storno": {
      "command": "storno-cli",
      "env": {
        "STORNO_TOKEN": "your-jwt-token",
        "STORNO_COMPANY_ID": "company-uuid"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "storno": {
      "command": "storno-cli",
      "env": {
        "STORNO_TOKEN": "your-jwt-token",
        "STORNO_COMPANY_ID": "company-uuid"
      }
    }
  }
}

Windsurf

Add to your Windsurf MCP settings:

{
  "mcpServers": {
    "storno": {
      "command": "storno-cli",
      "env": {
        "STORNO_TOKEN": "your-jwt-token",
        "STORNO_COMPANY_ID": "company-uuid"
      }
    }
  }
}

Tool Categories

The 228 tools are organized into these categories:

Authentication (7 tools)

ToolDescription
auth_loginAuthenticate with email and password
auth_registerCreate a new user account
auth_refreshRotate expired JWT tokens
auth_meGet current user profile
auth_update_profileUpdate name, phone, timezone, password
auth_forgot_passwordRequest password reset email
auth_reset_passwordComplete password reset with token

Companies (8 tools)

ToolDescription
companies_listList all companies with e-invoice sync status
companies_getGet company details
companies_createCreate company via CIF lookup
companies_updateModify company settings
companies_deleteDelete company and all data
companies_upload_logoUpload company logo (PNG/JPG/SVG, max 2MB)
companies_delete_logoRemove company logo
companies_selectSet active company context for the session

Invoices (21 tools)

ToolDescription
invoices_listFilter by status, date, client with pagination
invoices_getFull invoice details with line items and payments
invoices_createCreate a draft invoice
invoices_updateEdit a draft invoice
invoices_deleteDelete a draft invoice
invoices_issueFinalize and generate UBL XML + PDF
invoices_submitSubmit to e-invoice provider
invoices_validatePre-flight UBL validation (quick or full)
invoices_cancelCancel with reason
invoices_restoreUndo cancellation
invoices_pdfDownload PDF (base64)
invoices_xmlDownload UBL 2.1 XML
invoices_emailSend invoice with attachments
invoices_email_defaultsGet pre-filled email subject/body
invoices_email_historyTrack delivery status
invoices_eventsTimeline of status changes
invoices_attachmentsDownload file attachments
invoices_paymentToggle paid/unpaid status
invoices_verify_signatureValidate ANAF digital signature
invoices_advance_paymentCreate advance/prepayment invoice
invoices_correct_invoiceIssue correction/debit note

Proforma Invoices (10 tools)

ToolDescription
proforma_invoices_listList draft quotes
proforma_invoices_getGet proforma details
proforma_invoices_createCreate a draft quote
proforma_invoices_updateModify a draft
proforma_invoices_sendEmail to client
proforma_invoices_acceptMark as accepted
proforma_invoices_rejectMark as rejected
proforma_invoices_convertConvert to regular invoice
proforma_invoices_deleteRemove draft
proforma_invoices_pdfDownload PDF

Recurring Invoices (7 tools)

ToolDescription
recurring_invoices_listList schedules
recurring_invoices_getSchedule details
recurring_invoices_createDefine recurrence (daily/weekly/monthly/yearly)
recurring_invoices_updateModify schedule
recurring_invoices_deleteDisable auto-generation
recurring_invoices_pauseTemporarily pause
recurring_invoices_resumeResume after pause

Delivery Notes (8 tools)

ToolDescription
delivery_notes_listTrack shipments
delivery_notes_getDelivery details
delivery_notes_createCreate shipping document
delivery_notes_updateModify draft
delivery_notes_issueFinalize delivery note
delivery_notes_deleteRemove draft
delivery_notes_pdfDownload PDF
delivery_notes_xmlDownload UBL XML

ANAF Integration (7 tools)

ToolDescription
anaf_statusCheck e-Factura token validity
anaf_tokensList ANAF OAuth tokens by CIF
anaf_create_token_linkGenerate device auth flow URL
anaf_delete_tokenRevoke token
anaf_validate_cifVerify token access for a CIF
anaf_sync_triggerManually trigger sync from ANAF SPV
anaf_sync_statusCheck last sync timestamp and counts

Webhooks (10 tools)

ToolDescription
webhooks_listList event subscribers
webhooks_getWebhook details
webhooks_createRegister endpoint with event types
webhooks_updateModify URL, events, active status
webhooks_deleteRemove webhook
webhooks_testSend test payload
webhooks_logsRecent delivery history
webhooks_regenerate_secretRotate signing secret
webhooks_retryRetry failed deliveries
webhooks_clear_logsClear old delivery logs

Other Tools

CategoryToolsDescription
Clients2List and get client details
Products2Product catalog management
Payments3Record and manage payments
ReceiptsReceipt (bon fiscal) management
Credit NotesCredit note operations
Suppliers4Supplier catalog
Bank Accounts4Bank account configuration
Document Series4Invoice number series
VAT Rates4VAT rate management
Email Templates4Email template customization
Exchange Rates2BNR currency conversion
API Keys5API key management with scopes
Members3Team management
Invitations4User invitations
Notifications4Notification preferences
Reports1VAT summary reports
Exports1Data export (CSV/Excel/JSON)
Dashboard1Revenue and invoice statistics
Admin3System administration
Licensing4License key management

Multi-Company Support

All company-scoped tools support three ways to set the company context:

  1. Environment variable — Set STORNO_COMPANY_ID at startup
  2. Runtime selection — Call companies_select with a company UUID
  3. Per-request override — Pass companyId as a parameter to any tool

Example Workflows

Create and email an invoice

You: "Create an invoice for Acme SRL, 10 hours of web development at 100 RON/hour, due in 30 days"

The AI will:
1. Call clients_list to find Acme SRL
2. Call invoices_create with the line items and due date
3. Call invoices_issue to finalize
4. Call invoices_email to send it

Check ANAF sync status

You: "What's our ANAF sync status?"

The AI will:
1. Call anaf_status to check token validity
2. Call anaf_sync_status to see last sync time and counts

Switch company context

You: "Switch to ABC Company"

The AI will:
1. Call companies_list to find the company
2. Call companies_select to set it as active

Generate a monthly report

You: "Show me a VAT summary for January 2026"

The AI will:
1. Call reports_vat with the date range
2. Present the summary with totals by VAT rate