WeDaka MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@WeDaka MCP Serverclock me in for today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WeDaka MCP Server - TypeScript Implementation
WeDaka MCP Server 的 TypeScript 實作版本,提供員工打卡系統的 Model Context Protocol (MCP) 伺服器功能。
功能特色
免登入設計: 使用環境變數直接認證,無需登入流程
上班打卡: 記錄員工上班時間,支援備註功能和指定日期時間
下班打卡: 記錄員工下班時間,支援備註功能和指定日期時間
工時查詢: 查詢指定月份的所有打卡記錄
補打卡功能: 支援往回補打過去日期的打卡記錄
工作日檢查: 自動檢查日期是否為工作日,防止在假日或非工作日打卡(DateType "1": 工作日、"2": 休假日、"3": 例假日)
未來日期保護: 禁止為未來日期打卡,只能為今天或過去的日期打卡
Related MCP server: Timesheet MCP Server
安裝方式
方式一:從 GitHub 直接安裝(推薦)
# 複製專案並安裝依賴
git clone git@github.com:keith-hung/WeDaka-MCP.git
cd WeDaka-MCP
npm install
npm run build方式二:本地開發安裝
如果您已經有專案檔案:
# 安裝依賴
npm install
# 編譯 TypeScript
npm run build前置需求
Node.js 20.0.0+
Git(用於從 GitHub 安裝)
npm 或 yarn
環境變數設定
使用前需要設定以下環境變數:
export WEDAKA_API_URL="https://your-wedaka-server.com"
export WEDAKA_USERNAME="your-ad-account"
export WEDAKA_DEVICE_ID="your-device-uuid"
export WEDAKA_EMP_NO="your-employee-number"開發腳本
# 編譯 TypeScript
npx tsc
# 開發模式運行
npx tsx src/server.ts
# 運行編譯後的程式
node dist/server.js
# 執行測試
npx jest
# 程式碼檢查
npx eslint src/**/*.ts
# 程式碼格式化
npx prettier --write src/**/*.tsMCP 客戶端設定
Claude Desktop
在 claude_desktop_config.json 中加入:
{
"mcpServers": {
"wedaka": {
"command": "npx",
"args": ["-y", "git+https://github.com/keith-hung/WeDaka-MCP.git"],
"env": {
"WEDAKA_API_URL": "https://your-wedaka-server.com",
"WEDAKA_USERNAME": "your-ad-account",
"WEDAKA_DEVICE_ID": "your-device-uuid",
"WEDAKA_EMP_NO": "your-employee-number"
}
}
}
}VSCode
在 .vscode/settings.json 中加入:
{
"mcp.servers": {
"wedaka": {
"command": "npx",
"args": ["-y", "git+https://github.com/keith-hung/WeDaka-MCP.git"],
"env": {
"WEDAKA_API_URL": "https://your-wedaka-server.com",
"WEDAKA_USERNAME": "your-ad-account",
"WEDAKA_DEVICE_ID": "your-device-uuid",
"WEDAKA_EMP_NO": "your-employee-number"
}
}
}
}注意事項:
將上述設定中的環境變數替換為實際值
重新啟動 Claude Desktop 或 VSCode 以載入設定
首次執行時 npx 會自動從 GitHub 下載並安裝專案
確保使用 Node.js 20.0.0 或更高版本
可用的 MCP Tools
本系統提供以下 MCP tools:
wedaka_clock_in - 上班打卡
wedaka_clock_out - 下班打卡
wedaka_get_timelog - 查詢工時記錄
wedaka_check_work_day - 檢查工作日
Time Log 資料結構
wedaka_get_timelog 回傳的每筆記錄包含以下重要欄位:
WorkItem (記錄類型)
數值 | 意義 | 說明 |
| 上班打卡 | 員工開始工作的時間記錄 |
| 請假 | 員工全天請假 |
| 下班打卡 | 員工結束工作的時間記錄 |
重要:當 WorkItem = '2' 時,表示員工當天全天請假(不會有打卡時間記錄)。
DateType (日期類型)
數值 | 意義 |
| 工作日 |
| 休假日 |
| 例假日 |
其他欄位
WorkTime: 打卡時間 (格式: YYYY/MM/DD HH:MM:SS,請假記錄時為 null)
WorkDate: 打卡日期
Memo: 備註
LeaveHours: 請假時數 (此欄位可能為 0 或 null,不代表實際請假時數)
更多詳細資料結構說明請參考 DEVELOPMENT.md。
專案結構
typescript/
├── src/
│ ├── types/ # TypeScript 類型定義
│ ├── models/ # Zod 驗證模型
│ ├── client/ # API 客戶端
│ ├── server/ # MCP 伺服器實作
│ ├── __tests__/ # 測試檔案
│ └── server.ts # 主要入口點
├── dist/ # 編譯輸出目錄
├── jest.config.js # Jest 測試設定
├── tsconfig.json # TypeScript 設定
├── .eslintrc.js # ESLint 設定
├── .prettierrc # Prettier 設定
└── package.json # 專案設定技術棧
TypeScript: 型別安全的 JavaScript
Zod: 執行時型別驗證
Axios: HTTP 客戶端
@modelcontextprotocol/sdk: MCP SDK
Jest: 測試框架
ESLint: 程式碼檢查
Prettier: 程式碼格式化
開發指南
程式碼風格
使用 TypeScript 嚴格模式
遵循 ESLint 和 Prettier 規則
使用 Zod 進行資料驗證
採用 async/await 處理異步操作
測試
# 執行所有測試
npx jest
# 執行特定測試檔案
npx jest src/__tests__/WedakaApiClient.test.ts
# 執行測試並生成覆蓋率報告
npx jest --coverage程式碼品質
# 檢查程式碼風格
npx eslint src/**/*.ts
# 自動修復可修復的問題
npx eslint src/**/*.ts --fix
# 格式化程式碼
npx prettier --write src/**/*.ts授權
MIT License
Available Tools
4 toolswedaka_check_work_dayA
Check if a specific date is a work day. Returns the date type: 1=work day, 2=holiday, 3=weekend.
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Date in YYYY-MM-DD format |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It explains the return values (1, 2, 3) and implies a read-only check, but does not mention edge cases, error handling, or safety details. This is adequate for a simple check tool but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose, and includes essential return value details. Every sentence earns its place with no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description adequately covers purpose and return values. It is complete for typical usage, though it does not address invalid date behavior, which is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides 100% coverage for the single parameter 'date' with format description. The description only adds 'specific date,' which does not add meaningful semantics beyond the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Check if a specific date is a work day.' It uses a specific verb and resource, and the return type explanation (1=work day, 2=holiday, 3=weekend) further clarifies its purpose. This distinguishes it from sibling tools like clock in/out and get timelog.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the use case: checking if a date is a work day. No explicit alternatives or exclusions are given, but the sibling tools are clearly different, so the context is unambiguous. The description effectively communicates when to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wedaka_clock_inA
Clock in (上班打卡). Records the start of work for an employee. Supports custom date/time for retroactive entries.
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Additional notes (optional) | |
| clock_date | No | Date in YYYY-MM-DD format (optional, defaults to today) | |
| clock_time | No | Time in HH:MM:SS format (optional, defaults to current time) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the core behavior (recording start of work) and a notable feature (custom date/time for retroactive entries), but doesn't mention permissions, error conditions, or idempotency. This is more transparent than a bare 'Clock in' but still leaves some behavioral aspects undisclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three short sentences, front-loaded with the action ('Clock in'), and every sentence adds value: what it does, for whom, and a key capability. There is no unnecessary fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a simple tool with a fully documented schema and no output schema. The description clearly explains the primary purpose and the retroactive date/time feature, which is sufficient for an agent to select and invoke the tool correctly. It doesn't explain return values, but that is not required given the simplicity and lack of output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds context about retroactive entries for date/time parameters, but it doesn't add extra meaning beyond what the schema already provides. No compensation is needed given the high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Clock in') and the resource ('Records the start of work for an employee'). It distinguishes from sibling tools like wedaka_clock_out (clocking out) and wedaka_get_timelog (retrieving logs), leaving no ambiguity about its purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage at the start of work and explicitly mentions support for retroactive entries, giving clear context. However, it doesn't explicitly contrast with alternatives (e.g., 'use wedaka_clock_out for clocking out'), but the sibling names and clear purpose make the intended usage obvious.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wedaka_clock_outA
Clock out (下班打卡). Records the end of work for an employee. Supports custom date/time for retroactive entries.
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Additional notes (optional) | |
| clock_date | No | Date in YYYY-MM-DD format (optional, defaults to today) | |
| clock_time | No | Time in HH:MM:SS format (optional, defaults to current time) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the ability to 'Support custom date/time for retroactive entries,' which is useful. However, it does not mention potential side effects such as whether a prior clock-in is required, whether duplicate entries are handled, or idempotency, leaving some behavioral ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the primary purpose, and adds the key behavioral detail about retroactive entries without waste. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with three optional parameters and no output schema, the description adequately explains the core purpose and the notable retroactive entry feature. It does not cover edge cases like prerequisites, but given the tool's simplicity and the complete schema, it is reasonably complete. A slightly more detailed note about validation or return values would elevate it to 5.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents the parameters. The description adds marginal value by mentioning 'custom date/time' which maps to clock_date and clock_time, but it does not explain the note parameter beyond what the schema provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Clock out' and 'Records the end of work for an employee.' It uses a specific verb (clock out/record) and resource (end of work), and the sibling tool wedaka_clock_in makes the distinction obvious without needing explicit differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: use when an employee is ending their workday. However, it does not explicitly mention when not to use it or suggest alternatives like wedaka_clock_in for starting work or wedaka_get_timelog for viewing logs. The context is clear but lacks explicit exclusions or named alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wedaka_get_timelogA
Get employee time log records for a specific month. Returns clock-in/out times, leave records, and work day information.
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | Year (e.g., 2024) | |
| month | Yes | Month (1-12) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. The verb 'Get' and the phrase 'Returns...' imply a read-only operation and disclose the content of the response. However, it does not explicitly state whether the operation is read-only, mention any permission requirements, or clarify if it returns data for the current user or all employees. This is acceptable but not fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences, front-loaded with the core purpose. Every word earns its place: the first sentence states the action and scope, the second summarizes the expected return contents. No redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with two parameters and no output schema, the description sufficiently explains what it does and what it returns. It does not detail the structure of the returned data (e.g., list vs object), and it omits whether the logs are for the current employee or all employees, but these are minor gaps for the tool's simplicity. The description is largely complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides 100% coverage with clear descriptions for both parameters (year and month), including ranges and examples. The description only adds the phrase 'for a specific month,' which does not meaningfully enhance the schema's parameter documentation. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: retrieving employee time log records for a specific month. It uses a specific verb ('Get') and resource ('time log records'), and the mention of 'clock-in/out times, leave records, and work day information' provides concrete scope. This distinguishes it from sibling tools like wedaka_clock_in/out (actions) and wedaka_check_work_day (single-day check).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use when monthly aggregated time log data is needed, which differentiates it from the daily/action-oriented sibling tools. However, it does not explicitly state when not to use it or name alternatives, so it lacks explicit exclusionary guidance but provides clear context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
wedaka_check_work_day - First observed
wedaka_clock_in - First observed
wedaka_clock_out - First observed
wedaka_get_timelog
TDQS
Scored across 4 tools
Each tool targets a distinct action (clock in, clock out, view logs, check work day) with no overlapping purposes. Descriptions clearly differentiate the functions.
All tools follow a consistent verb_noun pattern with the wedaka_ prefix, making the API predictable and easy to navigate.
4 tools is well-scoped for a time-tracking server, covering essential operations without unnecessary bloat or missing core actions.
The set covers the full clocking lifecycle: clock in, clock out, log retrieval, and work-day checking. While leave management appears in timelog data, it may be outside the server's intended scope.
Maintenance
Related MCP Connectors
- mcp-serverOAuthio.klokin
MCP server exposing klokin time-tracking operations (employees, time entries, stores) to AI clients.
MCP server providing attendance data queries via the CloudTime API.
- TimequipOAuthcom.timequip
Manage Timequip projects, tasks, comments, members, and dashboards through MCP.
isolved and ApplicantPro jobs, tenant discovery, and change detection as an MCP server.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables interaction with employee management systems through a standardized MCP interface. Supports comprehensive employee operations including CRUD operations, search, filtering by level/status, and data synchronization.-

Timesheet MCP Serverofficial
AlicenseBqualityBmaintenanceEnables natural language control of the Timesheet API for timer management, task tracking, and project management through MCP tools.5049 npmMIT- AlicenseAqualityBmaintenanceEnables clocking in/out, viewing work status, and managing time entries on Woffu via MCP tools.93MIT
- AlicenseAqualityBmaintenanceEnables tracking work time with start/stop timers, logging entries, and generating reports.46 npm55 PyPIMIT