LedgerLink MCP

LedgerLink MCP

Connects AI assistants to QuickBooks Online, enabling management of invoices, customers, expenses, and reports through natural language.

Category
访问服务器

README

LedgerLink MCP

An MCP server that connects AI assistants to QuickBooks Online. Manage invoices, customers, expenses, and reports through natural conversation.

"Show me all unpaid invoices" · "Create an invoice for Acme Corp for $5,000" · "What's my P&L for last quarter?"

What It Does

LedgerLink MCP gives AI assistants (Claude Desktop, Cursor, etc.) direct access to your QuickBooks Online data through the Model Context Protocol. Instead of clicking through the QuickBooks UI, you talk to your AI assistant in plain English.

32 tools across 10 QuickBooks entities:

Category Tools
Invoices List, get, create, send, void
Customers List, get, create, update
Bills List, get, create
Payments List, record
Expenses List, get, create
Reports Profit & Loss, Balance Sheet, Cash Flow, AR Aging, AP Aging
Accounts List, get, create (Chart of Accounts)
Vendors List, get, create
Items List, get, create (Products & Services)
Company Get company info

Quick Start

1. Get QuickBooks Credentials

  1. Create a free account at developer.intuit.com
  2. Create an app → choose "QuickBooks Online and Payments"
  3. Note your Client ID and Client Secret
  4. Add http://localhost:3847/callback as a Redirect URI (under Settings)

2. Authenticate

# Clone and install
git clone https://github.com/YOUR_USERNAME/ledgerlink-mcp.git
cd ledgerlink-mcp
npm install

# Authenticate with QuickBooks (opens browser)
QB_CLIENT_ID=your_id QB_CLIENT_SECRET=your_secret npx tsx bin/cli.ts auth

A browser window opens → log in to QuickBooks → authorize → tokens are saved to ~/.ledgerlink/tokens.json.

3. Add to Claude Desktop

Edit your Claude Desktop config:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "ledgerlink": {
      "command": "npx",
      "args": ["tsx", "/path/to/ledgerlink-mcp/src/index.ts"],
      "env": {
        "QB_CLIENT_ID": "your_client_id",
        "QB_CLIENT_SECRET": "your_client_secret",
        "QB_ENVIRONMENT": "sandbox"
      }
    }
  }
}

Restart Claude Desktop. You'll see the tools icon — start talking to your books.

4. Try It

  • "Show me all unpaid invoices"
  • "Who owes me the most money?"
  • "What's my profit and loss for 2024?"
  • "Create an invoice for customer ID 1 for $500 consulting"
  • "List all bills due this week"

How It Works

You: "Show me unpaid invoices"
  ↓
Claude Desktop → LedgerLink MCP (stdio) → QuickBooks API
  ↓
Claude: "You have 4 unpaid invoices totaling $3,200..."

LedgerLink runs as a local process. Claude Desktop spawns it, communicates over stdio (stdin/stdout), and your QuickBooks data never leaves your machine.

Configuration

Environment Variables

Variable Required Description
QB_CLIENT_ID Yes From Intuit developer portal
QB_CLIENT_SECRET Yes From Intuit developer portal
QB_REDIRECT_URI No Default: http://localhost:3847/callback
QB_ENVIRONMENT No sandbox (default) or production

Token Storage

Tokens are stored in ~/.ledgerlink/tokens.json with owner-only permissions (chmod 600). Access tokens auto-refresh when expired (1-hour lifetime, 100-day refresh token).

Tool Reference

Invoices

  • list_invoices — Filter by status (Unpaid/Paid/Overdue), customer, date range
  • get_invoice — Full invoice details by ID
  • create_invoice — Create with customer, line items, due date, memo
  • send_invoice — Email an invoice to the customer
  • void_invoice — Void an invoice (cannot be undone)

Customers

  • list_customers — Search by name, filter active/inactive
  • get_customer — Full customer details by ID
  • create_customer — Create with name, email, phone, address
  • update_customer — Update existing customer fields

Bills (Accounts Payable)

  • list_bills — Filter by status, vendor, due date
  • get_bill — Full bill details by ID
  • create_bill — Create with vendor, line items, due date

Payments

  • list_payments — Filter by date range, customer
  • record_payment — Record payment, optionally applied to an invoice

Expenses

  • list_expenses — Filter by date range, vendor
  • get_expense — Full expense details by ID
  • create_expense — Create with account, payment type, line items

Reports

  • get_profit_and_loss — P&L for a date range, optionally by month/week
  • get_balance_sheet — Balance sheet as of a date
  • get_cash_flow — Cash flow statement for a date range
  • get_aging_receivables — Who owes you, grouped by aging bucket
  • get_aging_payables — What you owe, grouped by aging bucket

Chart of Accounts

  • list_accounts — Filter by type (Bank, Expense, Income, etc.)
  • get_account — Full account details by ID
  • create_account — Create new account with type and sub-type

Vendors

  • list_vendors — Search by name, filter active/inactive
  • get_vendor — Full vendor details by ID
  • create_vendor — Create with name, email, phone

Items (Products & Services)

  • list_items — Search by name, filter by type (Service/Inventory)
  • get_item — Full item details by ID
  • create_item — Create with name, type, price, income account

Company

  • get_company_info — Company name, address, fiscal year, currency

Development

# Install dependencies
npm install

# Run in development mode
QB_CLIENT_ID=xxx QB_CLIENT_SECRET=xxx npx tsx src/index.ts

# Test with MCP Inspector
QB_CLIENT_ID=xxx QB_CLIENT_SECRET=xxx npx @modelcontextprotocol/inspector npx tsx src/index.ts

# Type check
npx tsc --noEmit

# Build for distribution
npm run build

# Run tests
npm test

Architecture

src/
├── index.ts                 # Entry point — wires everything together
├── auth/
│   ├── oauth.ts             # OAuth 2.0 flow (local callback server)
│   └── token-store.ts       # Token persistence (~/.ledgerlink/)
├── quickbooks/
│   ├── client.ts            # HTTP client (auth, retry, rate limiting)
│   ├── types.ts             # TypeScript types for QB entities
│   ├── invoices.ts          # Invoice API operations
│   ├── customers.ts         # Customer API operations
│   └── ...                  # (10 entity modules total)
├── tools/
│   ├── invoice-tools.ts     # MCP tool registrations for invoices
│   ├── customer-tools.ts    # MCP tool registrations for customers
│   └── ...                  # (10 tool modules total)
├── resources/
│   └── index.ts             # MCP read-only resources
└── utils/
    ├── rate-limiter.ts      # Sliding window (450 req/min)
    ├── query-builder.ts     # QB query builder with sanitization
    └── formatters.ts        # Report response formatting

Security

  • Tokens stored with chmod 600 (owner-only read/write)
  • Client credentials passed via environment variables, never committed
  • Query builder sanitizes all user input to prevent QB query injection
  • All QuickBooks data stays local — no external servers, no telemetry

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选