OpenProject MCP Server
Allows interaction with an OpenProject instance, providing tools to list projects and work packages.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenProject MCP Serverlist all projects"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenProject MCP Server
An MCP (Model Context Protocol) server for OpenProject, built with FastMCP. Enables AI assistants like Claude to interact with OpenProject — listing projects, work packages, and managing resources through natural language.
Architecture
This project follows a Thin Client + Separate Tools architecture with clear separation of concerns:
AI Agent → MCP Client → FastMCP Server → Tool Functions → OpenProject API
↓
Logfire (traces, metrics)Design Patterns
Pattern | Where | Purpose |
Singleton |
| Single settings instance via |
Factory Method |
| Centralizes client creation |
Abstract Base Class |
| Thin contract for client implementations |
Dependency Injection |
| Settings passed in, not imported globally |
Related MCP server: OpenProject MCP
Project Structure
src/
├── api/
│ ├── middleware.py # Auth middleware (API key verification)
│ └── mcp_server.py # FastMCP server with lifespan & tool registration
├── client/
│ ├── base.py # ABC defining client interface
│ └── openproject.py # Concrete client wrapping httpx.AsyncClient
├── config/
│ └── settings.py # Pydantic Settings with Singleton pattern
├── factories/
│ └── client_factory.py # Factory for creating OpenProject clients
├── schema/
│ ├── project.py # Project & Description Pydantic models
│ └── work_package.py # WorkPackage & WorkPackageDescription models
└── tools/
├── list_project.py # list_openproject_projects()
└── list_work_packages.py # list_project_workpackages()
tests/
├── conftest.py # Shared fixtures & mock helpers
├── test_schemas.py # Pydantic model validation tests
├── test_settings.py # Settings singleton tests
├── client/
│ └── test_openproject.py # Client configuration tests
└── tools/
└── test_list_projects.py # Tool function tests with mocked HTTPSetup
1. Clone and Install
git clone <repository-url>
cd "OpenProject MCP"
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt2. Configure Environment
cp .env.example .envEdit .env with your values:
# OpenProject API Configuration
OPENPROJECT_TOKEN=your_openproject_api_token_here
OPENPROJECT_APIROOT=http://localhost:8080
# MCP Server Authentication
MCP_SERVER_API=your_api_key_here
# Logfire Observability
LOGFIRE_TOKEN=your_logfire_write_token_here3. Get OpenProject API Token
Log in to your OpenProject instance
Go to My Account → API token
Generate a new token
Copy it to
OPENPROJECT_TOKENin.env
Usage
Start the Server (HTTP Transport)
python -m src.api.mcp_serverServer runs on http://127.0.0.1:8000/mcp
Test with MCP Inspector
# List available tools
npx @modelcontextprotocol/inspector --cli http://127.0.0.1:8000/mcp --transport http --method tools/list
# Call a tool
npx @modelcontextprotocol/inspector --cli http://127.0.0.1:8000/mcp --transport http --method tools/call --tool-name list_projectsTest with curl
curl -X POST http://127.0.0.1:8000/mcp \
-H "Content-Type: application/json" \
-H "x-api-key: your_api_key_here" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "params": {"name": "list_projects"}, "id": 1}'Available Tools
Tool | Description | Parameters |
| List all projects in OpenProject | — |
| List work packages for a project |
|
Authentication
The server supports API key authentication via HTTP headers:
-H "x-api-key: your_api_key_here"In stdio mode (used by Claude Desktop), authentication is skipped automatically.
Observability (Logfire)
This server uses Pydantic Logfire for observability, providing:
MCP tool call tracing — who called which tool, duration, result
HTTP request monitoring — all OpenProject API calls tracked
Error tracking — full stack traces for debugging
Real-time dashboard — visualize traces at https://logfire.pydantic.dev
Setup
Create a Logfire account at https://logfire.pydantic.dev
Go to Settings → API Keys → Create a Write Token
Add
LOGFIRE_TOKEN=your_token_hereto your.envfile
What Gets Traced
Trace Type | What It Shows |
MCP Tool Calls |
|
HTTP Requests |
|
Errors | Any exceptions with full stack traces |
Lifespan | Server startup/shutdown events |
Testing
# Run all tests
pytest
# Run with verbose output
pytest -v
# Run specific test file
pytest tests/test_schemas.pyTest Coverage
Schema tests: Pydantic model validation, field aliases, optional fields
Settings tests: Singleton pattern, environment variables, missing fields
Client tests: HTTP client configuration, auth setup, lifecycle
Tool tests: API calls, response parsing, error handling
Design Decisions
Why Thin Client + Separate Tools?
The client (OpenProjectClient) only handles HTTP connectivity. Tool functions (list_openproject_projects, etc.) own the business logic. This follows the Single Responsibility Principle and makes extending tools straightforward — add a new function, not modify existing code.
Why Raw _links Dict?
WorkPackage uses links: dict = Field(alias="_links") instead of a model_validator. This keeps the model simple while preserving all link data. Tool functions extract nested fields as needed.
TODO
Add more tools:
get_project,get_work_package,create_work_packageImplement role-based permission system (read-only vs admin tools)
Strategy pattern for auth methods (API key, OAuth, BasicAuth)
Add User management tools (
list_users,create_user,delete_user)
Requirements
Python 3.12+
OpenProject instance with API access
Dependencies
fastmcp— MCP server frameworkhttpx— Async HTTP clientpydantic— Data validationpydantic-settings— Environment-based configurationlogfire— Observability and tracingpytest/pytest-asyncio— Testing
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
MCP server for generating rough-draft project plans from natural-language prompts.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
- ZapierOAuthcom.zapier
Hosted MCP server connecting AI assistants to 9,000+ apps and 40,000+ actions via Zapier.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for integrating with OpenProject API, enabling AI assistants to manage projects, work packages, time tracking, and users.8-
- AlicenseAqualityAmaintenanceAn MCP server that lets local AI agents read and manage OpenProject project data through structured, guarded tools, with write operations requiring explicit confirmation.1422MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that connects Claude Desktop to your OpenProject instance, allowing you to manage projects, tasks, and time entries through natural language.-
- FlicenseCqualityBmaintenanceAn MCP server that connects AI assistants to Redmine, enabling issue and project management via natural language.17-