
leantime mcp
基于 Python 的 Leantime 集成工具,通过 API 提供项目、任务和用户管理功能。
Repository Info
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
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Create a
.envfile:cp .env.example .envUpdate 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 runningGET /tools: List all available toolsPOST /tools/{tool_name}: Execute a specific toolPOST /batch: Execute multiple tools in a batch
Available Tools
Projects
list_projects: Lists all available projects in Leantimeget_project: Gets details of a specific project in Leantimecreate_project: Creates a new project in Leantime
Tasks
list_tasks: Lists tasks in Leantime, optionally filtered by projectget_task: Gets details of a specific task in Leantimecreate_task: Creates a new task in Leantimeupdate_task: Updates an existing task in Leantime
Users
list_users: Lists all users in Leantimeget_user: Gets details of a specific user in Leantime
Timesheets
list_timesheets: Lists timesheet entries in Leantimecreate_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
Clone the repository
git clone https://github.com/kmacman/leantime-mcpInstall dependencies
cd leantime-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.