Skip to content

About

OpenProject MCP server: OpenProject's API v3 as Model Context Protocol tools for Claude and other MCP clients (stdio, HTTP, Docker).

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

 
 

Latest commit

 

History

377 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenProject MCP Server (op-mcp)

CI PRs Welcome

Supported: OpenProject 14–17 (the last four major versions), tested against each on every change. The tool interface follows semantic versioning from 1.0.0 (see Compatibility). Contributions welcome.

This repository was called openproject-mcp-server until December 2026 (#130); old links and clones redirect here.

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.

Features

  • 🔌 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

Prerequisites

  • uv (fast Python package manager). It also downloads a suitable Python if your system doesn't have one.
  • An OpenProject instance (cloud or self-hosted)
  • OpenProject API key (generated from your user profile)

Installation

The server is the op-mcp command. It needs uv:

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Run it from PyPI (recommended)

The server is published on PyPI as op-mcp. uvx downloads it, together with Python if needed, into a cached environment and runs it. Nothing is installed system-wide:

uvx --python 3.12 op-mcp==1.0.1 --version

Pin the Python version (--python 3.12). op-mcp is tested on Python 3.10 to 3.12. Without the option, uv uses whatever Python it finds or, if there is none, downloads the newest release. A Python newer than the tested ones can break the install: some dependencies may not publish ready-made packages for it yet, and uv then tries to compile them (see Troubleshooting).

Pin the op-mcp version (op-mcp== and the number, as above) wherever an MCP client starts the server. Every start then runs the same release, and upgrading means changing the number (see the changelog). Without a pin, uvx op-mcp keeps reusing the version it downloaded first. uvx op-mcp@latest checks PyPI for the newest release at every start instead.

uvx resolves the dependencies itself, within the ranges in pyproject.toml; it does not use uv.lock. To run exactly the dependency versions the tests run against, use a clone (uv run op-mcp) or the Docker image.

Or install the op-mcp command

To have op-mcp on your PATH instead, install it from PyPI with any of:

uv tool install --python 3.12 op-mcp    # upgrade later with: uv tool upgrade op-mcp
pipx install --python 3.12 op-mcp
pip install op-mcp                       # into a virtual environment with Python 3.10 to 3.12

In client configs, use op-mcp (or its full path, from which op-mcp or where op-mcp) as the command, with no uvx in front.

Or try unreleased changes from GitHub

To run the current main branch before it is released, e.g. to try a fix:

uvx --python 3.12 --from git+https://github.com/LS-Instruments/op-mcp op-mcp --version

Or run it from a clone (for development)

git clone https://github.com/LS-Instruments/op-mcp.git
cd op-mcp
uv sync
uv run op-mcp --version

python -m openproject_mcp works too.

Configure

The server needs your OpenProject URL and API key:

OPENPROJECT_URL=https://your-instance.openproject.com
OPENPROJECT_API_KEY=your-api-key-here
  • For an MCP client (Claude Code, Claude Desktop) that starts the server: put them in the client's config as environment variables, as shown in Connecting an MCP client. The client decides which directory the server starts in, so a .env file there is not reliable; to use a file anyway, pass --env-file /absolute/path/to/file in the arguments.
  • When you run op-mcp yourself (e.g. --transport http): put them in a file named .env in the directory you run it from, or in any file you pass with --env-file. In a clone, cp env_example.txt .env gives you a commented template.

Configuration

Environment Variables

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
MCP_API_KEYS HTTP/SSE only Client keys for the network transports (see "Authentication on the network transports") key1:Alice,key2:Bob
MCP_ALLOW_UNAUTHENTICATED No 1 runs the network transports without client keys, on purpose 1
MCP_HTTP_HOST, MCP_HTTP_PORT No Default address for --transport http 0.0.0.0, 8000
OP_MCP_FILES_DIR No The one directory the attachment tools may read from and write to when the server is reached over HTTP/SSE (see below); also confines them over stdio when set /srv/op-mcp/files

Settings are read from the environment and from one file: the one --env-file names, otherwise .env in the directory op-mcp runs in, if there is one. Environment variables win over the file. They are checked when the server starts: if OPENPROJECT_URL or OPENPROJECT_API_KEY is missing or invalid, the server stops right away with a message naming the variable. The API key is never written to logs or error messages.

Getting an API Key

  1. Log in to your OpenProject instance
  2. Go to My account (click your avatar)
  3. Navigate to Access tokens
  4. Click + Add to create a new token
  5. Give it a name and copy the generated token

Usage

Running the server

op-mcp                                     # stdio (default): an MCP client starts the server
op-mcp --transport http --port 8000        # a network server, for several clients
op-mcp --transport sse                     # the older SSE network transport
op-mcp --env-file /path/to/settings.env    # settings from another file
op-mcp --help

Without installing, run them through uvx with both versions, e.g. uvx --python 3.12 op-mcp==1.0.1 --transport http. From a clone, prefix them with uv run.

Authentication on the network transports (HTTP and SSE): these expose every tool, acting with your OpenProject API key, to anyone who can reach the server. They therefore require client keys and refuse to start without them:

export MCP_API_KEYS="key-for-alice:Alice,key-for-bob:Bob"   # or put the line, without export, in the .env file
op-mcp --transport http

Clients send one key as Authorization: Bearer <key> (or X-API-Key: <key>); anything else gets HTTP 401. To run without authentication on purpose (local testing, or a platform that already authenticates users in front of the server), set MCP_ALLOW_UNAUTHENTICATED=1. The stdio transport is a local process and needs no keys.

The check is part of the server itself, so it applies however the server is run over HTTP or SSE: op-mcp, the Docker image, fastmcp run openproject_mcp/server.py:mcp, FastMCP Cloud, or your own code serving mcp.http_app(). Run by anything other than op-mcp without MCP_API_KEYS, the server starts but answers every request with 401 (and logs why) until keys are set. The keys are read from the environment or the same .env file as the other settings. Only GET /health is open without a key.

Files on the server: upload_attachment (file_path) and download_attachment (save_path) read and write files on the machine the server runs on. Over stdio that's your own machine, and any path works. Over HTTP/SSE a remote client must not reach the server's files (its .env holds your OpenProject API key), so these paths are refused unless you set OP_MCP_FILES_DIR to one directory. Paths then stay inside it: a relative path is relative to it, and .. or a symlink pointing out is refused. Downloads replace the file name rather than write through it, so a symlink or hard link there can't redirect them, and a hard-linked file isn't uploaded while paths are confined.

If you configure FastMCP's own authentication instead (FASTMCP_SERVER_AUTH, e.g. a JWT or OAuth provider), the server uses it when MCP_API_KEYS is not set. In order: MCP_API_KEYS, then FASTMCP_SERVER_AUTH, then MCP_ALLOW_UNAUTHENTICATED=1 (no authentication), otherwise every request is rejected.

Coming from the old entry scripts? openproject-mcp-fastmcp.py, openproject-mcp-http.py and openproject-mcp-sse.py were removed in the first release (#52). Replace python openproject-mcp-fastmcp.py with op-mcp (see Connecting an MCP client for client configs), python openproject-mcp-http.py with op-mcp --transport http, and python openproject-mcp-sse.py with op-mcp --transport sse. They read the .env next to the script; op-mcp reads the one in the current directory, or pass --env-file /path/to/.env.

The code lives in the openproject_mcp package; CONTRIBUTING.md describes its layout.

Connecting an MCP client (Claude Code, Claude Desktop)

Both run the server from PyPI with pinned Python and op-mcp versions (see Run it from PyPI). Each user needs their own API key.

Claude Code (CLI or VS Code extension):

claude mcp add -s user openproject \
  -e OPENPROJECT_URL=https://your-instance.openproject.com \
  -e OPENPROJECT_API_KEY=your-api-key \
  -- uvx --python 3.12 op-mcp==1.0.1

-s user makes the server available in all your projects; without it, it's added to the current project only. In Windows PowerShell, write the command on one line without the \. Check it with claude mcp list (it should say ✓ Connected). To upgrade, remove it (claude mcp remove -s user openproject) and add it again with the new version.

To use a server running with --transport http instead, add it by URL with one of its client keys:

claude mcp add --transport http openproject http://your-server:8000/mcp \
  -H "Authorization: Bearer key-for-alice"

Claude Desktop (its Cowork sessions use the same servers): open Settings → Developer → Edit Config. This opens claude_desktop_config.json (Windows: %APPDATA%\Claude\claude_desktop_config.json; macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Linux: ~/.config/Claude/claude_desktop_config.json). Add the openproject entry, next to any servers already under mcpServers:

{
  "mcpServers": {
    "openproject": {
      "command": "/Users/you/.local/bin/uvx",
      "args": ["--python", "3.12", "op-mcp==1.0.1"],
      "env": {
        "OPENPROJECT_URL": "https://your-instance.openproject.com",
        "OPENPROJECT_API_KEY": "your-api-key"
      }
    }
  }
}
  • command is the full path of uvx, not uv. Both programs sit in the same folder. Desktop apps usually don't see your shell's PATH, so plain "uvx" often fails. Find the path with which uvx (macOS/Linux, typically /Users/you/.local/bin/uvx) or where uvx (Windows, typically C:\Users\you\.local\bin\uvx.exe). In JSON, write Windows backslashes doubled: "C:\\Users\\you\\.local\\bin\\uvx.exe".
  • Restart Claude Desktop completely: quit it (macOS: Cmd+Q; Windows: right-click the tray icon → Quit) and open it again. Closing the window is not enough.
  • To upgrade, change the version in args and restart.

To run from a clone instead, use "command": "uv" (full path) with "args": ["run", "--directory", "/path/to/op-mcp", "op-mcp"].

If a client fails to connect, check the URL and API key, then run the same command and arguments in a terminal, with OPENPROJECT_URL and OPENPROJECT_API_KEY set: it prints the reason.

Docker (HTTP server)

The image runs op-mcp --transport http on port 8000 as a non-root user, with the dependencies from uv.lock. Build it from a clone and run it with your OpenProject settings and at least one client key:

docker build -t op-mcp .
docker run -d --name op-mcp -p 8000:8000 \
  -e OPENPROJECT_URL=https://your-instance.openproject.com \
  -e OPENPROJECT_API_KEY=your-api-key \
  -e MCP_API_KEYS="key-for-alice:Alice,key-for-bob:Bob" \
  op-mcp

Or keep the settings in a file and pass --env-file op-mcp.env in place of the three -e options. Docker reads that file literally: one KEY=value per line, no quotes and no export (quotes would become part of the value, and a quoted client key would never match):

OPENPROJECT_URL=https://your-instance.openproject.com
OPENPROJECT_API_KEY=your-api-key
MCP_API_KEYS=key-for-alice:Alice,key-for-bob:Bob

MCP clients connect to http://your-server:8000/mcp with Authorization: Bearer key-for-alice (see "Connecting an MCP client" above). Without MCP_API_KEYS the container exits with "Refusing to start without authentication".

  • Health: GET /health answers {"status":"ok"} without a client key, and the image's HEALTHCHECK uses it, so docker ps shows healthy. It checks that the server is up, not that OpenProject is reachable (the test_connection tool does that).
  • Port: to publish on another host port, change only -p, e.g. -p 9000:8000. To change the port inside the container, set -e MCP_HTTP_PORT=9000 and publish that port, -p 9000:9000; the healthcheck follows the variable.
  • Arguments: anything after the image name replaces the default --transport http; without it the server would start on stdio and exit at once. Prefer the environment variables (MCP_HTTP_PORT, LOG_LEVEL, ...) to arguments.
  • TLS: the server speaks plain HTTP; put it behind a reverse proxy that terminates HTTPS when clients reach it over a network.
  • Published image: from the first release (#52) every version is also on GHCR as ghcr.io/ls-instruments/op-mcp (tags such as 2.1.0, 2.1 and latest; linux/amd64 and linux/arm64). Use it in place of op-mcp in the run command above and skip the build. To check that an image was built by this repository's release workflow, from main: gh attestation verify oci://ghcr.io/ls-instruments/op-mcp:<version> -R LS-Instruments/op-mcp --signer-workflow LS-Instruments/op-mcp/.github/workflows/release.yml --source-ref refs/heads/main. Each release's changes are in its GitHub release notes and in CHANGELOG.md.

Cloud deployment (FastMCP Cloud) ☁️

Deploy to FastMCP Cloud for centralized access across your organization. This eliminates the need for each user to install Python and run the server locally.

Benefits:

  • No local installation required for end users
  • Centralized API key and configuration management
  • Access from anywhere with internet
  • Automatic scaling and monitoring
  • Team collaboration features

Quick Start:

  1. The entry point is the server object, openproject_mcp/server.py:mcp (fastmcp inspect openproject_mcp/server.py:mcp lists its tools).

  2. Create/update .fastmcp.yaml config:

    name: op-mcp
    version: "1.0.0"
    description: "OpenProject MCP Server for Claude Desktop"
    
    entry_point: openproject_mcp/server.py:mcp
    
    runtime:
      python_version: "3.11"
    
    environment:
      - OPENPROJECT_URL
      - OPENPROJECT_API_KEY
      - OPENPROJECT_PROXY
  3. Deploy to FastMCP Cloud:

    # Install FastMCP CLI (if not installed)
    pip install fastmcp
    
    # Login to FastMCP Cloud
    fastmcp login
    
    # Deploy your server
    fastmcp deploy
  4. Configure environment variables on FastMCP Cloud dashboard:

    • OPENPROJECT_URL: Your OpenProject instance URL
    • OPENPROJECT_API_KEY: Your API key
    • OPENPROJECT_PROXY: (Optional) Proxy URL if needed
    • MCP_API_KEYS: client keys, key1:Name1,key2:Name2 (see "Authentication on the network transports" above)

    Authentication: the server checks MCP_API_KEYS on FastMCP Cloud too; without keys it rejects every request. If the platform authenticates users itself and uses the Authorization header for that, clients send their key as X-API-Key: <key> instead (either header is accepted). To rely on the platform's authentication alone, set MCP_ALLOW_UNAUTHENTICATED=1, but only if the platform lets no unauthenticated request through to the server.

  5. Users connect via Claude Desktop with SSE transport:

    {
      "mcpServers": {
        "openproject": {
          "url": "https://mcp.fastmcp.com/sse/op-mcp",
          "transport": "sse"
        }
      }
    }

Available Tools

The full, always-current tool reference is docs/tools.md: every tool with its description and parameters (types, required/optional, defaults, limits). It is generated from the registered tools, and a test fails if it is out of date:

uv run python -m openproject_mcp.utils.tool_docs   # regenerate docs/tools.md after changing a tool

Tools are grouped by area: connection and permissions, projects, work packages (incl. allowed values and status transitions, hierarchy and relations), time tracking, users and roles, memberships, versions, news, attachments, sprints and backlog, and reports. All tools take flat parameters.

Development

Setting up Development Environment

# Install development dependencies
uv sync --extra dev

# Or install manually
uv pip install -e ".[dev]"

Running Tests

uv sync --extra dev   # once: installs pytest, ruff, mypy, pre-commit
uv run pytest         # unit tests (network-free)
uv run pytest --cov   # with coverage; fails below the floor in pyproject.toml

Integration tests against a disposable OpenProject

Tests marked integration need a real OpenProject. They never touch your instance unless you point them at it on purpose:

# Disposable container (needs Docker): starts openproject/openproject:17.9.8 on
# 127.0.0.1, creates an admin API token and a scratch project, removes it afterwards.
OPENPROJECT_DOCKER=1 uv run pytest -m integration -v

# Keep the container between runs (skips the ~1 minute boot next time):
OPENPROJECT_DOCKER=1 OPENPROJECT_DOCKER_KEEP=1 uv run pytest -m integration -v

# Another OpenProject version:
OPENPROJECT_DOCKER=1 OPENPROJECT_DOCKER_IMAGE=openproject/openproject:16.6.10 uv run pytest -m integration -v

# A live instance instead (creates and deletes work packages in that project):
OPENPROJECT_SMOKE=1 OPENPROJECT_TEST_PROJECT_ID=<id> uv run pytest -m integration -v

Remove a kept container with docker rm -f op-mcp-test-17.9.8. The harness lives in tests/openproject_container.py and the fixtures in tests/conftest.py.

Linting and Type Checks

uv run ruff format .       # format the code; CI checks it (ruff format --check)
uv run ruff check .        # blocking in CI
uv run mypy                # strict, blocking in CI
uv run pre-commit install  # optional: run ruff format and ruff check on every commit

The commit that reformatted the code is listed in .git-blame-ignore-revs; run git config blame.ignoreRevsFile .git-blame-ignore-revs once so git blame skips it (GitHub does this automatically).

CI (GitHub Actions) runs all of these on every pull request.

Adding Dependencies

# Add a new dependency
uv add package-name

# Add a development dependency
uv add --dev package-name

# Update dependencies
uv sync

Compatibility

  • OpenProject versions: the last four major versions are supported (currently 14–17). docs/compatibility.md lists each tool's minimum version and the API endpoints it uses, generated from the code and the API specs recorded from each version. Every pull request that touches the client or the tools runs the integration tests against each of them in disposable containers (.github/workflows/integration.yml). See docs/versioning.md for the policy.

  • The tool interface (tool names, parameters, how failures are reported) follows semantic versioning from 1.0.0: a breaking change comes only with a new major version, announced in the release notes. The wording and layout of the text the tools return may change in any release. Tools marked experimental (the weekly report, deprecated and removed in 1.1.0) are outside this promise. docs/versioning.md has the exact rules.

  • Version-specific features: sprints and backlogs need OpenProject 17.3 or later; on older servers the sprint tools say so instead of failing with a raw error.

  • Version detection: test_connection shows the OpenProject version and whether it is supported. OpenProject reports its version only to admin API keys; for other keys, the server checks which endpoints the instance offers (from its API description) instead.

  • Instance settings matter too. Whether update_work_package can set percentage_done (% Complete) depends on the instance's progress calculation mode, set by an administrator under Administration › Work packages › Progress tracking › Progress calculation mode (OpenProject 14.6 and later; before 14.6 it was Progress calculation under Work packages › Settings):

    • Work-based (the default): % Complete can be written. If Work is set, OpenProject keeps Work, Remaining work and % Complete consistent, so writing % Complete changes Remaining work.
    • Status-based: each status sets a fixed % Complete, so it changes only with the status, and writing it fails with HTTP 422 PropertyIsReadOnly.
    • In OpenProject 14.0–14.5, % Complete is read-only in both modes (in 14.5, unless a feature flag is on).

    update_work_package handles all of these: if the server rejects percentage_done as read-only, it skips that field, applies the rest and says so. To check beforehand, get_work_package_allowed_values(work_package_id, fields="percentageDone") shows "(read-only)" when % Complete can't be written; it reads OpenProject's own writable flag from the work package form. See OpenProject's guides on progress tracking and its settings.

  • Time entry activities differ per instance and project: list the allowed ones with list_time_entry_activities(work_package_id=...) before logging time.

Permission Requirements

Most create/update/delete operations require appropriate permissions:

  • Project Operations: Require global "Create project" and "Edit project" permissions. Deletion typically requires admin rights
  • Work Package Operations: Require "Create/Edit work packages" permission in target projects
  • Work Package Relations & Hierarchy: Require "Edit work packages" permission for creating/modifying parent-child relationships and dependencies
  • Membership Management: Require "Manage members" permission for target projects
  • Time Entry Operations: Require time tracking permissions
  • Version Management: Require project admin or version management permissions
  • User Operations: Admin privileges may be needed for comprehensive user management
  • Role Management: Read-only operations generally available; admin privileges may be needed for detailed role information

Use the check_permissions tool to diagnose permission-related issues.

Troubleshooting

Connection Issues

  1. 401 Unauthorized: Check your API key is correct and active
  2. 403 Forbidden: Ensure your user has the necessary permissions
  3. 404 Not Found: Verify the OpenProject URL and that resources exist
  4. Proxy Errors: Check proxy settings and authentication

Debug Mode

Enable debug logging by setting:

LOG_LEVEL=DEBUG

Starting the server from an MCP client

  • error: unrecognized subcommand 'op-mcp==…': the client's command points to uv (uv.exe) instead of uvx (uvx.exe). Use uvx, or keep uv and put "tool", "run" before the other arguments.
  • Failed to build lupa (or another package), often with a UnicodeDecodeError: uv picked a Python newer than the tested ones, found no ready-made package for it, and tried to compile one. Add --python 3.12 before op-mcp==…, as in the examples above, and restart the client. Further information: #207.
  • The client only says "Server disconnected": its log shows the server's own error. Claude Desktop: Settings → Developer → Open Logs Folder, file mcp-server-openproject.log. Or run the same command and arguments in a terminal.

Common Issues

  • 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

Security Considerations

  • 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

Contributing

See CONTRIBUTING.md: the workflow (an issue first, one change per pull request, Conventional Commits, merge commits), the checks to run locally, the kinds of tests, and the compatibility rules for OpenProject API work.

License

MIT License: see LICENSE. This is a fork of AndyEverything/openproject-mcp-server, which declares the MIT License; NOTICE records the provenance and credits the upstream authors and contributors.

Acknowledgments

Support

About

OpenProject MCP server: OpenProject's API v3 as Model Context Protocol tools for Claude and other MCP clients (stdio, HTTP, Docker).

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages