FreshBooks MCP Server

FreshBooks MCP Server

Provides 29 tools for Claude to query and update FreshBooks directly, including invoices, clients, estimates, expenses, payments, timesheets, and reports.

Category
访问服务器

README

CHEVS Garage — FreshBooks MCP + Call Processor

Two systems in one repo:

  1. FreshBooks MCP server — 29 tools that let Claude query and update FreshBooks directly (invoices, clients, estimates, expenses, payments, timesheets, reports).
  2. Call Processor — records customer phone calls, transcribes them locally with Whisper, extracts job details with Claude, and automatically creates FreshBooks clients/estimates + schedules follow-up reminders.

Cost: $0/month beyond your existing Claude Code subscription.


Quick Start

Full setup from a new machine: follow SETUP.md.

FreshBooks MCP only (no call processor): follow GETTING_STARTED.md.

git clone https://github.com/zeal-tristian-chevier/containerized-freshbooks-mcp.git
cd containerized-freshbooks-mcp

Call Processor — How It Works

Phone call ends
      ↓
Cube ACR auto-uploads audio to Google Drive (Android)
or iOS 18 one-tap share to Google Drive (iPhone)
      ↓
Google Drive for Desktop syncs to watch_folder/ on your PC/Mac
      ↓
Docker container detects the new file (runs 24/7)
      ↓
Whisper transcribes audio locally — free, no internet needed
      ↓
Claude extracts: customer, ATV, work needed, parts, follow-ups
      ↓
FreshBooks: client created/updated + estimate created
      ↓
Email summary sent + follow-up reminders queued

FreshBooks MCP — Tools (29 total)

Time tracking

  • check_timesheet — report logged/missing/under-logged days for a day, week, or month
  • log_time — log hours per weekday against a project, with PTO exclusion and dry-run

Clients & estimates

  • list_clients · create_client
  • list_estimates · create_estimate

Invoices & payments

  • list_invoices · get_invoice · create_invoice · update_invoice · send_invoice · void_invoice
  • list_payments · apply_payment · delete_payment

Expenses

  • list_expenses · create_expense · list_expense_categories

Items, taxes & services

  • list_items · create_item
  • list_taxes · create_tax
  • list_services · list_staff

Projects & reports

  • list_projects · list_recurring_invoices
  • get_profit_loss · get_income_summary · get_accounts_aging

Architecture

Module Responsibility
freshbooks_mcp/server.py MCP interface — 29 tool definitions + testable handle_* functions
freshbooks_mcp/freshbooks_client.py HTTP wrapper: auth injection, 401→refresh→retry, pagination
freshbooks_mcp/auth_manager.py OAuth2 lifecycle: refresh, token rotation, bootstrap CLI
freshbooks_mcp/token_store.py Pluggable storage: OS keychain or Fernet-encrypted file
freshbooks_mcp/transformers.py Pure date math, unit conversion, report building
call_processor/pipeline.py Orchestrates transcribe → extract → FreshBooks → notify
call_processor/transcriber.py Local Whisper transcription (faster-whisper, CPU)
call_processor/extractor.py Runs claude -p to extract structured job data
call_processor/actions.py FreshBooks client/estimate creation
call_processor/scheduler.py APScheduler + SQLite reminder queue
call_processor/watcher.py watchdog folder monitor

Configuration

All settings in .env (copy from .env.example).

FreshBooks OAuth — credentials from my.freshbooks.com → Developer → your app:

Variable Required Notes
FRESHBOOKS_CLIENT_ID ✅ OAuth app client id
FRESHBOOKS_CLIENT_SECRET ✅ OAuth app secret
FRESHBOOKS_REDIRECT_URI ✅ Must exactly match the app setting (e.g. https://localhost/callback)
FRESHBOOKS_TOKEN_BACKEND — keyring (default) or file
FRESHBOOKS_TOKEN_PATH — Encrypted token file path (file backend)
FRESHBOOKS_TOKEN_KEY — Fernet key for file backend
TZ — Timezone for day boundaries (default America/Toronto)
DEFAULT_DAILY_HOURS — Expected hours/day (default 8)

Call Processor:

Variable Notes
WHISPER_MODEL tiny / base (default) / small / medium
NOTIFY_EMAIL Your email — receives a summary after each call
EMPLOYEE_EMAIL Employee email for task reminders
SMTP_USER / SMTP_PASS Gmail credentials (use an App Password)

Docker

Two containers, two Dockerfiles:

File What it builds
Dockerfile MCP server — used by Claude Code/Desktop to query FreshBooks
Dockerfile.processor Call processor — runs 24/7, watches for new audio files

Start the call processor:

# Windows
.\docker-start.ps1

# macOS
bash docker-start.sh

Register the MCP server with Claude Code (.mcp.json):

{
  "mcpServers": {
    "freshbooks": {
      "command": "docker",
      "args": ["compose", "-f", "/ABS/PATH/TO/docker-compose.yml", "run", "--rm", "-T", "app"]
    }
  }
}

API Notes

Verified live against the FreshBooks v3 API:

  • Two hosts. Auth on https://auth.freshbooks.com/oauth/authorize; all data calls on https://api.freshbooks.com.
  • Rotating refresh tokens. Each refresh invalidates the old token. The new token is persisted before use, under a lock.
  • Time entries use businessId (not accountId). duration is in seconds; started_at is UTC with milliseconds + Z.
  • Date filters on payments/expenses are silently ignored by the API — filtering is done client-side after fetching.
  • Expense category names are always null in the v3 API for system categories.
  • Accounts aging report returns 404 on some account types — falls back to computing aging from outstanding invoice data.

Security

  • Token storage — OS keychain by default; encrypted-file fallback uses Fernet with the key in env (never co-located with the ciphertext), 0600 permissions, and atomic writes.
  • No secret leakage — TokenSet masks values in repr; token payloads are never logged.
  • Safe writes — log_time requires an explicit project_id, defaults to skip_existing=true, supports dry_run, never logs weekends.
  • Compromise recovery — revoke in the FreshBooks Developer Portal, then re-run freshbooks-mcp-auth.

Development

pytest            # unit tests

# or in Docker:
docker build --target test -t freshbooks-mcp:test . && docker run --rm freshbooks-mcp:test

License

Internal / private. Not licensed for distribution.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选