Public open-source package
Laravel Post2Site
Adds draft review, content-key auth, field mapping, and IndexNow support to Laravel sites.
Laravel developers who want a content-only publishing API for n2n-post2site.
n2ns/laravel-post2sitev0.1.0MITLaravelPHPMCPPublishing
Requirements
- PHP >= 8.2
- Laravel 12.x or 13.x
Install
text
composer require n2ns/laravel-post2sitetext
php artisan vendor:publish --tag=post2site-configtext
php artisan vendor:publish --tag=post2site-migrationstext
php artisan migrateConfigure
text
php artisan post2site:key "Production MCP"text
Set POST2SITE_PUBLISHING_MODE to review, configurable, or adapter in .env.text
Map incoming content fields in config/post2site.php when using configurable mode.Overview
- Laravel package that adds a content-only API for n2n-post2site.
- Receives Markdown drafts from an MCP client while your Laravel app keeps control of storage and publishing.
- Supports review-only, configurable mapping, or custom adapters.
Common Uses
- Accept blog articles and guide updates from n2n-post2site.
- Keep content drafting separate from database, SSH, payment, and user permissions.
- Register published posts with search engines using IndexNow notifications.
Documentation
- README covers requirements, installation, configuration, and testing.
- Integration Guide explains the available publishing modes.
- Architecture notes are available for teams that need custom adapters.
Next Steps
- Install the package via composer.
- Generate a content key and configure it in your n2n-post2site client.
- Test the connection with capabilities discovery.
Tools / Commands
- php artisan post2site:key [name] -- Generate a site-scoped API key for your MCP client.
- php artisan post2site:sync -- Manually sync publication status when needed.
Resources / Settings
- Draft and translation tables for reviewing incoming content before publication.
- Default API route prefix: /api/v1/mcp.
- Extension points for mapping package content into your Laravel models.
FAQ
Frequently asked questions and troubleshooting guides.
It generates a site-scoped API key for the MCP client and stores only a secure hash in your database. Requests must include that key in the Authorization header.
The package maps incoming Markdown fields, titles, slugs, and metadata into the Laravel models you define in config/post2site.php.