
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
概览
非官方本地 MCP 服务器,让助手读取和修改 Leantime 的项目、工单、冲刺、里程碑、评论与工时记录。
- 可以做什么
- 列出、搜索、创建和更新项目与客户,并一次调用获取整个项目概览
- 列出、创建、更新和删除工单与子任务,含状态、类型与指派选项
- 管理里程碑与冲刺,包括进度和当前冲刺
- 读取、添加、编辑和删除工单评论,Markdown 会转换为富文本 HTML
- 记录和查询工时条目,并可删除
- 对最多 50 个工单执行批量创建、更新和排期,并把项目快照备份为本地 JSON 文件
- 适用场景
- 当你使用自建或云端的 Leantime 实例,并希望助手在不切换工具的情况下汇报项目状态、分派工单、规划冲刺或登记工时时适用。也适合需要试运行、幂等创建和删除确认的智能体工作流。
- 运行要求
- 以 Rust 二进制通过 stdio 在本地运行,可用安装脚本或 cargo 安装。需要你自己的 Leantime 实例地址,以及在账户中生成的 API 密钥;凭据保存在本地 keyring 文件,或通过 LEANTIME_URL 与 LEANTIME_API_KEY 环境变量提供。需要能访问该实例的网络,吞吐受实例速率限制约束。
安装
在 SourceWeft 中
- 打开 控制台中的 Leantime MCP (Unofficial),将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
leantime-mcp
- MCP Registry name:
mcp-name: io.github.4lador/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: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 KBdryRun: trueon every mutation — same validations,from → todiffs on updates, no write requestsidempotencyKeyon creation tools — a retried call with an already-succeeded key replays the original result instead of writing a duplicate- Result envelopes: structured
truncatedon capped lists,changed/unchangeddiffs 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=denyas 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):
Windows (PowerShell):
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):
From source:
Quick start
Your Leantime API key: My Account → API Keys → Generate on your instance.
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.
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: truerequired by default;LEANTIME_MCP_DESTRUCTIVE_POLICY=denyrefuses them outright,allowskips the gate for CI). Project hiding/deletion is intentionally not exposed. - Dry runs: every mutation tool accepts
dryRun: true— validations run, updates resolvefrom → tovalues (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 (
editorIdvalidated against the real user list, or an explicitunassigned: 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) orleantmcp 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)
Raw HTML in descriptions is escaped before reaching Leantime — it renders as literal text.
All 43 tools (click to expand)
Projects & clients
Tickets
Comments
Time tracking
Milestones
Sprints
Users
Bulk operations
Backup & context
Backup & recovery
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
warningsentry saying so. MCP clients that request progress (_meta.progressToken) also receivenotifications/progresson 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 testvalidates live;leantmcp key rotatemints a replacement and swaps it in. - Windows — the PowerShell installer puts the binary in
%USERPROFILE%\.local\bin; make sure it is onPATH. - 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
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
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版本历史
3- v2.10.1最新Nov 20, 2026
- v2.10.0Nov 19, 2026
- v2.9.0Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分