A Model Context Protocol (MCP) server that provides seamless integration with OpenProject API v3. This server enables LLM applications to interact with OpenProject for project management, work package tracking, and task creation.
- 🔌 Full OpenProject API v3 Integration
- 📋 Project Management: List and filter projects
- 📝 Work Package Management: Create, list, and filter work packages
- 🏷️ Type Management: List available work package types
- 🔐 Secure Authentication: API key-based authentication
- 🌐 Proxy Support: Optional HTTP proxy configuration
- 🚀 Async Operations: Built with modern async/await patterns
- 📊 Comprehensive Logging: Configurable logging levels
- Python 3.8 or higher
- An OpenProject instance (cloud or self-hosted)
- OpenProject API key (generated from your user profile)
- Clone the repository:
git clone https://github.com/yourusername/openproject-mcp.git
cd openproject-mcp
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Copy the environment template:
cp .env.example .env
- Edit
.env
and add your OpenProject configuration:
OPENPROJECT_URL=https://your-instance.openproject.com
OPENPROJECT_API_KEY=your-api-key-here
Variable | Required | Description | Example |
---|---|---|---|
OPENPROJECT_URL |
Yes | Your OpenProject instance URL | https://mycompany.openproject.com |
OPENPROJECT_API_KEY |
Yes | API key from your OpenProject user profile | 8169846b42461e6e... |
OPENPROJECT_PROXY |
No | HTTP proxy URL if needed | http://proxy.company.com:8080 |
LOG_LEVEL |
No | Logging level (DEBUG, INFO, WARNING, ERROR) | INFO |
TEST_CONNECTION_ON_STARTUP |
No | Test API connection when server starts | true |
- Log in to your OpenProject instance
- Go to My account (click your avatar)
- Navigate to Access tokens
- Click + Add to create a new token
- Give it a name and copy the generated token
python openproject-mcp.py
Note: If you renamed the file from openproject_mcp_server.py
, update your configuration accordingly.
Add this configuration to your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"openproject": {
"command": "python",
"args": ["path/to/openproject-mcp.py"]
}
}
}
Test the connection to your OpenProject instance.
Example:
Test the OpenProject connection
List all projects you have access to.
Parameters:
active_only
(boolean, optional): Show only active projects (default: true)
Example:
List all active projects
List work packages with optional filtering.
Parameters:
project_id
(integer, optional): Filter by specific projectstatus
(string, optional): Filter by status - "open", "closed", or "all" (default: "open")
Example:
Show all open work packages in project 5
List available work package types.
Parameters:
project_id
(integer, optional): Filter types by project
Example:
List all work package types
Create a new work package.
Parameters:
project_id
(integer, required): The project IDsubject
(string, required): Work package titletype_id
(integer, required): Type ID (e.g., 1 for Task)description
(string, optional): Description in Markdown formatpriority_id
(integer, optional): Priority IDassignee_id
(integer, optional): User ID to assign to
Example:
Create a new task in project 5 titled "Update documentation" with type ID 1
pytest tests/
black openproject-mcp.py
flake8 openproject-mcp.py
- 401 Unauthorized: Check your API key is correct and active
- 403 Forbidden: Ensure your user has the necessary permissions
- 404 Not Found: Verify the OpenProject URL and that resources exist
- Proxy Errors: Check proxy settings and authentication
Enable debug logging by setting:
LOG_LEVEL=DEBUG
- No projects found: Ensure your API user has project view permissions
- SSL errors: May occur with self-signed certificates or proxy SSL interception
- Timeout errors: Increase timeout or check network connectivity
- Never commit your
.env
file to version control - Use environment variables for sensitive data
- Rotate API keys regularly
- Use HTTPS for all OpenProject connections
- Configure proxy authentication securely if needed
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built for the Model Context Protocol
- Integrates with OpenProject
- Inspired by the MCP community
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions