QuickFile MCP服务器
模型上下文协议服务器 QuickFile英国 会计软件-让人工智能助手完全访问发票、客户、采购、银行和财务报告。
 ](https://github.com/marcusquinn/quickfile-mcp/releases)   ](https://app.codacy.com/gh/marcusquinn/quickfile-mcp/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)       ](https://nodejs.org/)
特性
- 37 MCP工具 跨越7个类别以获得完整的QuickFile API覆盖范围
- 客户管理:创建、搜索、更新、删除客户和联系人
- 开具发票:创建发票、估算、贷记单;通过电子邮件发送;获取PDF
- 采购:记录和管理供应商的采购发票
- 供应商管理:完整的供应商CRUD操作
- 银行业:银行账户、交易、余额
- 财务报告:损益表、资产负债表、增值税义务、账龄报告
- 系统操作:帐户详细信息、事件日志、注释
快速开始
1.克隆和安装
git clone https://github.com/marcusquinn/quickfile-mcp.git
cd quickfile-mcp
npm install
npm run build记下步骤3的安装路径(运行 pwd 看到它)。内置服务器位于 /dist/index.js.
2.配置凭据
创建QuickFile API凭据:
mkdir -p ~/.config/.quickfile-mcp
cat > ~/.config/.quickfile-mcp/credentials.json 第三方集成>API密钥
1. **应用标识符**:帐户设置>创建QuickFile应用程序>复制应用程序ID
### 3.添加到您的MCP客户端
此服务器可与任何兼容MCP的客户端配合使用。替换 `/absolute/path/to/quickfile-mcp` 下面是步骤1的实际路径(输出 `pwd`).
**克劳德桌面版** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
{ "mcpServers": { "quickfile": { "command": "node", "args": ["/absolute/path/to/quickfile-mcp/dist/index.js"] } } }
**克劳德代码**:
claude mcp add quickfile node /absolute/path/to/quickfile-mcp/dist/index.js
**开源代码** (`~/.config/opencode/opencode.json`):
{ "mcp": { "quickfile": { "type": "local", "command": ["node", "/absolute/path/to/quickfile-mcp/dist/index.js"], "enabled": true } } }
您还可以使用安装脚本自动配置客户端:
./setup.sh client
### 4.开始使用
重新启动MCP客户端并尝试:
"Show me my QuickFile account details" "List my recent invoices" "Search for clients named 'Smith'" "Get the profit and loss report for this year"
## 可用工具
### 系统(3个工具)
|工具|说明|
| -------------------------------- | --------------------------------------------------- |
| `quickfile_system_get_account` |获取账户详细信息(公司、增值税状态、年末)|
| `quickfile_system_search_events` |搜索审核事件日志|
| `quickfile_system_create_note` |为发票、客户等添加注释。 |
### 客户端(7个工具)
|工具|说明|
| ---------------------------------- | -------------------------------------------- |
| `quickfile_client_search` |按姓名、电子邮件、邮政编码搜索客户|
| `quickfile_client_get` |获取完整的客户详细信息|
| `quickfile_client_create` |创建新客户端|
| `quickfile_client_update` |更新客户端详细信息|
| `quickfile_client_delete` |删除客户端|
| `quickfile_client_insert_contacts` |向客户端添加联系人|
| `quickfile_client_login_url` |获取客户端门户的无密码登录URL|
### 发票(8个工具)
|工具|说明|
| --------------------------------------- | --------------------------------------------- |
| `quickfile_invoice_search` |按类型、客户、日期、状态搜索发票|
| `quickfile_invoice_get` |获取包含行项目的完整发票|
| `quickfile_invoice_create` |创建发票、估价单或贷记单|
| `quickfile_invoice_delete` |删除发票|
| `quickfile_invoice_send` |通过电子邮件发送发票|
| `quickfile_invoice_get_pdf` |获取PDF下载URL|
| `quickfile_estimate_accept_decline` |接受或拒绝估算|
| `quickfile_estimate_convert_to_invoice` |将估算转换为发票|
### 采购(4个工具)
|工具|说明|
| --------------------------- | ------------------------ |
| `quickfile_purchase_search` |搜索采购发票|
| `quickfile_purchase_get` |获取购买详情|
| `quickfile_purchase_create` |创建采购发票|
| `quickfile_purchase_delete` |删除采购发票|
### 供应商(4个工具)
|工具|说明|
| --------------------------- | --------------------- |
| `quickfile_supplier_search` |搜索供应商|
| `quickfile_supplier_get` |获取供应商详细信息|
| `quickfile_supplier_create` |创建新供应商|
| `quickfile_supplier_delete` |删除供应商|
### 银行业务(5种工具)
|工具|说明|
| ----------------------------------- | ---------------------- |
| `quickfile_bank_get_accounts` |列出所有银行账户|
| `quickfile_bank_get_balances` |获取账户余额|
| `quickfile_bank_search` |搜索交易记录|
| `quickfile_bank_create_account` |创建银行账户|
| `quickfile_bank_create_transaction` |添加银行交易|
### 报告(6个工具)
|工具|说明|
| ------------------------------------ | -------------------------- |
| `quickfile_report_profit_loss` |损益报告|
| `quickfile_report_balance_sheet` |资产负债表报告|
| `quickfile_report_vat_obligations` |增值税申报表(已提交并打开)|
| `quickfile_report_ageing` |债务人/债权人账龄|
| `quickfile_report_chart_of_accounts` |列出标称代码|
| `quickfile_report_subscriptions` |定期订阅|
## 发展
npm install # Install dependencies npm run build # Build TypeScript npm run dev # Development mode (auto-reload) npm test # Unit tests (no API calls) npm run test:integration # Integration tests (requires credentials) npm run test:all # All tests npm run typecheck # Type check npm run lint # Lint npm run secretlint # Scan for secrets
启用调试模式以查看原始API请求/响应(已编辑凭据):
QUICKFILE_DEBUG=1 node dist/index.js
### MCP检验员测试
对于开发和调试,请使用官方 [MCP检查员](https://github.com/modelcontextprotocol/inspector) 在没有AI客户端的情况下直接调用工具:
npx @modelcontextprotocol/inspector node dist/index.js
然后打开 `http://localhost:5173` 浏览所有37个工具,填写参数,查看原始JSON响应。
## 建筑
quickfile-mcp/ ├── src/ │ ├── index.ts # MCP server entry point │ ├── api/ │ │ ├── auth.ts # MD5 authentication │ │ └── client.ts # HTTP client │ ├── tools/ │ │ ├── index.ts # Tool registry & exports │ │ ├── utils.ts # Shared utilities (error handling, logging) │ │ ├── schemas.ts # Zod validation schemas │ │ ├── system.ts # System tools (3) │ │ ├── client.ts # Client tools (7) │ │ ├── invoice.ts # Invoice & estimate tools (8) │ │ ├── purchase.ts # Purchase tools (4) │ │ ├── supplier.ts # Supplier tools (4) │ │ ├── bank.ts # Bank tools (5) │ │ └── report.ts # Report tools (6) │ └── types/ │ └── quickfile.ts # TypeScript types ├── tests/ │ ├── unit/ # Unit tests (201 tests, ~96% coverage) │ └── integration/ # API integration tests (19 tests) ├── .agents/ # AI assistant documentation (AGENTS.md) └── .github/workflows/ # CI/CD (test, lint, build, release)
## 贡献
QuickFile API对元素排序和所需字段有严格的要求。贡献时:
1. **始终检查官方API架构** 在https://api.quickfile.co.uk/
1. **使用Context7进行人工智能辅助开发**: https://context7.com/websites/api_quickfile_co_uk
1. **阅读AGENTS.md** 针对API异常、响应结构模式和常见工作流
## 凭证安全
- 凭据存储在 `~/.config/.quickfile-mcp/credentials.json`
- 文件权限应为600(仅限所有者读/写)
- **从不将凭据提交到版本控制**
- API密钥提供完全访问-将其视为密码
- **分泌** 在预提交时自动运行,以防止意外的秘密泄露
## API费率限制
QuickFile的默认限制为 **每天1000个API调用** 每个账户。如果您需要增加此功能,请联系QuickFile支持。
## 相关项目
- [QuickFile](https://www.quickfile.co.uk/) -英国会计软件
- [QuickFile API文档](https://api.quickfile.co.uk/)
- [模型上下文协议](https://modelcontextprotocol.io/) -AI工具集成协议规范
- [AI DevOps框架](https://github.com/marcusquinn/aidevops) -人工智能基础设施管理
## 许可证
MIT许可证-请参阅 [许可证](LICENSE) 文件以获取详细信息。
**由马库斯·奎因创作** -版权所有2025-2026