Leantime MCP (Unofficial)

io.github.4lador由 GitHub 帳號 4lador 發布v2.10.1更新於 Nov 20, 2026

Unofficial MCP server for Leantime: 43 agent-first tools, backup/restore, dry-run validation

已驗證STDIO僅桌面效率與工作流開發者工具

概覽

AI 產生的概覽

非官方本機 MCP 伺服器,讓助理讀取與修改 Leantime 的專案、工單、衝刺、里程碑、留言與工時紀錄。

可以做什麼
  • 列出、搜尋、建立與更新專案和客戶,並用一次呼叫取得整個專案概況
  • 列出、建立、更新與刪除工單和子任務,含狀態、類型與指派選項
  • 管理里程碑與衝刺,包括進度和目前衝刺
  • 讀取、新增、編輯與刪除工單留言,Markdown 會轉成富文字 HTML
  • 記錄與查詢工時項目,並可刪除
  • 對最多 50 張工單執行批次建立、更新與排程,並把專案快照備份成本機 JSON 檔
適用情境
當你使用自架或雲端的 Leantime 實例,並希望助理不必切換工具就能回報專案狀態、分派工單、規劃衝刺或登記工時時適用。也適合需要試執行、冪等建立與刪除確認的代理工作流程。
執行需求
以 Rust 二進位檔透過 stdio 在本機執行,可用安裝腳本或 cargo 安裝。需要你自己的 Leantime 實例網址,以及在帳號中產生的 API 金鑰;憑證存於本機 keyring 檔案,或透過 LEANTIME_URL 與 LEANTIME_API_KEY 環境變數提供。需要能連線該實例的網路,吞吐量受實例速率限制影響。
安裝前請注意
它會用你的 API 金鑰操作你的 Leantime 資料,因此在讓代理進行批次修改前請先備份;README 說明備份是盡力而為、並非原子操作。它可寫入、更新與刪除資料,不過刪除需確認,並提供唯讀設定與禁止破壞性操作的策略。暫時性錯誤可能造成結果不明,重試前應先核實。此伺服器為非官方專案,不受廠商支援。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Leantime MCP (Unofficial),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

leantime-mcp

  • MCP Registry name: mcp-name: io.github.4lador/leantime-mcp

[leantime-mcp]

[CI] [MCP Registry] [crates.io] [License: MIT]

An unofficial Model Context Protocol server for Leantime, designed agent-first: it lets LLM tools (opencode, Claude Code, Claude Desktop, Cursor, Codex, or any MCP client) work on your Leantime projects through 43 tools with dry-run validation, bulk operations, backup/restore and one-call project context.

It is an independent, open-source integration — stdio only, running locally with your own API key and your own instance. It does not aim to replace Leantime's official offerings; if you want vendor-supported integrations, use those.

~3 MB self-contained binary (rustls — no system OpenSSL), ~1.2 ms median startup and ~5 MB idle memory (VmRSS after handshake — measured on a Linux x86_64 dev machine, n=100 spawns).

Documentation: Quick start · Configuration · Safety · Tools · Troubleshooting · Harness setup · Backup & recovery · Migration from v1.x · CHANGELOG · CONTRIBUTING · SECURITY

Demo

An example session (abridged):

You: What's the status of the Acme launch project?

Agent calls leantime_project_context — one call returning progress, health, sprint and milestones:

json
{ "project": { "name": "Acme launch", "progress": { "percentDone": 64.5, "ticketsTotal": 279, "ticketsDone": 180 } },  "health": { "blocked": 0, "overdue": 7, "unassigned": 3, "openTotal": 99 },  "currentSprint": { "name": "Sprint 4", "status": "current", "daysRemaining": 6, "openTickets": 8 } }

Agent: Acme launch is at 64.5% (180 of 279 tickets done). 99 tickets are open — 7 overdue, 3 unassigned, none blocked. Sprint 4 ends in 6 days with 8 open tickets; the milestone in progress (PHASE 8) sits at 47.8%.

Features

  • 43 tools: projects, tickets, subtasks, milestones, sprints, comments, time tracking, bulk operations
  • leantime_project_context — the whole project picture in one call (progress, health, sprint, milestones), under 4 KB
  • dryRun: true on every mutation — same validations, from → to diffs on updates, no write requests
  • idempotencyKey on creation tools — a retried call with an already-succeeded key replays the original result instead of writing a duplicate
  • Result envelopes: structured truncated on capped lists, changed/unchanged diffs on updates — agents see what a call actually did
  • LEANTIME_MCP_PROFILE=readonly — a server-wide execution profile that removes write capabilities entirely
  • Backup retention (LEANTIME_MCP_BACKUP_RETENTION_DAYS), atomic backup writes, and a restore manifest mapping every old→new id
  • Bulk operations up to 50 items, validated upfront (all-or-nothing on creates)
  • Backup & restore — snapshot a project to local JSON, rebuild it into a new project
  • Adaptive rate-limit retries, transparent to agents
  • Credentials in a local keyring (mode 0600) — harness configs hold a bare command
  • Deletes confirm-gated; LEANTIME_MCP_DESTRUCTIVE_POLICY=deny as an emergency stop
  • Per-instance tool management — disable what you don't use, read-only mode in two commands
  • Markdown → Leantime rich HTML, converted deterministically server-side

Install

Linux / macOS (x86_64, aarch64):

bash
curl -fsSL https://raw.githubusercontent.com/4lador/leantime-mcp/main/install.sh | sh

Windows (PowerShell):

powershell
irm https://raw.githubusercontent.com/4lador/leantime-mcp/main/install.ps1 | iex

Both installers verify the published SHA-256 checksum before installing and abort on mismatch. Release binaries cover all 5 targets — Linux (x86_64, aarch64), Windows x86_64 and macOS (Intel, ARM) — on the releases page.

Via cargo (requires the Rust toolchain):

bash
cargo install leantime-mcp   # installs the leantmcp binary to ~/.cargo/bin

From source:

bash
cargo build --release   # → target/release/leantmcp

Quick start

bash
leantmcp url set https://your-instance.leantime.io   # onceleantmcp key set                                      # once — hidden promptleantmcp setup <your-harness>                         # writes the configleantmcp doctor                                       # verify everything end-to-end

Your Leantime API key: My Account → API Keys → Generate on your instance.

HarnessDefault scopeConfig file
opencodeglobal~/.opencode/opencode.json
Claude Codeproject./.mcp.json
Claude Desktopglobalclaude_desktop_config.json (path per OS)
Cursorglobal~/.cursor/mcp.json
Codexglobal~/.codex/config.toml

Every generated config is a bare command with no credentials — the binary resolves them from the keyring at startup. Project-scoped setups, --scope/--instance/--name options and multiple instances: see Harness setup.

Configuration

Credentials live in named instance profiles — ~/.config/leantime/instances/<name>/ (api-key, mode 0600, and instance-url), with a default file naming the default. The key is read from the keyring file or environment — it is not accepted as a command-line argument (shell history) and is not logged; key commands are CLI-only and are not exposed as MCP tools.

bash
leantmcp url show          # resolved URL + where it comes fromleantmcp key show          # masked display (lt_h13…Fc3O)leantmcp key test          # live validation against the instanceleantmcp key rotate        # mint a new key (same role), verify it live, replace the stored oneleantmcp instance add …    # multiple Leantime instances (see Harness setup)

LEANTIME_URL / LEANTIME_API_KEY environment variables remain available as per-run overrides; LEANTIME_INSTANCE selects a profile. Resolution order: env (explicit override) → LEANTIME_INSTANCE profile → the default file.

Safety

This software is provided without warranty (MIT). It drives Leantime with your API key on your behalf — back up your Leantime data before letting agents operate on it.

  • Deletes are confirm-gated (confirm: true required by default; LEANTIME_MCP_DESTRUCTIVE_POLICY=deny refuses them outright, allow skips the gate for CI). Project hiding/deletion is intentionally not exposed.
  • Dry runs: every mutation tool accepts dryRun: true — validations run, updates resolve from → to values (with status labels), bulk tools return per-item previews, and no write request is sent. Agent guidance is built into the tool descriptions on a three-tier policy: direct execution for explicit values, dry-run-then-confirm when the agent chose the values itself, dry-run mandated for bulk.
  • Assignment is mandatory on ticket/milestone creation (editorId validated against the real user list, or an explicit unassigned: true).
  • Tool management: disabled tools are omitted from tools/list (no context-window cost) and calling one is refused with an actionable error. Read-only mode: leantmcp tools disable all && leantmcp tools enable readonly. State is stored per instance profile.
  • Backup-first: leantime_backup_project (MCP) or leantmcp backup (CLI) snapshot a project cheaply — agents are instructed to use it before bulk modifications. See Backup & recovery.

Tools

43 tools across 9 domains: projects & clients (8), tickets (11), comments (4), time tracking (4), milestones (6), sprints (4), users (1), bulk operations (3), backup & context (2). Updates use the patch API — only provided fields change. Descriptions follow a Markdown subset converted server-side; raw HTML in input is escaped.

Supported Markdown subset (for descriptions and comments)
MarkdownResult
# … ####Headings (levels 5+ clamp to h4)
blank-line separated textParagraphs (single newlines become line breaks)
- item / 1. itemUnordered / ordered lists (nesting supported)
- [ ] x / - [x] xInteractive checklists
**bold**, *italic*, ~~strike~~Emphasis
`code` and fenced ``` blocksInline and block code
[label](https://…)Links (http/https/mailto only)
> quoteBlockquote
---Horizontal rule

Raw HTML in descriptions is escaped before reaching Leantime — it renders as literal text.

All 43 tools (click to expand)

Projects & clients

ToolDescription
leantime_list_projectsList all projects
leantime_get_projectGet project details
leantime_get_project_progressGet project progress metrics
leantime_create_projectCreate a project (Markdown details, clientId required)
leantime_update_projectUpdate a project (patch — only provided fields change)
leantime_find_projectsSearch projects by name
leantime_list_project_usersList users assigned to a project (valid editorId candidates)
leantime_list_clientsList clients (clientId needed to create projects)

Tickets

ToolDescription
leantime_list_ticketsList tickets with filters (status, milestone, sprint, user, type, search)
leantime_get_ticketGet ticket details
leantime_get_ticket_urlTicket browser URL (deep link) — verifies existence, returns headline and projectId; link sessions/PRs to tickets
leantime_create_ticketCreate a ticket (Markdown description, mandatory assignment, subtasks via dependingTicketId; dryRun supported)
leantime_update_ticketUpdate a ticket (patch — only provided fields change; dryRun supported)
leantime_delete_ticketDelete a ticket (confirm-gated)
leantime_list_subtasksList a ticket's subtasks
leantime_my_tasksOpen tickets assigned to a user (default: the API key owner)
leantime_get_ticket_optionsPriorities, efforts, kanban columns and ticket types
leantime_get_statusesGet status labels for a project
leantime_get_ticket_typesGet ticket types for a project

Comments

ToolDescription
leantime_list_commentsList a ticket's discussion
leantime_add_commentComment on a ticket (Markdown converted to rich HTML)
leantime_update_commentEdit a comment (Markdown)
leantime_delete_commentDelete a comment (confirm-gated)

Time tracking

ToolDescription
leantime_log_timeLog hours on a ticket (add accumulates, set is idempotent; dryRun supported)
leantime_get_ticket_timeTotal and per-day booked time for a ticket
leantime_list_timesheetsList time entries between two dates
leantime_delete_timesheet_entryDelete a time entry (confirm-gated)

Milestones

ToolDescription
leantime_list_milestonesList milestones of a project
leantime_get_milestoneGet milestone details
leantime_create_milestoneCreate a milestone (Markdown description, mandatory assignment; dryRun supported)
leantime_update_milestoneUpdate a milestone (patch; dryRun supported)
leantime_get_milestone_progressCompletion % (effort × priority weighted, Leantime's formula)
leantime_delete_milestoneDelete a milestone (confirm-gated; its tickets are kept)

Sprints

ToolDescription
leantime_list_sprintsList sprints of a project
leantime_create_sprintCreate a sprint
leantime_update_sprintUpdate a sprint (name/dates)
leantime_get_current_sprintSprint in progress (or next upcoming), computed from dates

Users

ToolDescription
leantime_list_usersList all users (id, name) — for assignment

Bulk operations

ToolDescription
leantime_bulk_create_ticketsCreate up to 50 tickets — validated upfront, Markdown converted, per-item results (dryRun supported)
leantime_bulk_update_ticketsUpdate up to 50 tickets via patch — per-item results (dryRun supported)
leantime_bulk_schedule_ticketsSchedule up to 50 tickets (sprint, dates) via patch

Backup & context

ToolDescription
leantime_backup_projectDump a project to a timestamped local JSON file (milestones, tickets, sprints — the response is a summary only, not the data)
leantime_project_contextFull project overview in one call (progress, health, sprint, milestones, ticket summary, recent activity) — under 4 KB, the agent's natural first call

Backup & recovery

bash
leantmcp backup --project 3 --full   # snapshot incl. comments (~/.config/leantime/backups/, 0600)leantmcp restore backup.json         # dry-run, then --confirm to execute

Restore writes the backup into a newly created project — it does not merge into, or write to, an existing project. Large projects are handled via date-window pagination (best-effort snapshot, not atomic). Details, env vars and rate-limit behavior: Backup & recovery.

Troubleshooting

  • Start with leantmcp doctor — it checks the key file, permissions, config and the key against the live instance.
  • Bulk operations are slow — the instance's rate limit governs throughput (Leantime defaults to 10 req/min); retries are transparent but a 50-item batch can take minutes. Prefer chunks of ≤ 10 items per call on low-limit instances. When a batch is estimated to outlast typical MCP client timeouts (~60 s), the dry-run and execution envelopes carry an explicit warnings entry saying so. MCP clients that request progress (_meta.progressToken) also receive notifications/progress on every API call and every rate-limit wait, which lets timeout-aware clients keep the call alive.
  • "Ambiguous outcome" error after a mutation — the instance returned a transient 5xx after the request was sent; the change may or may not have been applied. Verify the result (re-read the entity) before retrying — a blind retry can duplicate it.
  • Key rejected — leantmcp key test validates live; leantmcp key rotate mints a replacement and swaps it in.
  • Windows — the PowerShell installer puts the binary in %USERPROFILE%\.local\bin; make sure it is on PATH.
  • Still stuck? Open an issue.

Why this isn't for you

  • You want vendor-supported, official integrations — use Leantime's official offerings; this project is independent and unofficial.
  • You need a hosted/remote (HTTP) MCP server — leantmcp is stdio-only and runs locally next to your MCP client.
  • You need project deletion or hiding — intentionally not exposed by this server.

Development

bash
cargo build --releasecargo test                          # parallel works — env-mutating suites hold lockscargo fmt --all --check && cargo clippy --all-targets -- -D warnings

A pinned docker Leantime + MySQL instance ships with the repo (docker compose up -d, then scripts/local-instance-bootstrap.sh). The full test-suite guide lives in CONTRIBUTING.md; CI runs unit tests on Linux, Windows and macOS plus an exhaustive e2e suite against the docker instance.

License

MIT

Leantime is a product of its respective owners. This project is an independent, unofficial integration and is not affiliated with or endorsed by the Leantime team.

來源:README.md,提交 202a1f0

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

3
  1. v2.10.1最新Nov 20, 2026
  2. v2.10.0Nov 19, 2026
  3. v2.9.0Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分