@elyonar/einvoice-mcp
v0.1.4
Published
MCP server for the E-Invoice platform — invoices, sellers, buyers, and billing
Maintainers
Readme
@elyonar/einvoice-mcp
MCP (Model Context Protocol) server for the E-Invoice platform. Enables AI agents like Claude to manage invoices, sellers, buyers, and billing through a tax-authority-compliant e-invoicing system.
Quick Start
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"einvoice": {
"command": "npx",
"args": ["-y", "@elyonar/einvoice-mcp"],
"env": {
"EINVOICE_API_KEY": "sk_live_your_key_here",
"EINVOICE_BASE_URL": "https://api.einvoice.ng"
}
}
}
}Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| EINVOICE_API_KEY | Yes | API key (sk_live_... or sk_test_...) |
| EINVOICE_BASE_URL | No | API gateway URL (default: https://api.einvoice.ng) |
| EINVOICE_REQUEST_TIMEOUT | No | Request timeout in ms (default: 30000) |
| EINVOICE_RETRY_ATTEMPTS | No | Max retries for failed requests (default: 3) |
Available Tools (41)
Invoice Tools (15)
create_invoice— Create a new invoice in draft statusget_invoice— Get invoice details by IDlist_invoices— List/filter/search invoicesupdate_invoice— Update a draft invoicedelete_invoice— Delete a draft invoicesubmit_invoice— Submit to tax authoritybatch_submit_invoices— Batch submit multiple invoicesretry_invoice_submission— Retry a failed submissioncancel_invoice— Cancel an accepted invoice (creates credit note)get_invoice_status— Get status from local DBquery_invoice_status— Query tax authority for real-time statusvalidate_invoice— Validate without creatingdownload_invoice— Get PDF/XML download URLget_invoice_statistics— Analytics and metricsget_invoice_setup— Reference data for invoice creation
Seller Tools (7)
create_seller— Register a new sellerget_seller— Get seller detailslist_sellers— List/search sellersupdate_seller— Update seller (tax number immutable)delete_seller— Delete seller (no invoices)verify_seller_tax_no— Trigger tax number verificationget_seller_tax_verification_status— Check tax verification status
Buyer Tools (7)
create_buyer— Register a new buyerget_buyer— Get buyer detailslist_buyers— List/search buyersupdate_buyer— Update buyer (tax number immutable)delete_buyer— Delete buyer (no invoices)verify_buyer_tax_no— Trigger tax number verificationget_buyer_tax_verification_status— Check tax verification status
Billing Tools (12)
get_billing_account— Credit balance and account statuscheck_balance— Verify sufficient credits before operationsget_billing_setup— Full billing overviewget_subscription_plans— Available subscription plansget_credit_packages— Available credit packages for purchaseget_active_subscription— Current subscription detailsget_subscription_history— Past subscriptionspurchase_credits— Buy a credit package (returns checkout URL)get_payment_history— Payment transaction historyget_transaction_history— Credit ledger (purchases, consumption, refunds)get_usage_analytics— Submission counts, credit usage, daily breakdownget_consumption_breakdown— Credit usage by API endpoint
Development
npm install
npm run build
npm test
npm run dev # run with tsx (hot reload)Architecture
src/
├── index.ts # MCP server entry point (stdio transport)
├── client/
│ ├── http-client.ts # HTTP client with auth, retry, rate limiting
│ ├── invoice-client.ts # Invoice service API client
│ └── billing-client.ts # Billing service API client
├── tools/
│ ├── invoice-tools.ts # 15 invoice tool definitions + handlers
│ ├── seller-tools.ts # 7 seller tool definitions + handlers
│ ├── buyer-tools.ts # 7 buyer tool definitions + handlers
│ └── billing-tools.ts # 12 billing tool definitions + handlers
├── types/
│ ├── invoice.ts # Invoice/seller/buyer types
│ └── billing.ts # Billing/subscription/payment types
└── utils/
└── format.ts # Response formatting utilitiesVersioning
This project follows Semantic Versioning with Conventional Commits.
npm run release # auto-bump based on commits
npm run release:patch # 0.1.0 → 0.1.1
npm run release:minor # 0.1.0 → 0.2.0
npm run release:major # 0.1.0 → 1.0.0Contributing
See CONTRIBUTING.md for commit conventions, branching strategy, and how to add new tools.
