# Daftra MCP MCP

> Daftra MCP connects your AI agent directly to a full-featured ERP system designed for MENA businesses. You can manage everything—from creating new clients and tracking inventory levels to generating professional invoices and monitoring cash balances—all through natural conversation. It acts as an accounting specialist, letting you run complex financial workflows without ever leaving your chat interface.

## Overview
- **Category:** crm
- **Price:** Free
- **Tags:** daftra, erp-api, invoicing-automation, mena-business, accounting-software, inventory-management, billing-system, treasury-monitoring, mcp

## Description

You're running a business in the Middle East or North Africa, and your accounting needs are complicated. This MCP takes control of that complexity. Instead of logging into multiple dashboards to track invoices, manage product stock, or check treasury balances, you just talk to it. Your AI agent becomes an expert financial coordinator for your company. You can programmatically create new client records, monitor payments in real-time, and get a full picture of your finances by asking simple questions. Because this MCP is hosted on Vinkius, you connect once from any compatible client—Claude, Cursor, or Windsurf—and immediately gain access to the entire suite of accounting tools. It's about treating your ERP like another chat app; no more manual deal logging or digging through complex tables.

## Tools

### create_client
Adds a new customer record to your database.

### create_invoice
Generates and records a new professional invoice for an existing client.

### create_product
Adds a brand-new item or service to your product catalog.

### get_account_info
Retrieves the overall details for your business account.

### get_invoice
Pulls up the full detail and status of a specific invoice number.

### list_staff
Retrieves a directory of all employees associated with the account.

### list_treasuries
Provides an overview and list of all current bank or cash accounts.

### list_clients
Shows a list of all clients you have on file.

### list_expenses
Retrieves a summary or detailed breakdown of business expenses.

### list_invoices
Lists multiple invoices, allowing you to check payment status across groups of bills.

### list_payments
Shows a record of recent payments received or processed.

### list_products
Lists every product and service available in your inventory catalog.

## Prompt Examples

**Prompt:** 
```
List all unpaid invoices in my account.
```

**Response:** 
```
I've retrieved your unpaid invoices. You have 3 pending payments, including Invoice #4501 for 'Ali Hassan' and #4502. Would you like the full item details for the largest invoice?
```

**Prompt:** 
```
Create a new client 'Ahmed Khalid' with email 'ahmed@example.com'.
```

**Response:** 
```
Client created! Ahmed Khalid has been added to your Daftra database (ID: cl_123). He is now available for invoicing and project assignments. Shall I create an initial invoice for him?
```

**Prompt:** 
```
Show me the current treasury balances.
```

**Response:** 
```
Accessing financial records... Your Main Cash account has $5,420.00 and the Business Bank account (ID: tr_456) shows $12,800.00. Both are in good standing. Need a summary of recent expenses?
```

## Capabilities

### Manage Customer Records
Create new client profiles and retrieve full histories for existing customers.

### Process Billing Documents
Generate professional invoices, track their status, and manage the associated line items.

### Track Company Assets
View your full product catalog, checking real-time stock levels for all inventory items.

### Monitor Financial Health
Access current treasury balances and list historical business expenses to maintain a clear financial overview.

### Review Client & Payment History
List all invoices and recent payments made against your accounts.

### Maintain Staff Directories
Retrieve directories of staff members and manage account-level personnel data.

## Use Cases

### Closing out a major client project
The operations manager needs to bill for services rendered. They ask the agent: 'Generate an invoice for Ahmed Khalid covering 10 units of Product X.' The agent uses `list_clients` first, then calls `create_invoice`, ensuring the correct customer ID and product metadata are attached.

### Auditing outstanding debts
An accountant needs to know which invoices haven't been paid. They ask: 'Show all unpaid bills.' The agent uses `list_invoices` and then filters the output, giving the accountant a clear list of IDs and amounts needing follow-up.

### Checking cash flow before payroll
A business owner asks: 'Do we have enough money for next week's payroll?' The agent calls `list_treasuries` to confirm the balance, then uses `get_account_info` for context, providing an immediate go/no-go answer.

### Adding a new service line
The sales team launches a new consulting service. Instead of logging into Daftra to create the item, they simply ask the agent: 'Add 'Consulting Package B' as a product.' The agent executes `create_product` and makes it immediately available for invoicing.

## Benefits

- Stop manually logging data. Your agent can take a list of outstanding debts and use the `list_invoices` tool to pull all necessary IDs, then use other tools to summarize who owes what—all without you needing to switch screens.
- Never lose track of inventory again. You can ask your agent for real-time stock levels using `list_products`, which is better than manually checking the product management tab and ensures your pricing data is current before creating an invoice.
- Financial oversight becomes conversational. Instead of navigating complex reports, you simply ask to see treasury balances by calling `list_treasuries`, getting instant confirmation on cash availability for payroll or investments.
- Client onboarding gets faster. Use the agent to handle full client creation via `create_client` and immediately follow up with a draft invoice using `create_invoice`, keeping both records linked instantly.
- Simplify compliance checks. You can use the MCP to pull lists of expenses (`list_expenses`) and compare them against account activity (`get_account_info`), making month-end closing much faster.

## How It Works

The bottom line is that you tell the AI what you need, and it handles connecting to Daftra and pulling the correct data back, automatically.

1. Subscribe to this MCP and grab your API Key from the Daftra dashboard settings.
2. Connect your AI client using your Subdomain credentials within Vinkius, linking your agent to the accounting system.
3. Ask your agent a question—like 'Show me all unpaid invoices for Q2'—and it executes the necessary calls and provides an immediate answer.

## Frequently Asked Questions

**How do I check if a client exists before billing them using create_invoice?**
You should use `list_clients` first to verify the client ID is current and accurate. This prevents failed calls when attempting to generate an invoice.

**What data can I get about my finances with list_treasuries?**
The `list_treasuries` tool provides a comprehensive overview of all your linked bank accounts or cash reserves, letting you see exactly how much money is available in each location.

**Can I update product details using create_product?**
While the primary function is to add new items via `create_product`, this tool allows you to manage and record updated metadata for your entire catalog, ensuring pricing accuracy on invoices.

**How do I track payments received using list_payments?**
The `list_payments` tool gives you a clear history of recent transactions. You can use this to verify if an invoice listed by `list_invoices` has been settled.

**What happens if I try to run list_clients too many times? Does the MCP handle rate limits?**
The system manages standard API throttling. If you need to pull massive amounts of client data, implement exponential backoff in your agent logic. This prevents hitting API caps and ensures reliable data retrieval.

**How do I verify my credentials or check account status using get_account_info?**
The MCP uses the subscription key you provide to authenticate every call. It verifies your active access level before returning any account details, confirming that your agent has the necessary permissions to proceed.

**If I use list_staff, does it show sensitive employee data based on my user role?**
No, the tool respects existing role-based security. Only users with administrative rights can see full staff directories or sensitive account metadata. The results reflect your current permission level.

**What format must I use when calling create_product to avoid errors?**
The API strictly enforces data integrity; it will reject the request and return a specific error message detailing which field is missing or invalid. Always check the required product schema before attempting creation.

**How do I find my Daftra API Key?**
Log in to your account, navigate to **Settings** > **API** > **API Keys**, and click **Add** to generate a new key.

**What is the subdomain in Daftra?**
The subdomain is the part of your Daftra URL before '.daftra.com'. For example, if you access at `acme.daftra.com`, your subdomain is `acme`.

**Can I create invoices with multiple items?**
Yes! The `create_invoice` tool accepts a JSON array of items, allowing you to specify names, unit prices, and quantities for each line.