Meftah - The Best Accounting Software

AboutBlogsSign inالعربيةBook a Demo
Meftah - The Best Accounting Software
  • About Meftah
  • Jobs
  • Blogs
  • Privacy Policy
  • Terms of Use

© 2026 Meftah, All Rights Reserved

Back to articles

Using Meftah MCP with AI Assistants

Meftah

Meftah

Published on May 30, 2026

|blogs
Using Meftah MCP with AI Assistants

This tutorial explains how to connect the Meftah MCP server to AI assistants and use it to work with customers, products, taxes, and invoices. It includes general MCP usage plus specific guidance for Claude and ChatGPT.

What Is Meftah MCP?

Meftah MCP is a Model Context Protocol server that lets an AI assistant call Meftah business tools on your behalf. After you connect your Meftah account, the assistant can search data, create records, update invoices, and send invoices through Meftah.

The Cloudflare Worker exposes these endpoints:

  • MCP endpoint: https://mcp.meftah.app/mcp
  • OAuth authorization metadata: https://mcp.meftah.app/.well-known/oauth-authorization-server
  • OAuth protected resource metadata: https://mcp.meftah.app/.well-known/oauth-protected-resource

When an assistant connects, Meftah MCP asks for your Meftah tenant subdomain, redirects you to Meftah login, and stores a temporary MCP session token. The session token is valid for 30 days.

Available Tools

The MCP server currently exposes these tools:

ToolPurpose
meftah_create_customerCreate a new customer in Meftah.
meftah_create_productCreate a new product or service.
meftah_create_invoiceCreate an invoice.
meftah_find_customersSearch customers by name.
meftah_find_productsSearch products or services by name.
meftah_find_taxesSearch taxes by name, or list all taxes if no filter is provided.
meftah_list_invoicesList invoices.
meftah_update_invoiceUpdate an existing invoice.
meftah_send_invoice_to_customerEmail an invoice to the customer.
meftah_send_invoice_to_zatcaSubmit an invoice to ZATCA.

Important Rules

  • Your tenant is the first part of your Meftah URL. For https://demo.meftah.app, the tenant is demo.
  • Invoice status values are 0 Draft, 1 Pending, 2 Paid, 3 Overdue, and 4 Cancelled.
  • Payment terms are 0 Due on Receipt, 15 Net 15, 30 Net 30, 45 Net 45, 60 Net 60, and 90 Net 90.
  • The invoice title is set by Meftah. Do not ask the assistant to send an invoice title.
  • If an invoice line uses productName, the server searches for that product first. If it does not exist, it can create the product and use the returned product ID.
  • Content changes to invoices, such as amounts, dates, currency, and line items, require the invoice to be in Draft status.
  • Paid and Cancelled invoices are terminal states.
  • ZATCA-submitted invoices are locked. To reverse or adjust them, create a credit or debit note instead of editing the original invoice.

General MCP Setup

Use this section for any MCP-compatible client.

  1. Open your MCP client settings.

  2. Add a new remote MCP server.

  3. Use this server URL:

    https://mcp.meftah.app/mcp  
    
  4. Start the connection or authorization flow.

  5. Enter your Meftah tenant subdomain when prompted.

  6. Sign in to Meftah and approve access.

  7. Return to the assistant and confirm that Meftah tools are available.

After connection, test with a read-only request:

List my latest Meftah invoices.  

or:

Search Meftah customers for "Acme".  

Using Meftah MCP with Claude

Claude supports remote MCP servers in supported Claude clients and plans.

Connect in Claude

  1. Open Claude.

  2. Go to settings for connectors, integrations, or MCP servers.

  3. Add a custom MCP server.

  4. Enter:

    https://mcp.meftah.app/mcp  
    
  5. Continue through the authorization flow.

  6. When the Meftah connection page appears, enter your tenant subdomain.

  7. Sign in to Meftah and authorize access.

  8. Return to Claude and check that the Meftah tools are enabled.

Claude Example Prompts

Search before creating:

Use Meftah to search for a customer named Gulf Trading.  
If the customer does not exist, create it with contact name Ahmed Saleh,  
email [email protected], and phone +966500000000.  

Create a product:

Create a Meftah product called Consulting Hour with unit price 350 SAR.  
Use Hour as the unit of measurement.  

Create an invoice:

Create a draft Meftah invoice for customer ID 123.  
Currency is SAR. Invoice date is 2026-05-30 and due date is 2026-06-14.  
Add one line item for Consulting Hour, quantity 3, unit price 350.  
Subtotal is 1050, tax is 157.5, and total is 1207.5.  

Update invoice status:

Mark invoice ID 00000000-0000-0000-0000-000000000000 as paid in Meftah.  

Send an invoice:

Send invoice ID 00000000-0000-0000-0000-000000000000 to the customer by email.  

Submit to ZATCA:

Submit invoice ID 00000000-0000-0000-0000-000000000000 to ZATCA.  
Before submitting, confirm the invoice status and total amount with me.  

Using Meftah MCP with ChatGPT

ChatGPT support depends on your plan, workspace settings, and whether your workspace has ChatGPT apps, custom MCP apps, or developer mode enabled. Current OpenAI documentation uses "apps" for what were previously called connectors. OpenAI documents that custom apps can use MCP, workspace admins can control app availability and actions, and write/modify actions may require extra review or confirmation.

Useful OpenAI references:

  • ChatGPT apps overview: https://help.openai.com/en/articles/11487775-connectors-in-chatgpt
  • Developer mode and full MCP apps: https://help.openai.com/en/articles/12584461-developer-mode-apps-and-full-mcp-connectors-in-chatgpt-beta
  • Building MCP servers for ChatGPT apps and API integrations: https://developers.openai.com/api/docs/mcp

Direct MCP Connector Setup

Use this path when ChatGPT shows an option to add a custom app, connector, MCP app, or remote MCP server.

  1. Open ChatGPT settings or workspace app and connector settings.

  2. Add or import a custom app, custom connector, or MCP server.

  3. Enter:

    https://mcp.meftah.app/mcp  
    
  4. Complete the OAuth flow.

  5. Enter your Meftah tenant subdomain.

  6. Sign in to Meftah and approve access.

  7. If you are in a Business, Enterprise, or Edu workspace, ask an admin to enable or publish the app if required.

  8. Start a chat and select or mention the Meftah app when asking ChatGPT to use it.

Custom GPT Actions Alternative

Use this path if your ChatGPT interface supports Custom GPT Actions but not remote MCP.

  1. Create a small API proxy that exposes the specific Meftah operations you want as REST endpoints.
  2. In the Custom GPT builder, add those endpoints as Actions using an OpenAPI schema.
  3. Configure OAuth or bearer-token authorization for the action.
  4. In the GPT instructions, tell ChatGPT when to use each Meftah action.

Recommended instruction text:

Use Meftah tools for customer, product, tax, and invoice operations.  
Before creating or updating financial records, summarize the planned action and ask for confirmation.  
Use read-only tools first when the user asks to find, check, list, or verify data.  
Never submit an invoice to ZATCA without explicit confirmation.  

ChatGPT Example Prompts

Find Meftah customers matching "Future Systems" and show their IDs.  
Create a new Meftah customer:  
Company: Future Systems LLC  
Contact: Sara Khan  
Email: [email protected]  
Phone: +966511111111  
Customer type: B2B  
Create a SAR invoice in Meftah for customer ID 456.  
Date: 2026-05-30  
Due date: 2026-06-29  
Payment terms: Net 30  
Line item: Monthly support, quantity 1, unit price 2000  
Tax: 300  
Total: 2300  
Keep it as Draft.  
List my Meftah invoices and identify which ones are still Draft or Pending.  

Recommended Safety Practices

  • Start with search and list operations before creating or updating records.
  • Ask the assistant to show the exact customer ID, product ID, invoice ID, totals, tax, and due date before creating an invoice.
  • Require explicit confirmation before sending invoices by email.
  • Require explicit confirmation before submitting anything to ZATCA.
  • Keep invoice amounts consistent: subtotalAmount + taxAmount - discountAmount = totalAmount.
  • Use Draft status while reviewing invoice content.

Troubleshooting

ProblemWhat to check
The assistant cannot connectConfirm the server URL is https://mcp.meftah.app/mcp.
Authorization failsConfirm the tenant subdomain is correct and that the Meftah account can log in normally.
Tools are missingDisconnect and reconnect the MCP server, then start a new chat.
A request returns unauthorizedThe 30-day session may have expired. Reconnect the MCP server.
Invoice update failsCheck whether the invoice is Draft. Content edits require Draft status.
ZATCA edit failsZATCA-submitted invoices are locked by design. Use a credit or debit note.
Product line item failsSearch or create the product first, then retry with the product ID.