Laravel QuickBooks MCP
About
A first-party PHP/Laravel Composer package that exposes QuickBooks Online (QBO) as a Model Context Protocol (MCP) server.
Details
- Author
- rajurayhan
- Categories
- Finance, API, Other
Jump to
Setup
Install Laravel QuickBooks MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/rajurayhan/laravel-quickbooks-mcp-server
Follow the installation instructions in the repository README, then restart your MCP client.
A first-party PHP/Laravel Composer package that exposesQuickBooks Online (QBO)as aModel 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.
- 50 MCP toolscovering 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-readyfrom day one (sandbox also supported)
- Laravel-native auth— works with Passport or Sanctum, no assumptions made
- Auserstable with anidcolumn (standard Laravel)
- TheHasQuickBooksTokentrait fromspinen/laravel-quickbooks-clienton theUsermodel
- At least one configured auth guard that resolvesauth()->user()from a Bearer token (Passport or Sanctum)
composer require rajurayhan/laravel-quickbooks-mcp-server
# 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"
This creates one table:quickbooks_connections.
# 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
Openroutes/quickbooks-mcp.php(published to your app'sroutes/folder) and register it in your application. Choose one of:
Option A — inapp/Providers/AppServiceProvider.php:
public function boot(): void { Route::middleware('web') ->group(base_path('routes/quickbooks-mcp.php')); }
Option B — at the bottom ofroutes/web.phporroutes/api.php:
require base_path('routes/quickbooks-mcp.php');
Insideroutes/quickbooks-mcp.php, changeauth:apito match your application's Bearer token guard:
// 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 yourIntuit Developer app settings, add this redirect URI:
https://yourdomain.com/quickbooks/callback
It must match the/quickbooks/callbackroute exactly.
8. AddHasQuickBooksTokento your User model
use Spinen\QuickBooks\HasQuickBooksToken; class User extends Authenticatable { use HasQuickBooksToken; // ... }
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
Invoices cannot be permanently deleted in QBO.
Items cannot be permanently deleted in QBO.
Tools that reference related entities (vendor, customer, account, item) accept either anameor anumeric 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.
Each authenticated user has exactly one active QBO connection tracked in thequickbooks_connectionstable. TheResolveQuickBooksRealmmiddleware automatically scopes every tool call to the correct QBO company — norealm_idparameter is ever needed from the AI agent.
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/
QuickBooks integration using OAuth2. Write operations disabled by default per integration. 550+ tools covering invoices, bills, reports, and inventory. Requires a DataGrout account.
Live Dodo Payments API for AI agents — payments, subscriptions, customers, products, refunds, license keys, and usage-based billing via browser OAuth (no API key needed) plus a companion documentation search server.
An MCP server for Zuora, powered by the CData JDBC Driver. Requires a separate driver and configuration file for connection.
The Capital.com MCP Server lets your AI assistant talk to your trading account directly. Market data, position checks, trade previews – all in plain language, without leaving your AI tool.
Cross-border debt collection from your AI assistant: check cases, get pricing, submit new cases.
Remote MCP server (Streamable HTTP, read-only, no auth) at https://doc.2328.io/mcp — integration documentation for the 2328 payment platform.
Secure agent purchasing with human-approved virtual cards.
Brazilian Open Finance MCP — connect 30+ banks (Itaú, Nubank, Bradesco, Santander, Inter, BB, Caixa, C6 and more) to Claude/Cursor. 13 read-only tools.
Token cost math for LLM API calls: 69 models across 17 providers, prices verified by ComparEdge. Free, no API key.
Conta Azul ERP for AI agents — sales, customers, products, payables/receivables and NF-e invoices via OAuth 2.0. 35 tools (read + write).
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




