mcp新书
生产级MCP服务器 新书 --53个工具,用于发票、客户、费用、付款、时间跟踪、项目、估算、财务报告和智能工作流。
特性
- 53工具 涵盖完整的FreshBooks会计工作流程
- 智能工作流工具 --将估算转换为发票,发票未开票时间,查找逾期客户,获取完整的客户摘要
- 5财务报告 --损益表、税务汇总、账龄分析、资产负债表、已收款项
- OAuth2身份验证 具有自动令牌刷新功能
- 清洁输出 --摘要列表、格式化详细信息
- 生产级 错误处理和速率限制意识
- 零成本 --使用FreshBooks免费开发程序
工具
| 类别 | 工具 | 计数 |
|---|---|---|
| 认证 | freshbooks_authenticate, freshbooks_authenticate_with_code, freshbooks_whoami | 3 |
| 发票 | list_invoices, get_invoice, create_invoice, update_invoice, send_invoice, delete_invoice | 6 |
| 循环的 | list_recurring_invoices, create_recurring_invoice, update_recurring_invoice | 3 |
| 客户 | list_clients, get_client, create_client, update_client, delete_client | 5 |
| 估计 | list_estimates, get_estimate, create_estimate, update_estimate, send_estimate | 5 |
| 开支 | list_expenses, get_expense, create_expense, update_expense, delete_expense | 5 |
| 支付 | list_payments, get_payment, create_payment | 3 |
| 时间追踪 | list_time_entries, get_time_entry, create_time_entry, update_time_entry, delete_time_entry | 5 |
| 项目 | list_projects, get_project, create_project, update_project | 4 |
| 报告 | get_profit_loss, get_tax_summary, get_accounts_aging, get_balance_sheet, get_payments_collected | 5 |
| 物品 | list_items, create_item | 2 |
| 分类 | list_expense_categories | 1 |
| 税收 | list_taxes | 1 |
| 工作流 | convert_estimate_to_invoice, get_overdue_invoices, get_unbilled_time, invoice_from_time, client_summary | 5 |
快速开始
1.安装
pip install mcp-freshbooks或来源:
git clone https://github.com/AlexlaGuardia/mcp-freshbooks.git
cd mcp-freshbooks
pip install .2.获取FreshBooks API证书
- 注册地址: freshbooks.com/pages/developer注册
- 在开发人员门户中创建OAuth应用程序
- 将重定向URI设置为
https://localhost:8555/callback - 复制您的客户端ID和客户端密码
3.配置
export FRESHBOOKS_CLIENT_ID=your_client_id
export FRESHBOOKS_CLIENT_SECRET=your_client_secret
export FRESHBOOKS_REDIRECT_URI=https://localhost:8555/callback4.添加到克劳德桌面
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"freshbooks": {
"command": "mcp-freshbooks",
"env": {
"FRESHBOOKS_CLIENT_ID": "your_client_id",
"FRESHBOOKS_CLIENT_SECRET": "your_client_secret",
"FRESHBOOKS_REDIRECT_URI": "https://localhost:8555/callback"
}
}
}
}5.身份验证
使用 freshbooks_authenticate 工具首次使用。它会给你一个在浏览器中打开的URL。授权后,令牌将保存到 ~/.mcp-freshbooks/tokens.json 以及自动刷新。
使用示例
谁欠我钱?
Use get_overdue_invoices to see all past-due clients and total outstanding将提案转换为发票:
Use convert_estimate_to_invoice to turn estimate 456 into a ready-to-send invoice查找未开票的工作:
Use get_unbilled_time to find time entries not yet on any invoice检查盈利能力:
Get the profit and loss report for Q1 2026跟踪时间:
Create a 2-hour time entry for project 789 with note "API integration work"建筑
src/mcp_freshbooks/
├── server.py # MCP server with 47 tool definitions
├── client.py # FreshBooks API client (httpx async)
└── auth.py # OAuth2 flow + token persistence服务器使用 MCP Python SDK 使用FastMCP进行清洁刀具注册。所有API调用都通过带有自动令牌刷新的异步客户端。
需求
- Python 3.10+
- FreshBooks帐户(免费试用开发版)
- FreshBooks OAuth应用程序凭据
许可证
麻省理工学院
