MCP Hub
Back to servers

freshbooks-mcp

A comprehensive MCP server providing full FreshBooks integration with 87 tools covering accounting, invoicing, time tracking, expense management, and financial reporting.

Tools
49
Updated
Jan 8, 2026
Validated
Jan 11, 2026

FreshBooks MCP Server

A Model Context Protocol (MCP) server providing complete FreshBooks integration for Claude and other MCP-compatible AI assistants.

License: MIT TypeScript Tests

Features

  • Complete SDK Parity - 87 tools covering all major FreshBooks functionality
  • 22 Entity Categories - Full coverage of accounting, invoicing, time tracking, and more
  • Time Tracking - Log time, manage timers, track billable hours
  • Invoicing & Billing - Create invoices, manage bills, handle payments
  • Expense Management - Track expenses, categorize spending, manage vendors
  • Client & Project Management - Full CRM and project capabilities
  • Financial Reports - Profit/loss, tax summaries, and more
  • OAuth2 Authentication - Secure token-based authentication with auto-refresh

Installation

npm install @goodsamsoftware/freshbooks-mcp

Quick Start

The fastest way to get started is with our hosted service — no OAuth setup required.

1. Sign Up

Go to freshbooks.goodsamsoftware.com and create an account (14-day free trial). Once you're in, connect your FreshBooks account from the dashboard.

2. Copy Your Configuration

From your dashboard, copy the configuration snippet provided. It works with both Claude Desktop and Claude Code.

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "freshbooks": {
      "command": "npx",
      "args": ["mcp-remote", "https://freshbooks.goodsamsoftware.com/api/mcp", "--header", "Authorization:Bearer YOUR_TOKEN"]
    }
  }
}

Claude Code (.mcp.json in your project):

{
  "mcpServers": {
    "freshbooks": {
      "command": "npx",
      "args": ["mcp-remote", "https://freshbooks.goodsamsoftware.com/api/mcp", "--header", "Authorization:Bearer YOUR_TOKEN"]
    }
  }
}

3. Start Using

Example prompts:

  • "Log 2 hours on the Website Redesign project"
  • "Show me my time entries for this week"
  • "Start a timer for client meeting"
  • "Create an invoice for Acme Corp for $1,500"
  • "What's my profit/loss this month?"

Self-Hosted Setup

You can also run the MCP server locally with your own FreshBooks API application.

Note: FreshBooks requires HTTPS for all OAuth callback URLs, including localhost. See Local HTTPS Setup below for instructions.

1. Get FreshBooks Credentials

  1. Go to FreshBooks Developer Portal
  2. Create a new application
  3. Set redirect URI to: https://freshbooks.goodsamsoftware.com/callback
  4. Note your Client ID and Client Secret

2. Configure Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "freshbooks": {
      "command": "npx",
      "args": ["@goodsamsoftware/freshbooks-mcp"],
      "env": {
        "FRESHBOOKS_CLIENT_ID": "your-client-id",
        "FRESHBOOKS_CLIENT_SECRET": "your-client-secret",
        "FRESHBOOKS_REDIRECT_URI": "https://freshbooks.goodsamsoftware.com/callback"
      }
    }
  }
}

3. Authenticate

Ask Claude:

"Connect me to FreshBooks"

Claude will guide you through OAuth authentication. After authorizing in FreshBooks, you'll see the authorization code on our hosted callback page - just copy it and paste it back to Claude.

4. Start Using

Example prompts:

  • "Log 2 hours on the Website Redesign project"
  • "Show me my time entries for this week"
  • "Start a timer for client meeting"
  • "Create an invoice for Acme Corp for $1,500"
  • "What's my profit/loss this month?"

Available Tools (87 total)

Authentication (5 tools)

ToolDescription
auth_statusCheck authentication status
auth_get_urlGet OAuth authorization URL
auth_exchange_codeExchange auth code for tokens
auth_refreshRefresh access token
auth_revokeRevoke authentication

Time Tracking (5 tools)

ToolDescription
timeentry_listList time entries with filters
timeentry_singleGet time entry by ID
timeentry_createCreate time entry
timeentry_updateUpdate time entry
timeentry_deleteDelete time entry

Timer Management (4 tools)

ToolDescription
timer_startStart a timer
timer_stopStop timer and log time
timer_currentGet running timer(s)
timer_discardDelete timer without logging

Invoicing (5 tools)

ToolDescription
invoice_listList invoices
invoice_singleGet invoice by ID
invoice_createCreate invoice
invoice_updateUpdate invoice
invoice_deleteDelete invoice

Clients (5 tools)

ToolDescription
client_listList clients
client_singleGet client by ID
client_createCreate client
client_updateUpdate client
client_deleteDelete client

Projects (5 tools)

ToolDescription
project_listList projects
project_singleGet project by ID
project_createCreate project
project_updateUpdate project
project_deleteDelete project

Expenses (5 tools)

ToolDescription
expense_listList expenses
expense_singleGet expense by ID
expense_createCreate expense
expense_updateUpdate expense
expense_deleteDelete expense

Bills & Payments (15 tools)

ToolDescription
bill_listList bills
bill_singleGet bill by ID
bill_createCreate bill
bill_updateUpdate bill
bill_deleteDelete bill
billpayment_listList bill payments
billpayment_singleGet bill payment
billpayment_createCreate bill payment
billpayment_updateUpdate bill payment
billpayment_deleteDelete bill payment
billvendor_listList vendors
billvendor_singleGet vendor by ID
billvendor_createCreate vendor
billvendor_updateUpdate vendor
billvendor_deleteDelete vendor

Additional Tools

CategoryToolsDescription
Credit Notes5Create, manage credit notes
Expense Categories3Manage expense categories
Items5Product/service catalog
Journal Entries5Manual accounting entries
Journal Entry Accounts3Chart of accounts
Other Income5Non-invoice income tracking
Payments5Invoice payment tracking
Payment Options2Payment gateway settings
Reports3Financial reports
Services5Billable service types
Tasks5Project task management
User1Current user info
Callbacks5Webhook management

See complete tool documentation in docs/api/

Configuration (Self-Hosted)

Environment Variables

VariableRequiredDescription
FRESHBOOKS_CLIENT_IDYesOAuth client ID
FRESHBOOKS_CLIENT_SECRETYesOAuth client secret
FRESHBOOKS_REDIRECT_URIYesOAuth redirect URI
FRESHBOOKS_TOKEN_PATHNoPath for token storage
LOG_LEVELNoLogging level (debug, info, warn, error)

Advanced: Local HTTPS Setup

If you prefer to use a local callback instead of our hosted callback page, you can set up local HTTPS certificates with mkcert:

Windows (winget):

winget install FiloSottile.mkcert
mkcert -install
mkdir certs
mkcert -key-file certs/localhost-key.pem -cert-file certs/localhost.pem localhost 127.0.0.1 ::1

macOS (Homebrew):

brew install mkcert
mkcert -install
mkdir certs
mkcert -key-file certs/localhost-key.pem -cert-file certs/localhost.pem localhost 127.0.0.1 ::1

Linux:

# Install mkcert (see https://github.com/FiloSottile/mkcert#installation)
mkcert -install
mkdir certs
mkcert -key-file certs/localhost-key.pem -cert-file certs/localhost.pem localhost 127.0.0.1 ::1

Then set your redirect URI to https://localhost:3000/callback in FreshBooks.

The certificates will be valid for 3 years and trusted by your system.

Development

# Install dependencies
npm install

# Run in development mode
npm run dev

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Type check
npm run typecheck

# Build for production
npm run build

Testing

The project has comprehensive test coverage:

  • 1,571 tests across 93 test files
  • 100% code coverage requirement
  • Mock factories for all FreshBooks entities
  • Error scenario coverage
npm test                 # Run all tests
npm run test:coverage    # Run with coverage report

Architecture

src/
├── server.ts             # MCP server entry point
├── auth/                 # OAuth2 authentication
├── client/               # FreshBooks SDK wrapper
├── errors/               # Error normalization
├── tools/                # MCP tool implementations (22 categories)
│   ├── auth/             # Authentication tools
│   ├── time-entry/       # Time tracking
│   ├── timer/            # Timer management
│   ├── invoice/          # Invoicing
│   ├── client/           # Client management
│   ├── project/          # Projects
│   ├── expense/          # Expenses
│   ├── bill/             # Bills
│   └── ...               # 14 more categories
└── config/               # Configuration

Documentation

Error Handling

All errors are normalized to MCP format with helpful context:

{
  "code": -32005,
  "message": "User-friendly message",
  "data": {
    "freshbooksError": { "code": "...", "message": "..." },
    "recoverable": true,
    "suggestion": "What to do next"
  }
}

License

MIT License - see LICENSE for details.

Credits

Reviews

No reviews yet

Sign in to write a review