Skip to main content

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

  • Python 3.10 or higher
  • uv (fast Python package manager)
  • 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"

uvx downloads the server into a cached environment and runs it:

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

From the first release (#52) the package is on PyPI as op-mcp, and this becomes uvx op-mcp.

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

Prefix these with uvx --from git+https://github.com/LS-Instruments/op-mcp when running without installing, or with uv run from a clone.

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)

Claude Code (CLI or VS Code extension):

claude mcp add openproject \
  -e OPENPROJECT_URL=https://your-instance.openproject.com \
  -e OPENPROJECT_API_KEY=your-api-key \
  -- uvx --from git+https://github.com/LS-Instruments/op-mcp op-mcp

Check it with claude mcp list (it should say ✓ Connected).

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: add this to its config file (Windows: %APPDATA%\Claude\claude_desktop_config.json; macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Linux: ~/.config/Claude/claude_desktop_config.json) and restart Claude Desktop:

{
  "mcpServers": {
    "openproject": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/LS-Instruments/op-mcp",
        "op-mcp"
      ],
      "env": {
        "OPENPROJECT_URL": "https://your-instance.openproject.com",
        "OPENPROJECT_API_KEY": "your-api-key"
      }
    }
  }
}

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

If the client can't find uvx (desktop apps don't always see your shell's PATH), give its full path as "command" (which uvx, or where uvx on Windows). If it fails to connect, check the URL and API key, and run the same command in a terminal: 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 ROADMAP.md §4a 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 reports) are outside this promise. ROADMAP.md §4a 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

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

Metadata

Release files for op-mcp 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for op-mcp 1.0.1
File Size Uploaded Provenance Actions
op_mcp-1.0.1.tar.gz 117.5 kB With provenance Details for op_mcp-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for op-mcp 1.0.1
File Interpreter ABI Platform Actions
op_mcp-1.0.1-py3-none-any.whl Python 3 none any Details for op_mcp-1.0.1-py3-none-any.whl

Total release size: 268.2 kB

Release files / op_mcp-1.0.1.tar.gz

Download URL op_mcp-1.0.1.tar.gz
Size 117.5 kB
Tags Source
SHA-256 checksum
How to use checksums
be82a2917ce7557330f667406daab31cefe82eec8ecfa5b6a81be70d69bb7022
BLAKE2b-256 checksum
How to use checksums
5eeeda70cc965d0247b15ddc945ddeb4e75a80f2e1d2f14eaa756e2fe2e7a549
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Release files / op_mcp-1.0.1-py3-none-any.whl

Download URL op_mcp-1.0.1-py3-none-any.whl
Size 150.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68df69f16fe9e1f22a2ab3d0efedb9f56ed1e88455e392ab3542d098faccd6d1
BLAKE2b-256 checksum
How to use checksums
7655e9b28e367dfdea53919d14f37b84afd65406dc4c8ef171dc1882a1e29aa6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

Security for op-mcp 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for op_mcp-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page