PHPackages                             mszewcz/php-json-rpc - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. mszewcz/php-json-rpc

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mszewcz/php-json-rpc
====================

JSON RPC 2.0 client and server implementation for PHP 7.1+

1.0.1(7y ago)0461MITPHPPHP &gt;=7.1.0

Since Nov 13Pushed 7y agoCompare

[ Source](https://github.com/mszewcz/php-json-rpc)[ Packagist](https://packagist.org/packages/mszewcz/php-json-rpc)[ RSS](/packages/mszewcz-php-json-rpc/feed)WikiDiscussions develop Synced 3d ago

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

mszewcz/php-json-rpc
====================

[](#mszewczphp-json-rpc)

PHP 7.1+ implementation of JSON RPC 2.0. Client and server libraries can handle **regular requests**, **notifications**. **Batch requests** are supported. Server supports **namespaces** and **self-description** (automatically provides input and output schema for each method in each namespace - please refer to [Wiki](https://github.com/mszewcz/php-json-rpc/wiki)). Client is able to send requests using **stream context**, **cURL** extension or by user defined transport class.

[![Build Status](https://camo.githubusercontent.com/7766ea12c7e7f8708c73fc696326887c32cd02b8ef3e6dc4127a0f424dde6dfd/68747470733a2f2f7472617669732d63692e636f6d2f6d737a6577637a2f7068702d6a736f6e2d7270632e7376673f746f6b656e3d534b487955753744396b326778667935614b7058266272616e63683d646576656c6f70)](https://travis-ci.com/mszewcz/php-json-rpc)[![Codacy Badge](https://camo.githubusercontent.com/afadbb86012bcdb803b4cf371caaa0a5379e3f46dbc8bbe0c7dd8cbf715669c8/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3738363366366461343865373438613562616335646465356261306535363038)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=mszewcz/php-json-rpc&utm_campaign=Badge_Grade)[![Codacy Badge](https://camo.githubusercontent.com/316d78765233dd22f7f16fb725aa3476215b2e9876e465fd9aa6db583503fa64/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f3738363366366461343865373438613562616335646465356261306535363038)](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=mszewcz/php-json-rpc&utm_campaign=Badge_Coverage)

Contents
--------

[](#contents)

- [What is JSON RPC?](#JsonRpc)
- [Installation](#Installation)
- [Usage](#Usage)
- [Contributing](#Contributing)
- [License](#License)

What is JSON RPC?
-----------------

[](#what-is-json-rpc)

JSON RPC is a simple and light weight communication protocol that allows clients and servers talk to each other. Version 2.0, which is implemented by this library, is described [here](http://www.jsonrpc.org/specification). Please take a while to read this, to understand request and response formats as well as some server-regarded rules.

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

[](#installation)

If you use [Composer](http://getcomposer.org/) to manage the dependencies simply add a dependency on `mszewcz/php-json-rpc` to your project's composer.json file. Here is a minimal example of a composer.json:

```
{
    "require": {
        "mszewcz/php-json-rpc": ">=1.0"
    }
}

```

You can also clone or download this respository.

**php-json-rpc** meets [PSR-4](http://www.php-fig.org/psr/psr-4/) autoloading standards. If using the Composer please include its autoloader file:

```
require_once 'vendor/autoload.php';
```

If you cloned or downloaded this repository, you will have to code your own PSR-4 style autoloader implementation.

Usage
-----

[](#usage)

Please refer to project [Wiki](https://github.com/mszewcz/php-json-rpc/wiki):

- [Client usage](https://github.com/mszewcz/php-json-rpc/wiki/Client-usage)
- [Server usage](https://github.com/mszewcz/php-json-rpc/wiki/Server-usage)

You may also want to check `examples` directory.

Contributing
------------

[](#contributing)

Contributions are welcome. Please send your contributions through GitHub pull requests

Pull requests for bug fixes must be based on latest stable release from the `master` branch whereas pull requests for new features must be based on the `developer` branch.

Due to time constraints, I am not always able to respond as quickly as I would like. If you feel you're waiting too long for merging your pull request please remind me here.

#### Coding standards

[](#coding-standards)

I follow [PSR-2](http://www.php-fig.org/psr/psr-2/) coding style and [PSR-4](http://www.php-fig.org/psr/psr-4/) autoloading standards. Be sure you're also following them before sending us your pull request.

License
-------

[](#license)

**php-json-rpc** is licensed under the MIT License - see the `LICENSE` file for details.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

Every ~220 days

Total

2

Last Release

2885d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c747ca08b7ba62fdbcc2708171026a6a7fe6d841fecacb705c31a5332a3c61da?d=identicon)[mszewcz](/maintainers/mszewcz)

---

Top Contributors

[![mszewcz](https://avatars.githubusercontent.com/u/31341235?v=4)](https://github.com/mszewcz "mszewcz (7 commits)")

---

Tags

httpphpjsonclientrpcserverjsonrpcjson-rpcphp-json-rpcphpjsonrpc

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mszewcz-php-json-rpc/health.svg)

```
[![Health](https://phpackages.com/badges/mszewcz-php-json-rpc/health.svg)](https://phpackages.com/packages/mszewcz-php-json-rpc)
```

###  Alternatives

[datto/json-rpc-http

HTTP client and server for JSON-RPC 2.0

66525.9k5](/packages/datto-json-rpc-http)[graze/guzzle-jsonrpc

JSON-RPC 2.0 client for Guzzle

981.2M24](/packages/graze-guzzle-jsonrpc)[datto/json-rpc

Fully unit-tested JSON-RPC 2.0 for PHP

1951.3M14](/packages/datto-json-rpc)

PHPackages © 2026

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