openproject-mcp
Provides tools for interacting with OpenProject's REST API, enabling management of work packages (search, view, comment, attach files, log time), projects, and users.
Click on "Install 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-mcpshow my open work packages"
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
MCP (Model Context Protocol) server for OpenProject β gives AI agents (ZCode, Claude Desktop, etc.) a limited set of operations over OpenProject via the REST API v3:
π Search work packages β by subject, ID, status, project, assignee
π Work package details β all fields, description, optional comments and attachments
π¬ Add comments to work packages
π Upload files (attachments) to work packages
β± Log time (time entries)
π Time report for a period β grouped by project with a total
π List projects β all projects, parent's subprojects, or the full hierarchy tree
π€ Search users β by name or login (to obtain IDs)
Three transports are supported (selected by the MCP_TRANSPORT variable or the
--transport flag):
Transport | Purpose |
stdio | Local clients (ZCode, etc.): the server runs as a subprocess and talks over stdin/stdout. Default. |
streamable-http | Modern MCP HTTP transport (endpoint |
sse | Legacy HTTP transport ( |
Why a custom server when OpenProject 17.2 has a built-in MCP? The built-in one is Enterprise-only and read-only. This server works with any edition (including Community) and supports write operations: comments, files, time.
Requirements
Python 3.10+ (tested on 3.13)
Access to an OpenProject instance with the API enabled (Personal Access Token)
Token permissions: view work packages/projects, add work package notes (comments), log time, add attachments (edit work package or add attachments)
For HTTP/Docker β Docker (or any ASGI server;
uvicornis included as a dependency)
Related MCP server: OpenProject MCP
Installation
Option A β via uv (recommended, faster)
cd path\to\openproject-mcp
uv venv
uv pip install -e ".[http]" # [http] is only needed for the HTTP transportOption B β via standard pip
cd path\to\openproject-mcp
python -m venv .venv
.venv\Scripts\activate
pip install -e ".[http]" # for stdio, `pip install -e .` is enoughAfter installation both the openproject-mcp command and python -m openproject_mcp are available.
Configuration
Variables are grouped by prefix to avoid confusion:
op_β connection to OpenProject (where we talk to)mcp_β settings of the MCP service itself (how it works)
Copy the example and fill in your values:
copy .env.example .env # Windows
cp .env.example .env # Linux/macOSEnvironment variables
Variable | Prefix | Required | Description |
| op | β | Base URL of your OpenProject without a trailing |
| op | β | Personal API token. Created in profile settings β Access tokens. Requires the administrator setting "Enable API tokens". |
| mcp | β |
|
| mcp | β | HTTP transport address as |
| mcp | β | Optional Bearer token protecting the HTTP endpoint. Empty = no auth (trusted network / reverse proxy only). Clients send |
| mcp | β | Comma-separated host list (DNS-rebinding protection). Suffix |
| mcp | β |
|
Variables can also be set without a .env β directly in the client config or at container startup.
Getting an API token
Sign in to OpenProject.
Profile icon (top right) β My account β Access tokens.
Click + API token, give it a name (e.g. "MCP"), copy the value.
If the section is unavailable, an administrator must enable Enable API tokens in Administration β β¦ (or grant your account the right).
The token is shown only once β save it right away.
Running
stdio (local client)
openproject-mcp # MCP_TRANSPORT=stdio (default)The server starts and waits for client commands over stdin/stdout. Stop with Ctrl+C.
streamable-http / sse (HTTP service)
openproject-mcp --transport streamable-http --bind 0.0.0.0:8000
# or via environment variables:
# MCP_TRANSPORT=streamable-http MCP_BIND=0.0.0.0:8000 openproject-mcpHealth check:
curl http://127.0.0.1:8000/health # β {"status": "ok"} (no auth required)CLI arguments (override env; precedence: CLI > env > default):
Argument | Description |
| Transport |
| Address for HTTP (IPv6: |
|
|
Docker
The microservice is built into a portable image and runs as an HTTP service
(streamable-http by default). Secrets (OP_URL, OP_API_KEY,
MCP_AUTH_TOKEN) are passed at runtime β not baked into the image.
β οΈ Security. The server opens write operations to OpenProject (comments, files, time). On any network except a fully isolated one, set
MCP_AUTH_TOKENor keep the service behind an authenticated reverse proxy.
Build and run
# Build the image
docker build -t openproject-mcp .
# Run (secrets via -e / --env-file)
docker run --rm -p 8000:8000 \
-e OP_URL=https://openproject.example.com \
-e OP_API_KEY=your_api_token_here \
-e MCP_AUTH_TOKEN=choose_a_secret \
openproject-mcpHealth check:
curl http://localhost:8000/health # 200
curl -H "Authorization: Bearer choose_a_secret" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-X POST http://localhost:8000/mcp \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"t","version":"1"}}}'docker compose
Easier via docker-compose.yml (reads .env):
cp .env.example .env # fill in OP_URL / OP_API_KEY / MCP_AUTH_TOKEN
docker compose up --build # build + start
docker compose logs -f # logs
docker compose down # stopAfter startup the MCP endpoint is http://localhost:8000/mcp, health at /health.
Container variables
The image sets the defaults MCP_TRANSPORT=streamable-http and MCP_BIND=0.0.0.0:8000
(overridable at runtime). The following are passed in explicitly:
OP_URL,OP_API_KEYβ connection to OpenProject;MCP_AUTH_TOKENβ endpoint protection (recommended);MCP_ALLOWED_HOSTSβ see below.
Host allowlist (DNS-rebinding protection)
By default the MCP SDK accepts HTTP requests only to localhost β in Docker
(even on 0.0.0.0) or behind a reverse proxy this yields HTTP 421 on every request.
This server behaves in a hybrid way:
If
MCP_ALLOWED_HOSTSis set (e.g.mcp.corp.local,mcp.corp.local:*) β protection is enabled with that host list.If empty β protection is disabled; the server relies on Bearer auth (
MCP_AUTH_TOKEN), a reverse proxy, or network isolation.
If you see 421 "Invalid Host header" β either set
MCP_ALLOWED_HOSTSwith the hostname your clients connect to, or (for an internal network) leave it empty and protect the endpoint withMCP_AUTH_TOKEN.
Client integration
stdio (ZCode, Claude Desktop β local subprocess)
Add the configuration to your MCP client's settings file.
{
"mcpServers": {
"openproject": {
"command": "C:\\path\\to\\project\\.venv\\Scripts\\python.exe",
"args": ["-m", "openproject_mcp"],
"env": {
"OP_URL": "https://openproject.example.com",
"OP_API_KEY": "your_api_token_here",
"MCP_TRANSPORT": "stdio",
"MCP_LOG_LEVEL": "INFO"
}
}
}
}Paths in JSON on Windows require a double backslash
\\or forward slashes. If a.envexists in the working directory, theenvblock can be omitted, but explicit variables are more reliable (they do not depend on the working directory at launch).
Alternative via console script (if openproject-mcp is on your PATH):
{
"mcpServers": {
"openproject": {
"command": "C:\\path\\to\\project\\.venv\\Scripts\\openproject-mcp.exe",
"args": [],
"env": { "OP_URL": "https://openproject.example.com", "OP_API_KEY": "..." }
}
}
}After saving the config, restart the client (or reconnect the MCP server).
The tools with the op_* prefix will appear in the tool list.
streamable-http (remote microservice)
The client connects to the HTTP endpoint by URL and (if MCP_AUTH_TOKEN is set)
sends the authorization header. The exact format depends on the client; for ZCode
this is an MCP server section of type http/url:
{
"mcpServers": {
"openproject": {
"type": "http",
"url": "http://mcp.corp.local:8000/mcp",
"headers": {
"Authorization": "Bearer choose_a_secret"
}
}
}
}With
MCP_TRANSPORT=ssethe endpoints change to/sse(GET, stream) and/messages/(POST) β use your client's SSE mode.
Tools
Tool | Purpose | Key parameters |
| Check URL + token | β |
| Search work packages |
|
| Details of one work package |
|
| List projects / subprojects / tree |
|
| Comment on a work package |
|
| Upload a file |
|
| Log time |
|
| Time report for a period |
|
| Search users |
|
| Time-entry activity reference | β |
Tools are available over any transport β behavior is identical for stdio and HTTP.
Usage examples
Find open work packages in project #5 assigned to me:
op_search_work_packages(project_id="5", status="open", assignee_id="me", page_size=10)Find a work package by subject (one term or synonyms):
op_search_work_packages(subject="login") # one term
op_search_work_packages(subject=["bug", "defect", "issue"]) # synonyms β OR, deduplicatedSearch goes through the work package subject first; if nothing is found it automatically falls back to the description. With no matches an empty list is returned (not the whole backlog).
Find a project by name:
op_list_projects(name="demo")
op_list_projects(name=["demo", "test"]) # synonyms, description fallbackAll projects or the hierarchy tree:
op_list_projects() # flat list of all projects
op_list_projects(as_tree=True) # tree: roots β children β ...
op_list_projects(active=True) # only active projectsSubprojects of a specific project:
op_list_projects(parent_id="1") # full subtree (any depth)
op_list_projects(parent_id="1", direct_children_only=True) # only direct childrenAdd a comment to work package #42:
op_add_comment(work_package_id=42, comment="Verified, the bug reproduces", internal=True)Log 1.5 hours against work package #42:
op_log_time(work_package_id=42, hours="1.5h", activity_id=1, comment="Debugging")Upload a file to work package #42:
op_add_attachment(work_package_id=42, file_path="C:\\reports\\bug.png")Time report for a period (for me, for July):
# "for July" β date_from/date_to (the agent computes month boundaries itself)
op_list_time_entries(user_id="me", date_from="2026-07-01", date_to="2026-07-31")
# numbers only, no comments:
op_list_time_entries(user_id="me", date_from="2026-07-01", date_to="2026-07-31", include_comments=False)
# for a specific project:
op_list_time_entries(user_id="me", project_id="1", date_from="2026-07-01", date_to="2026-07-31")Returns entries grouped by project, with per-project hour totals and a grand total.
Find a user by name (to substitute the ID):
op_list_users(query="Ivanov")
# then use the found id in op_list_time_entries(user_id="...")OpenProject version compatibility
The server is not tied to a version number and works with any OpenProject exposing API v3. The only dialect-dependent point is the work-package link in a time entry:
OpenProject 14+ β
_links.entity(/api/v3/work_packages/{id})OpenProject β€13 β
_links.workPackage
op_log_time automatically tries the modern entity field and, on a server
rejection (HTTP 422), retries with the legacy workPackage field. The successful
variant is cached, so subsequent writes avoid extra attempts. Search, comments and
attachments are identical across versions.
Project structure
openproject-mcp/
βββ Dockerfile # microservice image (python:3.13-slim)
βββ docker-compose.yml # local compose startup
βββ .dockerignore
βββ pyproject.toml # hatchling; deps: mcp[cli], httpx, anyio; extra [http]: uvicorn[standard]
βββ .env.example # config template (op_* / mcp_*)
βββ .env # real credentials (in .gitignore)
βββ src/openproject_mcp/
βββ __init__.py # package version
βββ __main__.py # entry point: transport selection (stdio / http), CLI, stderr logging
βββ config.py # .env / environment variable loading, validation, security_settings()
βββ client.py # httpx client for API v3: auth, HAL errors, pagination
βββ formatting.py # HAL+JSON _links parsing, ISO8601 durations, filters
βββ http_app.py # HTTP app assembly: /health + optional Bearer auth
βββ server.py # MCP tool registration (transport-independent)Troubleshooting
"Configuration error: OP_URL is not set" β no
.envin the working directory and the variables were not passed viaenv/-e.HTTP 401 Unauthorized β missing/incorrect
MCP_AUTH_TOKEN. The client must sendAuthorization: Bearer <value>.HTTP 421 "Invalid Host header" β the host allowlist triggered. Either set
MCP_ALLOWED_HOSTSwith the hostname clients use, or leave it empty (protection is disabled) and secure withMCP_AUTH_TOKEN.Connection fails in Docker β check that
MCP_BIND=0.0.0.0:8000(not127.0.0.1) and the port is published (-p 8000:8000)."Port already in use" β change the port in
MCP_BIND/--bindand in the port mapping.HTTP 401/403 from OpenProject β wrong/expired token or missing permissions. Check the token and its rights (add work package notes, log time).
HTTP 404 β the work package/project was not found or you have no view permission.
Need diagnostics β set
MCP_LOG_LEVEL=DEBUG; logs go to stderr.
Testing
pip install -r requirements-dev.txt
pytest tests/The integration tests hit a live OpenProject server configured via OP_URL /
OP_API_KEY (or the repo's .env) and are skipped automatically when the
server is not reachable.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA comprehensive MCP server for integrating with OpenProject API, enabling AI assistants to manage projects, work packages, time tracking, and users.Last updated12
- AlicenseAqualityAmaintenanceAn MCP server that lets local AI agents read and manage OpenProject project data through structured, guarded tools, with write operations requiring explicit confirmation.Last updated5813MIT
- Flicense-qualityBmaintenanceAn MCP server that enables AI assistants to interact with OpenProject, listing projects and work packages and managing resources through natural language.Last updated
- AlicenseAqualityAmaintenanceWrite-capable MCP server for OpenProject API v3 with Community Edition support. Search, create, update, assign, prioritize, and comment on work packages.Last updated41MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sergeyfedyakov/openproject-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server