PHPackages                             legendhasit/wp-connector - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. legendhasit/wp-connector

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

legendhasit/wp-connector
========================

Legend Has It's MCP content connector for WordPress: OAuth 2.1 server, MCP/JSON-RPC transport, and a registry-driven validated write engine. Extracted from the Cube starter theme so it can be versioned and rolled across the fleet.

v1.0.0(yesterday)03↑2900%MITPHPPHP &gt;=8.3CI passing

Since Jun 27Pushed todayCompare

[ Source](https://github.com/Legend-Has-It/wp-connector)[ Packagist](https://packagist.org/packages/legendhasit/wp-connector)[ RSS](/packages/legendhasit-wp-connector/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

legendhasit/wp-connector
========================

[](#legendhasitwp-connector)

The MCP content connector for Legend Has It's WordPress sites: an OAuth 2.1 server, an MCP/JSON-RPC transport, and a registry-driven validated write engine. A Composer package a [Roots/Acorn](https://roots.io/acorn/) theme (such as [Cube](https://github.com/Legend-Has-It/cube.legendhasit.co.nz)) installs and binds its palette and control plane into through the three interfaces below.

> **The package owns the mechanism, never the palette.** Blocks, CPTs and taxonomies stay in the host theme. The connector receives them as data through the `Palette` interface, so a new block is a theme file with **zero** package change.

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

[](#requirements)

- PHP &gt;= 8.3
- A [Roots/Acorn](https://roots.io/acorn/) 6 host (Sage 11 theme). Acorn provides the `Illuminate\*` runtime the providers/commands extend, so it is a **dev-only**dependency here (the host supplies it at runtime; the `illuminate/* ^13` floor that Acorn 6 ships is the supported baseline).

What the host must provide
--------------------------

[](#what-the-host-must-provide)

The package resolves three per-clone contracts from the host container. Bind them in a theme service provider:

```
use LegendHasIt\Connector\Contracts\{Palette, Config, OptionsCatalog};

$this->app->singleton(Palette::class,        fn () => new \App\Connector\CubePalette);
$this->app->singleton(Config::class,         fn () => new \App\Connector\CubeConfig);
$this->app->singleton(OptionsCatalog::class, fn () => new \App\Connector\CubeOptionsCatalog);
```

- **`Palette`** — the block/CPT/taxonomy palette, projected to plain data (pre-built ACF field arrays). The host flattens its registries into the struct shapes documented on the interface.
- **`Config`** — the control plane (enabled, capabilities, allowed types, publish/term opt-ins).
- **`OptionsCatalog`** — the Website-Options allow-list the connector may read/write.

Providers
---------

[](#providers)

Register the two providers with Acorn. Either list them in the theme's `functions.php` `withProviders([...])`, or rely on Acorn package discovery by adding `extra.acorn.providers` to your install — pick one, not both, or they double-register.

- `LegendHasIt\Connector\Providers\OAuthServiceProvider` — discovery docs, the authorize/consent + token grant (PKCE), dynamic client registration, the opt-in `client_credentials` grant.
- `LegendHasIt\Connector\Providers\ConnectorServiceProvider` — the MCP endpoint at `cube-mcp/v1/rpc`, the dashboard panels, and the connector CLI commands (registered when running in console).

Development
-----------

[](#development)

```
composer install
composer test     # phpunit
composer lint     # pint --test
composer verify   # lint + test
php tests/provider-load.php   # providers load + boot with no fatal
```

The suite mocks WordPress (Brain Monkey + class doubles) and drives the engine through a fixture `Palette`/`Config`/`OptionsCatalog`, so it needs no database.

Notes
-----

[](#notes)

- **Token storage uses transients.** Fine per-site, but an aggressive object cache can evict a token before its 8h TTL on some hosts.
- **Security model.** The write path is off unless enabled, OAuth-gated, draft-only by default, and scoped to allowed post types. See the host theme's `SECURITY.md`.

License
-------

[](#license)

MIT © Legend Has It

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance100

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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

1d ago

### Community

Maintainers

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

---

Top Contributors

[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (10 commits)")[![Zac-Legend](https://avatars.githubusercontent.com/u/134684748?v=4)](https://github.com/Zac-Legend "Zac-Legend (1 commits)")

---

Tags

wordpressmcpoauthacfsageacorn

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/legendhasit-wp-connector/health.svg)

```
[![Health](https://phpackages.com/badges/legendhasit-wp-connector/health.svg)](https://phpackages.com/packages/legendhasit-wp-connector)
```

###  Alternatives

[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k22.0M76](/packages/hwi-oauth-bundle)[log1x/sage-directives

A set of Blade directives for use with Roots Sage.

296736.1k8](/packages/log1x-sage-directives)[tiny-pixel/acorn-db

Eloquent database support for Acorn projects

368.8k](/packages/tiny-pixel-acorn-db)[krombox/oauth2-wordpress

WordPress OAuth 2.0 Client Provider for The PHP League OAuth2-Client

115.4k2](/packages/krombox-oauth2-wordpress)[tiny-pixel/acorn-block-templates

Block templates for Sage 10

191.3k](/packages/tiny-pixel-acorn-block-templates)

PHPackages © 2026

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