Mud Client Compression Protocol  
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
MCCP is a compression protocol which allows a MUD server to compress output to the receiving client using the zlib compression library. This typically reduces the amount of bandwidth used by the server by 75 to 90%.

The MCCP Protocol

MCCP is implemented as a Telnet option RFC854, RFC855. The server and client negotiate the use of MCCP as they would any other telnet option. Once agreement has been reached on the use of the option, option sub-negotiation is used to start compression.

Server Commands

IAC WILL MCCP    Indicates the server supports MCCP.

Client Commands

IAC DO   MCCP    Indicates the client supports MCCP.
IAC DONT MCCP    Indicates the client does not support MCCP.
                 If the server has enabled compression it should disable it.

Handshake

When a client connects to a server the server should send IAC WILL MCCP. The client should respond with either IAC DO MCCP or IAC DONT MCCP. If the server receives IAC DO MCCP it should respond with: IAC SB MCCP IAC SE and immediately afterwards start compression.

MCCP definitions

MCCP 86

Compression Format

Immediately after the server sends IAC SB MCCP IAC SE the server should create a zlib stream RFC1950.
Once compression is established, all server side communication, including telnet negotiations, takes place within the compressed stream.
The server may terminate compression at any point by sending an orderly stream end (Z_FINISH). Following this, the connection continues as a normal telnet connection.

Compression Errors

If a decompression error is reported by zlib on the client side, the client can stop decompressing and send IAC DONT MCCP. The server in turn should disable compression upon receiving IAC DONT MCCP, the connection continues as a normal telnet connection.
Alternatively the client can close the connection when a stream error is detected.

MCCP versions

In 1998 MCCP used TELOPT 85 and the protocol defined an invalid subnogation sequence (IAC SB 85 WILL SE) to start compression. Subsequently MCCP version 2 was created in 2000 using TELOPT 86 and a valid subnogation (IAC SB 86 IAC SE).
As of 2004 virtually every MCCP enabled MUD client supports version 2, making version 1 obsolete. As such this specification only deals with version 2, and it is strongly discouraged for MUD servers to implement version 1.
Links

If you want a link added, you can email me at mudclient@gmail.com.

Clients supporting MCCP

Comparison of MUD clients - Mudpedia contains an up to date list of the MCCP status of MUD clients.

Codebases

Comparison of MUD codebases - Mudpedia contains an up to date list of the MCCP status of MUD codebases.

Snippets

Scandum's MUD Telopt Handler - Handles EOR, MCCP, MSDP, MSSP, MTTS, NAWS, NEW-ENVIRON, TTYPE, and xterm 256 colors.
Libtelnet - Handles MCCP, MSSP, NAWS, and TTYPE.