makeplane / makeplane/plane-mcp-server
HTTP mode requires PLANE_OAUTH_PROVIDER_* even for PAT-only deployments
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 325
- Forks
- 178
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 2
Description
Summary
When running the server in HTTP transport mode (python -m plane_mcp http), startup unconditionally constructs the OAuth-provider MCP app via get_oauth_mcp(prefix + "/http") in plane_mcp/__main__.py. This forces PlaneOAuthProvider.__init__ to validate three OAuth-provider environment variables even when the operator only intends to expose the PAT/header-based transport that is mounted at /http/api-key/:
PLANE_OAUTH_PROVIDER_CLIENT_ID— raisesValueErrorif unsetPLANE_OAUTH_PROVIDER_CLIENT_SECRET— raisesValueErrorif unsetPLANE_OAUTH_PROVIDER_BASE_URL— the resulting issuer URL is validated againstvalidate_issuer_url(frommcp/server/auth/routes.py) and must behttps://, otherwiseValueError
For a self-hosted deployment that only needs the PAT-header transport (Section 3 in the README, /http/api-key/mcp), the OAuth provider is never actually exercised, yet the server cannot start without those three variables.
Reproduction
- Set only the PAT-related variables (e.g.
PLANE_API_KEY,PLANE_WORKSPACE_SLUG, plus whatever else the header transport needs). - Leave
PLANE_OAUTH_PROVIDER_CLIENT_ID,PLANE_OAUTH_PROVIDER_CLIENT_SECRET, andPLANE_OAUTH_PROVIDER_BASE_URLunset (or set the base URL to a non-HTTPS value). - Start the server:
python -m plane_mcp http. - Startup aborts before the header app is mounted.
Traceback summary:
File "plane_mcp/__main__.py", line ..., in main
oauth_mcp = get_oauth_mcp(prefix + "/http")
File "plane_mcp/server.py", in get_oauth_mcp
...
File "plane_mcp/auth/plane_oauth_provider.py", in PlaneOAuthProvider.__init__
raise ValueError("client_id is required - set via parameter or PLANE_OAUTH_PROVIDER_CLIENT_ID")
(If client_id/client_secret are stubbed, the next failure is validate_issuer_url rejecting a non-HTTPS PLANE_OAUTH_PROVIDER_BASE_URL.)
Current workaround
Stub all three variables with placeholder values, e.g.:
PLANE_OAUTH_PROVIDER_CLIENT_ID=stub-not-used
PLANE_OAUTH_PROVIDER_CLIENT_SECRET=stub-not-used
PLANE_OAUTH_PROVIDER_BASE_URL=https://example.invalid
This is non-obvious and undocumented; the operator has to read the source to figure it out.
Suggested fixes (options, not a prescription)
- Lazy-init the OAuth provider on first request rather than eagerly at startup, so a deployment that never routes to the OAuth mount never triggers the validation.
- Add an opt-out env var / flag (e.g.
PLANE_DISABLE_OAUTH=1) that skips constructing and mounting the OAuth app entirely, leaving only the PAT-header transport. - Document the stub-variable workaround in the README section that covers the PAT/header transport, so PAT-only operators at least know what to set.
Any one of these would unblock PAT-only self-hosted deployments. Happy to send a PR for whichever direction the maintainers prefer.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in plane_mcp/main.py at the HTTP startup path and trace get_oauth_mcp into server.py and plane_mcp/auth/plane_oauth_provider.py; review validate_issuer_url in mcp/server/auth/routes.py and the README PAT transport section. Confirm with maintainers whether lazy initialization, an opt-out, or documentation is preferred. Done means a PAT-only HTTP deployment starts without OAuth variables while the intended OAuth behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100