税务顾问服务

一个提供多国税务智能辅助的Model Context Protocol (MCP)服务器,支持税务计算、截止日期跟踪、知识缓存、自动提醒和自主国家发现等功能。

  • by future-coding22
  • TypeScript
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 future-coding22/tax-adviser-mcp

使用说明

🏦 税务顾问MCP服务器

全面 模型上下文协议(MCP) 服务器通过Claude Desktop提供智能多国税务协助。功能包括税务计算、截止日期跟踪、知识缓存、自动提醒和自主国家发现。

✨ 特性

🌍 多国支持(新增!)

  • 基于术语表的体系结构 拥有54个以上的通用税收概念
  • 荷兰已全面实施 (方框1/2/3,BTW,2024年费率)
  • 自主国家探索 通过 add_country 工具
  • 可扩展框架 添加新国家
  • 看 多国指南 详情

📊 核心能力

  • 11 MCP工具 用于税务计算、搜索、建议和国家设置
  • 11 MCP资源 暴露税务数据和知识
  • 3内置提示 用于常见的税务工作流程
  • 国家不可知接口 为未来扩展

🧠 知识缓存系统

  • 缓存首次搜索 获取即时答案
  • 自动网页抓取 来自荷兰官方税务网站
  • 到期管理 具有可配置的刷新功能
  • Git跟踪 用于版本控制
  • 智能相关性评分 搜索结果

🔔 自动提醒

  • 纳税截止日期通知 (所得税、BTW等)
  • 定期付款跟踪 (保险、订阅)
  • 电报集成 安静的时光
  • 自动知识更新 (每周,可配置)
  • 税法变更监测 (每周检查)

🧮 税务计算

  • 方框1:所得税,包括所有扣除和抵免
  • 方框2:巨额利息税
  • 方框3:视为回报的财富税
  • 顺便提一下:个体经营者的增值税计算
  • 情景规划 用于假设分析

🚀 快速开始

先决条件

  • Node.js 18+和npm
  • Claude Desktop(用于MCP集成)
  • 可选:电报机器人(用于通知)

安装

# Clone the repository
git clone https://github.com/yourusername/tax-adviser-mcp.git
cd tax-adviser-mcp

# Install dependencies
npm install

# Run setup wizard
npm run setup

# Build the project
npm run build

# Start the MCP server
npm start

Claude桌面集成

添加到您的Claude桌面配置(claude_desktop_config.json):

{
  "mcpServers": {
    "tax-adviser": {
      "command": "node",
      "args": ["/absolute/path/to/tax-adviser-mcp/dist/index.js"]
    }
  }
}

重新启动克劳德桌面,服务器将可用!

📚 文档

🛠️ 可用工具

工具 说明
get_tax_obligations 在截止日期前获取所有适用的纳税义务
get_upcoming_dues 跟踪定期计划中即将到来的付款
send_reminder 发送带有日程安排的电报通知
calculate_tax_estimate 综合税务计算(方框1/2/3,荷兰BTW)
search_dutch_tax_law 缓存首次网络搜索税法
search_knowledge_base 搜索本地知识缓存
get_knowledge_entry 按ID检索完整的知识条目
refresh_knowledge 手动刷新缓存条目
get_law_changes 检测不同年份之间的税法变化
get_spending_advice 个性化财务优化建议
add_country ⭐ 自主发现和建立新的国家支持

📦 可用资源

资源URI 描述
personal://profile 您的个人税务档案
tax://calendar/{year} 含重要日期的税务日历
tax://rates/{year} 特定年份的税率
tax://deductions/{year} 可用扣除额
tax://rules 完整的税务规章制度
knowledge://base 知识缓存索引
knowledge://stats 缓存统计信息
knowledge://categories 按类别分类的条目
knowledge://recent 最近缓存的条目
knowledge://expired 需要刷新的过期条目

🤖 后台守护程序

守护进程运行计划任务以实现自动化:

# Start the daemon
npm run daemon:start

# Stop the daemon
npm run daemon:stop

# Check daemon status
npm run daemon:status

计划的作业

  • 每天上午9点:税务截止日期提醒
  • 每天上午10点:到期付款提醒
  • 周日凌晨3点:知识缓存刷新
  • 周一上午8点:税法变更监测

🔧 实用程序脚本

# Knowledge management
npm run knowledge:stats    # View cache statistics
npm run knowledge:refresh  # Refresh expired entries

# Configuration
npm run validate           # Validate configuration
npm run setup              # Re-run setup wizard

# Testing
npm test                   # Run all tests
npm run test:watch         # Run tests in watch mode
npm run test:coverage      # Generate coverage report

⚙️ 配置

配置通过以下方式管理 data/config.yaml.关键部分:

# Enable/disable features
telegram:
  enabled: true
  bot_token: "your-bot-token"
  chat_id: "your-chat-id"

# Knowledge cache settings
knowledge:
  enabled: true
  auto_cache: true
  refresh_strategy: weekly
  default_expiry_days: 90

# Tax year
tax:
  year: 2024
  country: NL

# Reminder schedule
reminders:
  enabled: true
  deadline_check_time: "0 9 * * *"  # Daily at 9 AM

看 data/config.example.yaml 所有80+配置选项。

📝 个人资料

您的个人税务信息存储在 data/personal.md:

---
name: Your Name
date_of_birth: 1990-01-01
bsn: 123456789
---

## Income
- Employment: €60,000/year
- Freelance: €30,000/year (registered, BTW number: NL123...)

## Assets
- Savings: €50,000
- Investments: €30,000
- Mortgage: €250,000

## Recurring Payments
| Name | Amount | Frequency | Auto-pay |
|------|--------|-----------|----------|
| Health Insurance | €150 | Monthly | Yes |
| BTW Quarterly | €2,000 | Quarterly | No |

看 data/personal.example.md 一个完整的模板。

🧪 测试

# Run all tests
npm test

# Watch mode
npm run test:watch

# Coverage report
npm run test:coverage

# Specific test file
npm test knowledge-cache

📊 知识缓存

知识缓存会随着时间的推移而学习和改进:

# View statistics
npm run knowledge:stats

# Sample output:
# ═══════════════════════════════════════
#   OVERVIEW
# ═══════════════════════════════════════
#   Total Entries:        47
#   Storage Size:         156 KB
#
# ═══════════════════════════════════════
#   BY CATEGORY
# ═══════════════════════════════════════
#   box3                 12 (25.5%)
#   self_employment      8 (17.0%)
#   income_tax           7 (14.9%)

🔒 隐私和安全

  • 本地优先:本地存储在计算机上的所有数据
  • 无云同步:个人数据永远不会离开您的计算机
  • Git跟踪:知识缓存的可选版本控制
  • 加密通讯:Telegram使用端到端加密
  • 开源:完全透明,自己审核代码

🤝 贡献

欢迎投稿!请阅读 贡献.md 第一。

开发设置

# Install dependencies
npm install

# Run in development mode
npm run dev

# Run linter
npm run lint

# Format code
npm run format

# Type checking
npm run type-check

📄 许可证

MIT许可证-请参阅 许可证 了解详情。

🙏 致谢

🆘 支持

🗺️ 路线图

  • []第11阶段:多国支持(美国、英国、德国等)
  • []用于配置的Web界面
  • []将税务报告导出为PDF格式
  • []与荷兰税务机关整合API
  • []用于提醒的移动应用程序
  • []基于人工智能的税务优化建议

⚠️ 免责声明

本软件仅供参考,不构成专业税务建议。根据您的具体情况,始终咨询合格的税务顾问或会计师。开发人员不对基于此软件做出的任何财务决策负责。


由...制作❤️ 荷兰税务界