kmacman
MCP Serverkmacmanpublic

leantime mcp

基于 Python 的 Leantime 集成工具,通过 API 提供项目、任务和用户管理功能。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

基于 Python 的 Leantime 集成工具,通过 API 提供项目、任务和用户管理功能。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Leantime MCP Server

A Python-based MCP (Model-Control-Provider) server for Leantime integration, providing tools to interact with a Leantime instance via its API.

Features

  • REST API for executing Leantime-related tools
  • Tools for managing projects, tasks, users, and timesheets
  • Batch execution support for multiple tools
  • FastAPI-based with async request handling
  • Compatible with Claude's MCP protocol

Setup

  1. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Create a .env file:

    cp .env.example .env
    

    Update the values with your Leantime instance information.

Running the Server

Start the server with:

python run.py

The server will be available at http://localhost:8000 by default.

Claude MCP Configuration

To use this server with Claude, add the following to your Claude MCP configuration file:

{
    "mcpServers": {
        "leantime": {
            "command": "python",
            "args": [
                "run.py"
            ],
            "cwd": "/path/to/leantime-mcp"
        }
    }
}

Make sure to replace /path/to/leantime-mcp with the actual path to where you've installed this server. On Windows, you would use a path format like C:\\Users\\username\\leantime-mcp or use forward slashes: C:/Users/username/leantime-mcp.

Once the MCP server is properly configured, Claude will automatically have access to all the Leantime tools provided by this server.

API Endpoints

  • GET /: Check if the server is running
  • GET /tools: List all available tools
  • POST /tools/{tool_name}: Execute a specific tool
  • POST /batch: Execute multiple tools in a batch

Available Tools

Projects

  • list_projects: Lists all available projects in Leantime
  • get_project: Gets details of a specific project in Leantime
  • create_project: Creates a new project in Leantime

Tasks

  • list_tasks: Lists tasks in Leantime, optionally filtered by project
  • get_task: Gets details of a specific task in Leantime
  • create_task: Creates a new task in Leantime
  • update_task: Updates an existing task in Leantime

Users

  • list_users: Lists all users in Leantime
  • get_user: Gets details of a specific user in Leantime

Timesheets

  • list_timesheets: Lists timesheet entries in Leantime
  • create_timesheet: Creates a new timesheet entry in Leantime

Example Usage

List Projects

curl -X POST "http://localhost:8000/tools/list_projects" \
     -H "Content-Type: application/json" \
     -d '{"name": "list_projects", "input": {}}'

Create Task

curl -X POST "http://localhost:8000/tools/create_task" \
     -H "Content-Type: application/json" \
     -d '{
           "name": "create_task", 
           "input": {
             "title": "New Task",
             "projectId": 1,
             "description": "This is a new task",
             "status": "new"
           }
         }'

Batch Execution

curl -X POST "http://localhost:8000/batch" \
     -H "Content-Type: application/json" \
     -d '[
           {"name": "list_projects", "input": {}},
           {"name": "list_tasks", "input": {"project_id": 1}}
         ]'

Development

Project Structure

leantime-mcp/
├── config/             # Configuration settings
├── src/
│   └── app/            # Application code
│       ├── services/   # Services (e.g., Leantime API client)
│       └── tools/      # Tool implementations
├── tests/              # Test files
├── .env.example        # Example environment variables
├── requirements.txt    # Python dependencies
├── run.py              # Server entry point
└── README.md           # This file

Testing

Run tests with:

pytest

Quick Start

1

Clone the repository

git clone https://github.com/kmacman/leantime-mcp
2

Install dependencies

cd leantime-mcp
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerkmacman
Repoleantime-mcp
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation