# Leantime MCP Server
MCP server for Leantime integration with n8n workflows.
## Features
- Projects (list, get users)
- Tickets/Tasks (create, update, status changes)
- Time tracking (log time, punch in/out, timesheets)
- Sprints and Goals
## Quick Start
### Docker
```bash
docker build -t mcp-leantime .
docker run -p 8000:8000 -e LEANTIME_URL=http://leantime:8080 -e LEANTIME_API_KEY=lt_user_key mcp-leantime
```
### n8n Integration
- Credential Type: MCP Client (HTTP Streamable)
- URL: `http://mcp-leantime:8000/mcp`
## Environment Variables
- `LEANTIME_URL`: Leantime instance URL (default: http://leantime:8080)
- `LEANTIME_API_KEY`: Leantime API key
- `LOG_LEVEL`: Logging level (default: INFO)
## Available Tools
- `list_projects`: Get all accessible projects
- `get_project_users`: Get users assigned to a project
- `create_ticket`: Create new ticket/task
- `get_ticket`: Get ticket details
- `update_ticket`: Update ticket fields
- `update_ticket_status`: Update ticket status
- `log_time`: Log time against a ticket
- `punch_in`: Start timer for a ticket
- `punch_out`: Stop timer for a ticket
- `get_timesheets`: Get timesheet entries
- `get_sprints`: Get all sprints for a project
- `get_goals`: Get all goals
## Production Deployment
See parent repository for Docker Compose deployment to stack_net network.