Logo vun Laravel QuickBooks MCP

Laravel QuickBooks MCP

Communautéit
rajurayhan

This package is the first PHP/Laravel QuickBooks MCP implementation in the ecosystem. It mirrors the official Intuit Node.js MCP server (intuit/quickbooks-online-mcp-server).

Editeurrajurayhan
Repositorylaravel-quickbooks-mcp-server
SproochPHP
Forks
4
Stären
10
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Laravel QuickBooks MCP stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    10 Stären an 4 Forks aus dem verlinkte Repository.

Laravel QuickBooks MCP

A first-party PHP/Laravel Composer package that exposes QuickBooks Online (QBO) as a Model Context Protocol (MCP) server. AI clients — Claude, Cursor, n8n, and others — connect over HTTP and perform full CRUD operations on QBO entities using natural language.

This is the first PHP/Laravel QuickBooks MCP implementation in the ecosystem.


Features

  • 50 MCP tools covering 11 QBO entities (customers, vendors, invoices, bills, estimates, purchases, employees, items, accounts, journal entries, and bill payments)
  • Remote HTTP transport — not local stdio, so it works with any hosted AI client
  • Multi-tenant — multiple QBO companies per Laravel installation
  • Name-to-ID resolution — agents pass human-readable names; ID lookups happen automatically
  • Full OAuth 2.0 flow — any SaaS user can connect their own QBO company
  • Production-ready from day one (sandbox also supported)
  • Laravel-native auth — works with Passport or Sanctum, no assumptions made

Requirements

RequirementVersion
PHP>= 8.2
Laravel>= 11.x
laravel/mcp^1.0
spinen/laravel-quickbooks-client^4.0

Your host application must also have:

  • A users table with an id column (standard Laravel)
  • The HasQuickBooksToken trait from spinen/laravel-quickbooks-client on the User model
  • At least one configured auth guard that resolves auth()->user() from a Bearer token (Passport or Sanctum)

Installation

1. Install via Composer

bash
composer require rajurayhan/laravel-quickbooks-mcp-server

2. Publish package assets

bash
# Publish config
php artisan vendor:publish --tag=quickbooks-mcp-config

# Publish migrations
php artisan vendor:publish --tag=quickbooks-mcp-migrations

# Publish routes stub
php artisan vendor:publish --tag=quickbooks-mcp-routes

# Or publish everything at once
php artisan vendor:publish --provider="Raju\QuickBooksMcp\QuickBooksMcpServiceProvider"

3. Run migrations

bash
php artisan migrate

This creates one table: quickbooks_connections.

4. Configure your .env

dotenv
# Intuit app credentials (from developer.intuit.com)
QUICKBOOKS_CLIENT_ID=your_intuit_app_client_id
QUICKBOOKS_CLIENT_SECRET=your_intuit_app_client_secret
QUICKBOOKS_REDIRECT_URI=https://yourdomain.com/quickbooks/callback
QUICKBOOKS_SCOPE=com.intuit.quickbooks.accounting
QUICKBOOKS_DATA_SOURCE=production   # or: development (sandbox)

# MCP server settings
QBO_MCP_PATH=mcp/quickbooks
QBO_TOKEN_REFRESH_BUFFER=5

5. Register the published routes

Open routes/quickbooks-mcp.php (published to your app's routes/ folder) and register it in your application. Choose one of:

Option A — in app/Providers/AppServiceProvider.php:

php
public function boot(): void
{
    Route::middleware('web')
        ->group(base_path('routes/quickbooks-mcp.php'));
}

Option B — at the bottom of routes/web.php or routes/api.php:

php
require base_path('routes/quickbooks-mcp.php');

6. Set your auth guard

Inside routes/quickbooks-mcp.php, change auth:api to match your application's Bearer token guard:

php
// Change 'api' to 'sanctum' if your app uses Laravel Sanctum
Route::middleware([
    'api',
    'auth:api',   // ← change this line if needed
    ResolveQuickBooksRealm::class,
    RefreshQuickBooksToken::class,
])->group(function () {
    Mcp::server(QuickBooksServer::class)->at(config('quickbooks-mcp.path'));
});

7. Register your Intuit OAuth callback URI

In your Intuit Developer app settings, add this redirect URI:

https://yourdomain.com/quickbooks/callback

It must match the /quickbooks/callback route exactly.

8. Add HasQuickBooksToken to your User model

php
use Spinen\QuickBooks\HasQuickBooksToken;

class User extends Authenticatable
{
    use HasQuickBooksToken;
    // ...
}

OAuth Flow

Once installed, a SaaS user connects their QBO company through your application:

1. User visits GET /quickbooks/connect
   → Redirected to Intuit consent screen
   → Grants access to their QBO company
   → Redirected back to GET /quickbooks/callback

2. Callback handler:
   → Exchanges auth code for tokens (stored by spinen in quickbooks_tokens)
   → Package records connection in quickbooks_connections (realm_id + company_name)

3. User authenticates your app with their existing Bearer token (Passport or Sanctum)

4. AI client is configured with:
   MCP URL:  https://yourdomain.com/mcp/quickbooks
   Header:   Authorization: Bearer <bearer-token>

5. Every MCP tool call thereafter:
   → Guard authenticates the Bearer token
   → ResolveQuickBooksRealm finds the user's active QBO connection
   → RefreshQuickBooksToken silently refreshes QBO tokens near expiry
   → Tool runs — zero extra params needed from the AI agent

Connection management routes

MethodRouteDescription
GET/quickbooks/connectRedirect to Intuit OAuth consent screen
GET/quickbooks/callbackHandle OAuth callback and store tokens
DELETE/quickbooks/disconnectRevoke QBO tokens and remove connection
GET/quickbooks/connectionsList active QBO connections for the user

Configuration

config/quickbooks-mcp.php:

KeyDefaultDescription
pathmcp/quickbooksURL path where the MCP server is exposed
multi_tenanttrueResolve realm from authenticated user
search_limit20Default result limit for search tools
search_limit_max100Maximum result limit for search tools
environmentproductionQBO environment (production or development)
redirect_uriAPP_URL/quickbooks/callbackOAuth redirect URI
token_refresh_buffer_minutes5Minutes before expiry to proactively refresh

Available Tools

Account (3 tools)

ToolDescription
create_accountCreate a new account in the chart of accounts
search_accountsSearch accounts by name or type
update_accountUpdate an existing account

Bill (5 tools)

ToolDescription
create_billCreate a new accounts payable bill
get_billGet a bill by ID
search_billsSearch bills by vendor, date range, or unpaid status
update_billUpdate an existing bill
delete_billPermanently delete a bill

Bill Payment (5 tools)

ToolDescription
create_bill_paymentPay one or more open bills
get_bill_paymentGet a bill payment by ID
search_bill_paymentsSearch bill payments by vendor or date range
update_bill_paymentUpdate an existing bill payment
delete_bill_paymentPermanently delete a bill payment

Customer (5 tools)

ToolDescription
create_customerCreate a new customer
get_customerGet a customer by ID
search_customersSearch customers by name, email, or company
update_customerUpdate an existing customer
delete_customerDeactivate a customer (QBO soft-delete)

Employee (4 tools)

ToolDescription
create_employeeCreate a new employee record
get_employeeGet an employee by ID
search_employeesSearch employees by name or email
update_employeeUpdate an existing employee

Estimate (5 tools)

ToolDescription
create_estimateCreate a new estimate / quote
get_estimateGet an estimate by ID
search_estimatesSearch estimates by customer, status, or date range
update_estimateUpdate or change the status of an estimate
delete_estimatePermanently delete an estimate

Invoice (4 tools)

ToolDescription
create_invoiceCreate a new invoice
read_invoiceRead a full invoice with all line items
search_invoicesSearch invoices by customer, date range, or payment status
update_invoiceUpdate an existing invoice

Invoices cannot be permanently deleted in QBO.

Item (4 tools)

ToolDescription
create_itemCreate a new product or service item
read_itemRead a full item record with pricing and account assignments
search_itemsSearch items by name or type
update_itemUpdate an existing item (set active: false to deactivate)

Items cannot be permanently deleted in QBO.

Journal Entry (5 tools)

ToolDescription
create_journal_entryCreate a journal entry (debits must equal credits)
get_journal_entryGet a journal entry by ID
search_journal_entriesSearch journal entries by date range or document number
update_journal_entryUpdate an existing journal entry
delete_journal_entryPermanently delete a journal entry

Purchase (5 tools)

ToolDescription
create_purchaseCreate a purchase / expense transaction
get_purchaseGet a purchase by ID
search_purchasesSearch purchases by payment type or date range
update_purchaseUpdate an existing purchase
delete_purchasePermanently delete a purchase

Vendor (5 tools)

ToolDescription
create_vendorCreate a new vendor
get_vendorGet a vendor by ID
search_vendorsSearch vendors by name, email, or company
update_vendorUpdate an existing vendor
delete_vendorDeactivate a vendor (QBO soft-delete)

Name Resolution

Tools that reference related entities (vendor, customer, account, item) accept either a name or a numeric ID. The package resolves names to IDs automatically before calling the QBO API.

# These are equivalent when calling create_bill:
vendor: "Office Depot"
vendor: "42"

If a name cannot be found, the tool returns a descriptive error with a suggestion to use the corresponding search tool first.


Delete Behaviour

QBO has two categories of delete:

BehaviourEntities
Soft-delete — sets Active = falseCustomer, Vendor, Employee, Item, Account
Hard-delete — permanently removedBill, BillPayment, Estimate, JournalEntry, Purchase
Cannot be deletedInvoice, Item (use update_item with active: false)

Multi-Tenant Architecture

Each authenticated user has exactly one active QBO connection tracked in the quickbooks_connections table. The ResolveQuickBooksRealm middleware automatically scopes every tool call to the correct QBO company — no realm_id parameter is ever needed from the AI agent.


Package Architecture

src/
├── QuickBooksMcpServiceProvider.php   — registers service, publishes assets
├── Server/QuickBooksServer.php        — MCP server, registers all 50 tools
├── Services/QuickBooksService.php     — QBO API wrapper, name resolvers
├── Concerns/ResolvesEntityNames.php   — trait for name-to-ID resolution
├── Http/
│   ├── Controllers/QuickBooksOAuthController.php
│   └── Middleware/
│       ├── ResolveQuickBooksRealm.php — scopes QBO service to user's company
│       └── RefreshQuickBooksToken.php — proactive token refresh
├── Models/QuickBooksConnection.php    — tracks user ↔ QBO company links
├── Exceptions/
│   ├── QuickBooksAuthException.php
│   └── QuickBooksToolException.php
└── Tools/                             — 50 tool classes across 11 entities
    ├── Account/, Bill/, BillPayment/, Customer/, Employee/
    ├── Estimate/, Invoice/, Item/, JournalEntry/
    ├── Purchase/, Vendor/

License

MIT — see LICENSE for details.


Author

Raju Rayhan — github.com/rajurayhan

Laravel QuickBooks MCP MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Laravel QuickBooks MCP verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Laravel QuickBooks MCP als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Laravel QuickBooks MCP an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "laravel-quickbooks-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Laravel QuickBooks MCP. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Laravel QuickBooks MCP.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Laravel QuickBooks MCP?
Laravel QuickBooks MCP
Jo. Ech hunn et gelies.
Dat hunn ech mat Laravel QuickBooks MCP fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Laravel QuickBooks MCP benotzt?

Laravel QuickBooks MCP ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Laravel QuickBooks MCP MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Laravel QuickBooks MCP mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Laravel QuickBooks MCP MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Laravel QuickBooks MCP verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Laravel QuickBooks MCP MCP mat TypingMind?

Laravel QuickBooks MCP leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Laravel QuickBooks MCP MCP an TypingMind zur Verfügung?

Laravel QuickBooks MCP stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Laravel QuickBooks MCP MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Laravel QuickBooks MCP eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇