leantime-mcp
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., "@leantime-mcpList all open tasks for the website redesign project."
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.
Leantime MCP over HTTP
A stateless TypeScript MCP server for self-hosted Leantime. It exposes 66 tools over Streamable HTTP and talks to Leantime only through its JSON-RPC API at /api/jsonrpc using x-api-key.
It does not connect to MySQL and does not require Redis or its own database.
Architecture
ChatGPT / Claude / Codex
|
| HTTPS MCP + Bearer token
v
https://mcp.example.com/mcp
|
| JSON-RPC + x-api-key
v
https://leantime.example.com/api/jsonrpcRelated MCP server: Leantime MCP Bridge
Tool surface
Area | Tools |
Projects |
|
Tasks |
|
Milestones |
|
Goals / OKRs |
|
Calendar |
|
Timesheets |
|
Sprints |
|
Wiki (docs) |
|
Files |
|
Comments / Status |
|
Timer |
|
Composed convenience tools
These orchestrate multiple Leantime calls or add aggregation/batch semantics:
getFullProjectOverview— project + users + tasks + milestones + comments + timesheets, with partial-failure results.bulkAddTasks/bulkEditTasks— batch execution with a result for each item.addMilestonesForProject— batch milestone creation.scheduleTaskOnCalendar/scheduleDay— converts task selections into calendar blocks.breakdownTask— creates a supplied set of subtasks beneath a parent task.getTimesheetSummary— returns raw entries plus totals by project, user and day.getAllProjectComments/addProjectStatusUpdate— convenient project status/comment operations.
breakdownTask does not invent the decomposition itself. The AI client decides the subtasks and sends them to the tool; the MCP server executes them.
Sprints, Wiki, and Files
Leantime's Kanban board is typically scoped to a sprint. Tasks created via
addTask/bulkAddTasksare not assigned to any sprint by default (sprint: 0); usegetAllSprints/getCurrentSprintIdto find the right sprint ID, then setsprintin the task'svalues(viaeditTask/bulkEditTasks) to make it appear on the board.Wiki tools operate on Leantime's project documentation feature.
createWikimakes a documentation space;createArticleadds a page inside it (values.canvasIdshould be the wiki's ID).getAllWikiHeadlinesrequires a realuserId— Leantime's server errors onnullthere, unlike most other endpoints' optionaluserIdparams.File upload is intentionally not exposed. Leantime's JSON-RPC transport has no multipart/file support, and testing confirmed the server's
uploadendpoint rejects a plain-JSON payload with a server error — there is no working way to upload file bytes through this API.getFilesByModule(list) anddeleteFile(delete) work normally since they carry no binary payload; uploads must go through Leantime's web UI.
1. Leantime API key
Create a Leantime API key for the user/role you want the MCP server to act as. The key's Leantime permissions still apply, so project reporting, cross-user timesheets and writes can be denied by Leantime even though the MCP tool exists.
2. Environment
LEANTIME_URL=https://leantime.example.com
LEANTIME_API_KEY=lt_your_real_key
MCP_BEARER_TOKEN=replace-with-a-separate-long-random-secret
PORT=3000Generate the MCP-side secret separately:
openssl rand -hex 32Do not reuse the Leantime API key as MCP_BEARER_TOKEN.
3. Coolify
A GitHub Actions workflow (.github/workflows/docker-publish.yml) builds this image and pushes it to GitHub Container Registry on every push to main (tagged :latest, :<short-sha>, and any v* release tag).
docker-compose.coolify.yml pulls that prebuilt image rather than building on the Coolify host:
image: ghcr.io/<your-github-owner>/<your-repo>:latestUpdate the <your-github-owner>/<your-repo> placeholder to match your fork, and make sure the GHCR package is public (or add registry credentials in Coolify) so Coolify can pull it.
In Coolify, create a Docker Compose resource pointing at this repo and docker-compose.coolify.yml, then set:
LEANTIME_URL=https://leantime.example.com
LEANTIME_API_KEY=lt_your_real_key
MCP_BEARER_TOKEN=your-random-secretAssign a domain to the service on container port 3000, for example at:
https://mcp.example.comThe MCP endpoint is:
https://mcp.example.com/mcpHealth check:
GET /health4. MCP client
For clients that support remote Streamable HTTP and custom headers:
{
"url": "https://mcp.example.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_BEARER_TOKEN"
}
}5. Test Leantime before MCP
Verify the API key directly first:
curl -sS 'https://leantime.example.com/api/jsonrpc' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_LEANTIME_API_KEY' \
--data '{"jsonrpc":"2.0","id":1,"method":"leantime.rpc.Projects.Projects.getAll","params":{"showClosedProjects":false}}'If that succeeds, the MCP server has a working backend connection.
6. Development
Requires Node.js 22+.
npm install
npm test
npm run build
npm startCurrent tests cover JSON-RPC request/error handling, auth, project/task/milestone/goal/calendar/timesheet/comment/timer mappings, batch partial failures, project overview composition, timesheet aggregation, and the approved 45-tool MCP surface.
Native-value tools
Some create/edit tools intentionally accept a values object instead of trying to duplicate every Leantime field in the MCP schema. This keeps the wrapper forward-compatible with Leantime fields such as assignees, status IDs, dates, tags and custom metadata.
Important examples:
addTask: include at leastprojectIdandheadline.editTask: include the ticketidplus fields to change.addMilestone: includeprojectIdandheadline.createGoal: current Leantime expects a targetcanvasIdinvalues.editGoal: includeidoritemId.addEvent/editEvent: use Leantime calendar value names; this wrapper ensures a non-empty description because current Leantime requires one.logTime: requireshours,kind, and one ofdate,dateString, ortimestamp.
Security model
There are two independent credentials:
MCP bearer token — protects the public
/mcpendpoint.Leantime API key — determines what the MCP server may actually do in Leantime.
Keep the MCP service stateless and put HTTPS in front of it through Coolify/Traefik.
This server cannot be deployed
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
timesheet.io MCP server - manage timers, projects, tasks and reports
1MCP server for Linear project management and issue tracking
- TimequipOAuthcom.timequip
Manage Timequip projects, tasks, comments, members, and dashboards through MCP.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables integration with Leantime project management software, allowing users to manage projects, tickets/tasks, time tracking, sprints, and goals through MCP-compatible tools and n8n workflows.-

Leantime MCP Bridgeofficial
AlicenseNot gradedqualityDmaintenanceA robust proxy bridge that connects MCP clients to the Leantime project management system, enabling seamless interaction with projects and tasks. It supports multiple authentication methods and implements the official MCP SDK for reliable protocol handling.11 npm10MIT- FlicenseNot gradedqualityDmaintenanceFull-featured MCP server integrating all 71 endpoints of the Weeek API as MCP tools for AI clients, enabling task, project, and workspace management via natural language.3-
- FlicenseNot gradedqualityDmaintenanceHTTP MCP server for TaskFrame that enables AI agents to manage projects, tasks, comments, and documents through the TaskFrame API.-