PHPackages                             smt/pmpd - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. smt/pmpd

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

smt/pmpd
========

PHP Music Player Daemon control implementation

v1.0.0(10y ago)2391[2 issues](https://github.com/saksmt/pmpd/issues)MITPHPPHP &gt;=5.6

Since Dec 2Pushed 10y ago2 watchersCompare

[ Source](https://github.com/saksmt/pmpd)[ Packagist](https://packagist.org/packages/smt/pmpd)[ RSS](/packages/smt-pmpd/feed)WikiDiscussions develop Synced 4w ago

READMEChangelog (1)Dependencies (3)Versions (1)Used By (0)

PMPD
====

[](#pmpd)

PHP client library for Music Player Daemon

Prerequesties
-------------

[](#prerequesties)

- PHP 5.6+
- Running MPD :)

Installation
------------

[](#installation)

```
composer require smt/pmpd dev-develop

```

Usage
-----

[](#usage)

```
use Smt\Pmpd\Client\Impl\DefaultClient;
use Smt\Pmpd\Configuration\HostConfiguration;
use Smt\Pmpd\Connection\Commands;
use Smt\Pmpd\Connection\ConnectionFactory;
use Smt\Pmpd\Entity\Enum\PlaybackState;
use Smt\Pmpd\Response\FailResponse;

$connectionFactory = new ConnectionFactory();
$config = new HostConfiguration();
$config->setHost('127.0.0.1');
$connection = $connectionFactory->createConnection($config);
$client = new DefaultClient($connection);

echo $client->getCurrent()->getTitle() . ' playing: ';
echo $client->getStatus()->getState() == PlaybackState::PLAYING . PHP_EOL;
$client->next();
$client->toggle();
$client->play();
$client->updateDatabaseAsync();
$response = $client->query(Commands::ADD_AND_RETURN_ID, 'Asking Alexandria - Not The American Average.flac', 1); // Add it to first position
if ($response instanceof FailResponse) {
    echo 'Something gone wrong :(' . PHP_EOL . PHP_EOL . $response->getMessage();
} else {
    echo 'Id in playlist:' . $response->get('Id') . PHP_EOL;
}

```

For more see [documentation](https://github.com/saksmt/pmpd/blob/develop/doc)

Roadmap
-------

[](#roadmap)

- Implement connection with password;
- Write API documentation;
- Cover with tests
- Rewrite client to facade with subsystems;

License
-------

[](#license)

This library is licensed under [MIT license](https://github.com/saksmt/pmpd/blob/develop/LICENSE)

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3864d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/056f804db1fb4e94cf408db237cf37b934a0c19253decb2ab5e1fae236f1ef83?d=identicon)[smt](/maintainers/smt)

---

Top Contributors

[![saksmt](https://avatars.githubusercontent.com/u/3481977?v=4)](https://github.com/saksmt "saksmt (16 commits)")

---

Tags

MPDmpcMusic Player Daemon

### Embed Badge

![Health badge](/badges/smt-pmpd/health.svg)

```
[![Health](https://phpackages.com/badges/smt-pmpd/health.svg)](https://phpackages.com/packages/smt-pmpd)
```

###  Alternatives

[naffiq/telegram-channel-php

Post to your telegram channel with ease!

124.4k](/packages/naffiq-telegram-channel-php)[mathiasgrimm/laravel-cloud-binaries

Pre-built static binaries for Laravel Cloud (jpegoptim, optipng, pngquant, cwebp, dwebp, avifenc, avifdec, gifsicle, ffmpeg, ffprobe, magick)

112.0k](/packages/mathiasgrimm-laravel-cloud-binaries)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
