@@ -17,35 +17,61 @@ A Model Context Protocol (MCP) server that provides seamless integration with [O
1717
1818## Prerequisites
1919
20- - Python 3.8 or higher
20+ - Python 3.10 or higher
21+ - [ uv] ( https://docs.astral.sh/uv/ ) (fast Python package manager)
2122- An OpenProject instance (cloud or self-hosted)
2223- OpenProject API key (generated from your user profile)
2324
2425## Installation
2526
26- 1 . Clone the repository:
27+ ### 1. Install uv (if not already installed)
28+
29+ ** macOS/Linux:**
30+ ``` bash
31+ curl -LsSf https://astral.sh/uv/install.sh | sh
32+ ```
33+
34+ ** Windows:**
35+ ``` powershell
36+ powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
37+ ```
38+
39+ ** Alternative (using pip):**
40+ ``` bash
41+ pip install uv
42+ ```
43+
44+ ### 2. Clone and Setup the Project
45+
2746``` bash
2847git clone https://github.com/yourusername/openproject-mcp.git
2948cd openproject-mcp
3049```
3150
32- 2 . Create a virtual environment:
51+ ### 3. Create Virtual Environment and Install Dependencies
52+
3353``` bash
34- python -m venv venv
35- source venv/bin/activate # On Windows: venv\Scripts\activate
54+ # Create virtual environment and install dependencies in one command
55+ uv sync
3656```
3757
38- 3 . Install dependencies:
58+ ** Alternative (manual steps): **
3959``` bash
40- pip install -r requirements.txt
60+ # Create virtual environment
61+ uv venv
62+
63+ # Install dependencies
64+ uv pip install -r requirements.txt
4165```
4266
43- 4 . Copy the environment template:
67+ ### 4. Configure Environment
68+
4469``` bash
45- cp .env.example .env
70+ # Copy the environment template
71+ cp env_example.txt .env
4672```
4773
48- 5 . Edit ` .env ` and add your OpenProject configuration:
74+ Edit ` .env ` and add your OpenProject configuration:
4975``` env
5076OPENPROJECT_URL=https://your-instance.openproject.com
5177OPENPROJECT_API_KEY=your-api-key-here
@@ -75,7 +101,17 @@ OPENPROJECT_API_KEY=your-api-key-here
75101
76102### Running the Server
77103
104+ ** Using uv (recommended):**
105+ ``` bash
106+ uv run python openproject-mcp.py
107+ ```
108+
109+ ** Alternative (manual activation):**
78110``` bash
111+ # Activate virtual environment
112+ source .venv/bin/activate # On Windows: .venv\Scripts\activate
113+
114+ # Run the server
79115python openproject-mcp.py
80116```
81117
@@ -92,13 +128,33 @@ Add this configuration to your Claude Desktop config file:
92128{
93129 "mcpServers" : {
94130 "openproject" : {
95- "command" : " python" ,
96- "args" : [" path/to/openproject-mcp.py" ]
131+ "command" : " /path/to/your/project/.venv/bin/python" ,
132+ "args" : [" /path/to/your/project/openproject-mcp.py" ]
133+ }
134+ }
135+ }
136+ ```
137+
138+ ** Note:** Replace ` /path/to/your/project/ ` with the actual path to your project directory.
139+
140+ ** Alternative with uv (if uv is in your system PATH):**
141+ ``` json
142+ {
143+ "mcpServers" : {
144+ "openproject" : {
145+ "command" : " uv" ,
146+ "args" : [" run" , " python" , " /path/to/your/project/openproject-mcp.py" ]
97147 }
98148 }
99149}
100150```
101151
152+ ** Why use the direct Python path?**
153+ The direct Python path approach is more reliable because:
154+ - It doesn't require ` uv ` to be in the system PATH
155+ - It avoids potential issues with ` uv run ` trying to install the project as a package
156+ - It's simpler and more straightforward for MCP server configurations
157+
102158### Available Tools
103159
104160#### 1. ` test_connection `
@@ -445,17 +501,43 @@ Get detailed information about a specific work package relation.
445501
446502## Development
447503
504+ ### Setting up Development Environment
505+
506+ ``` bash
507+ # Install development dependencies
508+ uv sync --extra dev
509+
510+ # Or install manually
511+ uv pip install -e " .[dev]"
512+ ```
513+
448514### Running Tests
449515
450516``` bash
451- pytest tests/
517+ uv run pytest tests/
452518```
453519
454520### Code Formatting
455521
456522``` bash
457- black openproject-mcp.py
458- flake8 openproject-mcp.py
523+ # Format code
524+ uv run black openproject-mcp.py
525+
526+ # Lint code
527+ uv run flake8 openproject-mcp.py
528+ ```
529+
530+ ### Adding Dependencies
531+
532+ ``` bash
533+ # Add a new dependency
534+ uv add package-name
535+
536+ # Add a development dependency
537+ uv add --dev package-name
538+
539+ # Update dependencies
540+ uv sync
459541```
460542
461543## Tool Compatibility & Test Results
0 commit comments