Nextcloud MCP-Server an OAuth
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- api, authentication, backend, security
Research direction
Start with the built-in MCP server and the current bearer-token flow described in the linked Nextcloud documentation. Map the requested OAuth endpoints, per-user ACL enforcement, soft scopes, admin restrictions, transport compatibility, and revocation against the acceptance criteria; done means a ChatGPT OAuth connection exposes only authorized data and supports consent revocation.
Written by the indexing model from the issue text.
Description
Add OAuth 2.1 (Auth Code + PKCE) to the built-in MCP server and support per-user access control
Is your feature request related to a problem? Please describe.
Nextcloud’s Context Agent already exposes an MCP server, but it currently authenticates via app password using Authorization: Bearer <token> only. This prevents using it as a ChatGPT connector, because the ChatGPT admin UI for remote MCP servers supports OAuth or no authentication, not custom bearer headers. As a result, organizations cannot easily add the Nextcloud MCP server as a workspace-wide connector in ChatGPT.
Describe the solution you’d like
Please add first-class OAuth 2.1 Authorization Code with PKCE to the built-in MCP server, along with per-user access enforcement:
- OAuth 2.1 / OIDC-compatible endpoints (
/authorize,/token) so ChatGPT can complete user consent and store user-bound tokens. - Per-user binding: the MCP server should execute requests as the consenting Nextcloud user, honoring existing shares/ACLs (files, Talk, calendar, etc.).
- Server-enforced “soft scopes” for MCP (even if core OAuth lacks scopes): e.g.,
files.read,files.write,talk.read,calendar.read. The MCP server would internally restrict exposed tools/routes accordingly. - Admin controls to constrain exposure, e.g., allowlist of folders/namespaces or group-based eligibility.
- Transport compatibility with ChatGPT MCP (SSE/streaming HTTP) and token revocation/rotation.
Describe alternatives you’ve considered
- Context Chat (built-in): indexes data into a vector DB; tight content scoping can be difficult depending on setup.
- AI as a Service / integration_openai: works, but typically requires an external API provider/account (API key) and is not an MCP server for ChatGPT connectors.
- Community MCP servers for Nextcloud: often authenticate with app passwords and don’t solve the ChatGPT OAuth requirement for workspace rollout.
Why this matters
- ChatGPT workspace admins can publish connectors for all users; with OAuth, each user authorizes their own access and only sees what they can already access in Nextcloud. This aligns with least privilege and simplifies enterprise rollout.
Acceptance criteria (suggestion)
- In ChatGPT, an admin adds “Nextcloud MCP” as a remote server and chooses OAuth.
- A user starts a chat, picks the connector, completes the OAuth consent, and can list/search only files they already have rights to.
- Revoking consent in Nextcloud (or the connector) immediately invalidates access.
- Optional admin policy: restrict tools (read-only vs read/write) and/or allowlist top-level paths.
Security & privacy
- Use Auth Code + PKCE, short-lived access tokens, refresh tokens, and proper token revocation.
- Because core OAuth may lack granular scopes, implement server-side scoping within the MCP server (tool exposure + path allowlists) until upstream scopes are available.
References
- Nextcloud MCP server docs (example shows
Authorization: Bearer <app-password>): https://docs.nextcloud.com/server/latest/admin_manual/ai/app_context_agent.html#using-nextcloud-mcp-server - Closed ticket referencing MCP in Nextcloud: https://github.com/nextcloud/server/issues/53211
- OpenAI MCP (for connector context): https://platform.openai.com/docs/mcp
- Dominant language
- Python
- Stars
- 24
- Forks
- 16
- Avg merge
- 7d 15h
- Merged PRs (30d)
- 4
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.
More from nextcloud/context_agent
-
find_person_in_contacts fails with Niquests content argument and cannot serialize vCard Address Openbug
Difficulty 2/5 Half a day Newbie friendliness 76/100
nextcloud/context_agent#217 · 3 comments ·
-
list skills tool Openenhancement priority normal
Difficulty 5/5 Over a week Newbie friendliness 35/100
nextcloud/context_agent#239 · 2 comments · 1 reaction ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 67/100
nextcloud/context_agent#231 · 2 comments ·
-
enhancement priority normal
Difficulty 4/5 3-5 days Newbie friendliness 45/100
nextcloud/context_agent#213 · 2 comments · 1 reaction ·
-
enhancement help wanted priority normal
Difficulty 5/5 Over a week Newbie friendliness 35/100
nextcloud/context_agent#212 · 7 comments · 1 reaction ·
All issues in nextcloud/context_agent
Similar issues
-
essnmx good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
[Feature] 奇物选择添加优先级 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Giskard-AI/giskard-oss#2840 · 1 comment ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Openarea: repo bug perceived difficulty: 2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yeti-platform/yeti#1380 ·