XEP-XXXX: New MUC

Abstract
This document specifies an enhanced Multi-User Chat protocol that is broadly backwards compatible with that of XEP-0045, but adds a number of key improvements.
Author
Dave Cridland
Copyright
© 2026 – 2026 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

ProtoXEP

WARNING: This document has not yet been accepted for consideration or approved in any official manner by the XMPP Standards Foundation, and this document is not yet an XMPP Extension Protocol (XEP). If this document is accepted as a XEP by the XMPP Council, it will be published at <https://xmpp.org/extensions/> and announced on the <standards@xmpp.org> mailing list.
Type
Standards Track
Version
0.1 (2026-03-25)
Document Lifecycle
  1. Experimental
  2. Proposed
  3. Stable
  4. Final

1. Introduction

In the beginning was IRC. And we saw IRC, and made GC. And then MUC. And we looked upon them, and saw they were not good. But we used MUC for 25 years, so it must be pretty good for all that.

We also made MIX, but MIX has not seen adoption.

This is an attempt at addressing some of the shortcomings of XEP-0045 (herein "MUC1"), but it is phrased as extensions to MUC1 rather than a whole new protocol. Compared to other attempts, then it has a stronger focus on interoperability with existing MUC1 implementations, and with an eye to incremental deployment. It is offered as a discussion point - the start of the discussion and not the end - though a discussion point that's intended to be implementable.

2. Requirements

MUC1 has a number of issues, and the intent of any redesign is of course to address these. But it also has a number of useful behaviours, and the approach taken by this specification is to avoid losing these in the process of creating a new design. Agreeing these requirements is a first step.

  1. Joining a MUC1 room is trivial - from a developer standpoint this is very useful.
  2. MUC1 occupant addressing is also the nickname - this is bad, because when the nickname changes so does the JID, and it also restricts the form of nicknames in unexpected ways.
  3. Sending arbitrary messaging through a MUC1 is trivial - again, we should absolutely keep this.
  4. Presence-based joining "cleans up" automatically - for clients wishing to join a room ephemerally, this is very useful.
  5. Presence-based joining is not (comfortably) compatible with "sparsely online" clients such as mobile; when not online a client is not an occupant - long-term engagement with a chatroom is complicated as a result, so we should fix this.
  6. Chatrooms exist solely on one server, no mirroring exists - this has both advantages (in terms of controls and data sovereignty) and disadvantages (in terms of availability and resilience).
  7. MUC1 rooms enforce identical message ordering for all occupants - this is vital in many areas, and maintaining this somewhat enforces a central point.
  8. Occupants cannot send <iq/> stanzas directly to each other without complicated hacks; partly this is due to anonymity, and partly this is due to MUC1s supporting multiple clients per occupant JID.
  9. The same room JID and state should be usable by both MUC1 and MUC2.
  10. MUC1 presence is very noisy; MUC2 should provide a way to reduce or elide presence entirely.

3. The Occupant

3.1 Occupancy Sessions

Whenever a client joins a room, they start an "occupancy session". There can also be an occupancy session for their bare JID, which is independent of any client session. If at least one occupancy session exists, the room will contain an occupant JID, and the user will be considered an occupant of the room for all purposes.

3.2 Addressing

In MUC2, occupants are addressed by a JID consisting of the room's bare JID (see XEP-0045) and the occupant-id as resource. This requires that in MUC2, servers MUST provide an occupant-id, and also that servers MUST use an occupant-id generation algorithm that results in a valid resource. In addition, MUC1 nicknames MUST NOT be allowed to clash with occupant-ids, and as such, servers SHOULD prefix the occupant-id in the resource with some prefix, such as "-", to enforce this.

A client joining via MUC1's presence-based joins will not see these addresses, but instead sees the nickname-based addressing.

MUC2 rooms MUST include the nickname within presence as a nickname element qualified by the urn:xmpp:muc:0 namespace within the usual <x/>.

Example 1.
<presence to='bastanio@shakespeare.example/wimsy-192837' from='court@venice.example/-deadbeefcafe'>
  <x xmlns='http://jabber.org/protocol/muc#user'>
    <item affiliation='admin' role='moderator'/>
    <nickname xmlns='urn:xmpp:muc:0'>Bastanio</nickname>
  </x>
</presence>
      

3.3 Joining via Presence

Joining a MUC1 room can be done with (relatively) simple presence. MUC2, as well, can be done this way, though this will not automatically create a bare JID occupancy session. To do so, the same joining presence stanza is used, but the <x/> element includes a muc2 element qualified by the urn:xmpp:muc:0 namespace, and the presence is sent to the bare JID. This will indicate to the room that MUC2 is expected, and will cause the occupancy session to be a MUC2 session.

While rooms can be configured as "anonymous", "semi-anonymous", and so on, users MAY express their preference as well via the <visibility/> element. If a user requests anonymity, the room MUST either honour that request or reject the join. Note that if the user has an existing occupancy session joined non-anonymously, this conflict MUST also reject the join. Typically, rooms will accept a non-anonymous join to a room that defaults to anonymous, but they MAY reject that.

Example 2.
<presence from='bastanio@shakespeare.example/wimsy-192837' to='court@venice.example'>
  <x xmlns='http://jabber.org/protocol/muc'>
    <muc2 xmlns='urn:xmpp:muc:0'/>
      <nickname>Bastanio</nickname>
      <presence level='full'/>
      <visibility type='anonymous'/>
    </muc2>
  </x>
</presence>
      

The sequence of joining either type of room is broadly identical. The differences are listed in the following sections:

3.3.1 Presence Broadcast

Presence can be controlled by including a presence element, qualified by the urn:xmpp:muc:0 namespace, with a single attribute of "level", within the muc2 element inside <x/>. This attribute can be "none", in which case no presence, including the initial presence of other occupants, is sent to the client. A presence level of "full" indicates all presence is wanted by the client - this is the default. Finally, a level of "join" shows only online/offline changes. In this last case, the presence broadcast is sent as normal, but the changes relayed will only be changes from available to unavailable (or the reverse).

Note that it is intended that child elements might refine this further, with the element here unchanged and acting as a default.

  1. Existing Occupant Presence to a MUC1 client MUST include all occupants, addressed by nickname, including those bare JID occupants that are not online. These latter MUST be normal (available) presence, and SHOULD be annotated with a XEP-0310 annotation to indicate they are not online. Servers MAY also override a <show/> to 'xa', to indicate their absence.
  2. Existing Occupant Presence to a MUC2 client also includes all occupants, but this time addressed by occupant-id, and shows bare JID occupants that are not online as offline presence.
  3. Servers MAY include a delay tag in presence for either join to indicate when the presence state last changed.

3.3.2 Room History

Many MUC2 clients will not want this feature - but it can be trivially turned off in the usual manner. MUC2 rooms MUST implement MAM.

3.3.3 Room Subject

If a MUC1 client is joining, this will be as normal. For MUC2 clients, this will also include an additional element giving the MAM summary of the room.

3.4 Bare JID occupancy sessions

In order to handle the offline case, an iq-based joining protocol is also included. Clients joining the room in this way essentially request to be visible as an occupant (subject to the room's configuration), and also to receive messages to their bare JIDs. Groupchat messages sent to bare JIDs do not, by default, get sent to clients, and, by default, are bounced with a <service-unavailable/> error. Therefore clients MUST first establish if their server has MUC2-PAM support; if it does not, they MUST avoid this mechanism and use presence-based joins instead.

Bare JIDs join the room with an <iq/> request to the room's bare JID of type "set", containing a join element within the namespace urn:xmpp:muc:0, containing a nickname element. The room processes this, sending the room's current subject in the same way as a join - containing the MAM summary - and respond with an <iq/> of type result which reflects the join element within urn:xmpp:muc:0 also containing the nickname element. This allows the room to assign a different nickname as needed.

To trigger this, a client performs an iq-set request to their own bare JID, with a join element, this time with a "room" attribute containing the bare JID of the room, and containing a <nickname/>. The client will receive a response containing the same join element with the nickname element, once the join is complete.

3.4.1 MUC2-PAM

Servers support MUC2-PAM by:

  1. Including urn:xmpp:muc:pam:0 in their service discovery features.
  2. Not bouncing groupchat messages.
  3. Responding to a <iq/> request to join the room by sending one of their own.

This is (deliberately) a minimalist base, but given this base, other features can be added.


Appendices

Appendix A: Document Information

Series
XEP
Number
XXXX
Publisher
XMPP Standards Foundation
Status
ProtoXEP
Type
Standards Track
Version
0.1
Last Updated
2026-03-25
Approving Body
XMPP Council
Dependencies
XMPP Core
Supersedes
None
Superseded By
None
Short Name
MUC2

This document in other formats: XML  PDF

Appendix B: Author Information

Dave Cridland
Email
dave@hellopando.com
JabberID
dwd@dave.cridland.net

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.

Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

Appendix G: Notes

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 0.1 (2026-03-25)
    Got to start somewhere
    dwd

Appendix I: Bib(La)TeX Entry

@report{cridland2026muc2,
  title = {New MUC},
  author = {Cridland, Dave},
  type = {XEP},
  number = {XXXX},
  version = {0.1},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-XXXX.html},
  date = {2026-03-25/2026-03-25},
}

END