Chapter 1. General protocol syntax
Prev |  | Next

# Chapter 1. General protocol syntax

## Protocol overview

The MPD command protocol exchanges line-based text records between client and server over TCP. Once the client is connected to the server, they conduct a conversation until the client closes the connection. The conversation flow is always initiated by the client.

The client transmits a command sequence, terminated by the newline character `\n`. The server will respond with one or more lines, the last of which will be a completion code.

When the client connects to the server, the server will answer with the following line:

    OK MPD version

where `version` is a version identifier such as 0.12.2. This version identifier is the version of the protocol spoken, not the real version of the daemon. (There is no way to retrieve this real version identifier from the connection.)

Prev |  | Next
The Music Player Daemon protocol | Home | Requests