PHPackages                             nejcc/minimax-sdk - 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. [API Development](/categories/api)
4. /
5. nejcc/minimax-sdk

ActiveLibrary[API Development](/categories/api)

nejcc/minimax-sdk
=================

Laravel SDK for the Minimax accounting API (SI/HR/RS): OAuth2 auth and issued invoices, orders, customers, items and code lists.

v0.1.2(4d ago)10MITPHP ^8.4

Since Jul 7Compare

[ Source](https://github.com/Nejcc/minimax-sdk)[ Packagist](https://packagist.org/packages/nejcc/minimax-sdk)[ GitHub Sponsors](https://github.com/Nejcc)[ RSS](/packages/nejcc-minimax-sdk/feed)WikiDiscussions Synced today

READMEChangelogDependencies (5)Versions (4)Used By (0)

Minimax SDK
===========

[](#minimax-sdk)

[![Latest Version](https://camo.githubusercontent.com/828285888b1c236d7bb1459853bcc43b413d7a75fb21573a79fcd0c403da79b9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e656a63632f6d696e696d61782d73646b3f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/nejcc/minimax-sdk)[![Downloads](https://camo.githubusercontent.com/fcd92a341efec3ad589a250bfc3f5786b6336e740704d96e8dfebcdccd2a167b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e656a63632f6d696e696d61782d73646b)](https://packagist.org/packages/nejcc/minimax-sdk)[![PHP](https://camo.githubusercontent.com/463d6a6eeae851b8bdf370eada12816de31d3122b90c908fc09478e623b217dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e656a63632f6d696e696d61782d73646b3f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](composer.json)[![Laravel](https://camo.githubusercontent.com/0dca8f8a61ffbb81bab492a6cd813101cd650aab5b81cbf0e57072da50835aee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31332d6666326432303f6c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](composer.json)[![Coverage](https://camo.githubusercontent.com/32855e94577df9d0a30995653b17d33a5fbfdf644518f96ea0374313397d19b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e)](tests)[![License](https://camo.githubusercontent.com/54642d2d5dfc1d300c605809f86c8c6d78a6447e9ea066e18a44481ad1ad06fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e656a63632f6d696e696d61782d73646b)](LICENSE)

A Laravel SDK for the [Minimax](https://www.minimax.si) accounting API (SI / HR / RS). It handles OAuth2 auth and token caching, and wraps issued invoices, orders, customers, items and the code lists behind a small fluent API.

- **Zero-config auth** — OAuth2 password grant with automatic, leeway-aware token caching.
- **Fake mode** — canned fixtures so the SDK and admin UI run end-to-end before your credentials arrive.
- **Fluent resources** — typed CRUD helpers plus a generic escape hatch for any endpoint.
- **Local admin UI** — dashboard, live diagnostics and a resource browser (local env only).
- **MCP server** — read the API from AI coding agents (Laravel Boost, Claude, Codex).

Requirements
------------

[](#requirements)

- PHP 8.4+
- Laravel 13

Install
-------

[](#install)

```
composer require nejcc/minimax-sdk
php artisan vendor:publish --tag=minimax-config
```

Add your credentials to `.env`:

```
MINIMAX_LOCALIZATION=SI
MINIMAX_CLIENT_ID=...
MINIMAX_CLIENT_SECRET=...
MINIMAX_USERNAME=...
MINIMAX_PASSWORD=...
MINIMAX_ORG_ID=123456
```

No credentials yet? Set `MINIMAX_FAKE=true` and everything runs off canned fixtures. See the [Configuration wiki](https://github.com/Nejcc/minimax-sdk/wiki/Configuration)for every option.

Usage
-----

[](#usage)

```
use Nejcc\Minimax\Facades\Minimax;

// which orgs can this user see
$orgs = Minimax::orgs()->all();

// customers in the default org
$customers = Minimax::customers()->all()['Rows'];

// switch org for one chain
Minimax::forOrg(654321)->items()->all();

// resolve a VAT rate by its code
$vat = Minimax::vatRates()->byCode('S');

// create a draft invoice, issue it, grab the PDF
$invoice = Minimax::invoices()->create([...]);
$pdf = Minimax::invoices()->pdf($invoice['IssuedInvoiceId'], $invoice['RowVersion']);
```

Every resource shares the same CRUD surface: `all()`, `find()`, `byCode()`, `create()`, `update()`, `delete()`. Endpoints without a dedicated class are reachable through `Minimax::resource('journals')->all()`. Full details in the [Usage](https://github.com/Nejcc/minimax-sdk/wiki/Usage) and [Invoices](https://github.com/Nejcc/minimax-sdk/wiki/Invoices) wiki pages.

Admin UI
--------

[](#admin-ui)

In the `local` environment the package mounts a small dashboard at `/admin/minimax` — config status, live diagnostics and a resource browser. Handy for checking your setup before wiring the SDK into anything.

MCP (AI coding agents)
----------------------

[](#mcp-ai-coding-agents)

If `laravel/mcp` is installed, the package registers a local MCP server named `minimax` with three read-only tools: `list-organisations`, `list-resource`and `find-record`. Point your AI coding agent — the MCP **client** (Claude Code, Codex, Cursor …) — at it:

```
php artisan mcp:start minimax
```

> **Laravel Boost?** Boost is a separate MCP *server* (its own dev tools), not a client, so it won't absorb these tools. Run the two side by side — add both to your agent's config and it sees both toolsets.

Example client config (`.mcp.json` / Claude Code) — `minimax` runs alongside any other MCP servers, such as Boost:

```
{
  "mcpServers": {
    "boost":   { "command": "php", "args": ["artisan", "boost:mcp"] },
    "minimax": { "command": "php", "args": ["artisan", "mcp:start", "minimax"] }
  }
}
```

Pair it with `MINIMAX_FAKE=true` to let an agent explore the API shape with no credentials. To also expose the server over HTTP, publish and edit the routes: `php artisan vendor:publish --tag=minimax-ai-routes`. More in the [MCP wiki](https://github.com/Nejcc/minimax-sdk/wiki/MCP).

Documentation
-------------

[](#documentation)

- **Wiki** —
- **Offline** — open `docs/index.html` in a browser for the full reference.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for release notes.

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

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md), and ask questions in [Discussions](https://github.com/Nejcc/minimax-sdk/discussions).

Security
--------

[](#security)

Please report vulnerabilities privately — see [SECURITY.md](SECURITY.md).

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance99

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

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 ~0 days

Total

3

Last Release

4d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e4629de002c40aef796e5b320091892f0b7b35b62497260c52cef3eb721eed1?d=identicon)[Nejcc](/maintainers/Nejcc)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nejcc-minimax-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/nejcc-minimax-sdk/health.svg)](https://phpackages.com/packages/nejcc-minimax-sdk)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

813336.8k3](/packages/defstudio-telegraph)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.6k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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