AI/Blogfor Laravel

Open-source Laravel blog package

The Laravel blog package that edits with you.

Laravel AI Blog scores every post for on-page SEO, suggests internal links, drafts with any AI provider and lets Claude, ChatGPT or any MCP agent write to your blog. Every AI change lands as a draft. A person decides what goes live.

composer require byteminus/laravel-ai-blog
Read the docs

13 on-page SEO checks8 MCP tools230 testsLaravel 10–13 · PHP 8.2–8.5MIT licensed

Claude Code · mcp: my-blogExample session
  1. draft-from-keyword"laravel queues" → post 42, saved as draft
  2. score-post67 / 100 · grade C · 4 fixes
  3. suggest-links3 links, anchor "queue workers"
  4. update-postmeta description, H2, 3 links
  5. score-post92 / 100 · grade A
  6. schedule-postMonday 09:00 · the scheduler publishes
  7. publish-postno such tool
Agents draft, score, link and schedule. There is deliberately no tool that publishes.

A blog that does the editor's checklist

The parts of blogging that get skipped, built into the package.

Headless

Keep your own Post model

Add the HasBlogSeo trait to the model you already have, or use the bundled one. No admin panel forced on you. Turn on one flag for /blog routes, Blade components and RSS.

SEO score

A score with fixes, not just a number

Thirteen weighted checks, from title length to the keyword in an H2, each with a plain-English fix. Deterministic, no API key needed.

Internal links

Links to your own posts, with anchor text

TF-IDF suggestions from your published posts, and stale-post detection for the ones due a refresh.

AI drafting

An editor, not a ghostwriter

Brief to draft, meta descriptions, rewrites, refresh ideas and translations through the official laravel/ai SDK, with any provider. Unverified claims are marked [verify: …].

MCP server

Agents get tools, not the publish button

Claude, ChatGPT and Claude Code connect over laravel/mcp. They can draft, score, link and schedule. Publishing stays with people and the scheduler.

Safe research

Fetches the web without opening your network

SafeFetcher blocks private addresses, pins DNS, obeys robots.txt and caps size and time. For your own write actions there is a command bus with idempotency keys and an audit trail.

Know what to fix before you publish

Every post gets a 0–100 score from the same checks an SEO editor runs by hand.

76Btarget keyword: “laravel queues”
  • Title length10
  • Meta description length10
  • Content length10
  • Uses H2 subheadings8
  • Images have alt text6
  • Links to other content8
  • Readability6
  • Target keyword4
  • Keyword in title10
  • Keyword in meta description6
  • Keyword in URL slug6
  • Keyword in first 100 words8
  • Keyword in an H26

Fixes, in plain English

From $post->seoReport()->fixes()

  • Adjust the meta description to 120–160 characters (currently 94).
  • Add at least two links — internal links to related posts count most.
  • Add "laravel queues" to at least one H2.

Run php artisan ai-blog:audit to score every post at once, or add --fix to let the AI fill missing SEO fields first.

Let AI agents write to your blog

A built-in MCP server. Connect Claude Code with one command; Claude.ai and ChatGPT through OAuth.

AI agent · MCP tools You · your app or Artisan Draft Scheduled Published drafts, edits, scores, links schedule-post no publish tool publish() schedule scheduler, on time
Agents work on drafts and can schedule them. Only a person, or the scheduler at the time someone set, moves a post to published.
MCP toolWhat the agent can do
list-postsList recent posts with status and SEO score, filtered by status or text
get-postRead one post in full, as Markdown
create-draftCreate a post as a draft and get its score and fixes back
update-postChange only the fields it passes. It cannot change the status
draft-from-keywordResearch a keyword into a brief, write the draft and save it
score-postScore on-page SEO from 0 to 100 and list the fixes
suggest-linksSuggest internal links to related posts, with anchor text
schedule-postSchedule a future publish time for the scheduler
publish-postDeliberately missing. Agents can't publish

The MCP endpoint sits behind the middleware you choose, such as auth:sanctum. Add can:manageAiBlog to let in only the accounts you trust: a scheduled post is published by the scheduler without another check.

From keyword to published post

The same path whether a person, a queued job or an agent starts it.

  1. Brief

    A keyword becomes a brief: search intent, an outline, questions to answer and related terms.

  2. Draft

    The AI writes the draft from the brief and saves it with status draft. It records how much of the post the AI wrote.

  3. Score and fix

    The SEO report lists what is missing. enrichSeo() can fill in a missing keyword and meta description.

  4. Link

    Internal link suggestions point the new post at your related published posts, with anchor text that fits the sentence.

  5. Schedule and publish

    A person publishes, or schedules the post and ai-blog:publish-scheduled publishes it on time. Pages ship with canonical URLs, Open Graph tags and BlogPosting JSON-LD.

The code

Install, publish the migrations, and use it from anywhere in your app.

// Deterministic, no API key needed.
$report = $post->seoReport();
$report->score;    // 76
$report->grade();  // "B"
$report->fixes();  // ["Add at least two links — ...", ...]

// Internal links from your own published posts.
$post->suggestedLinks(); // [['post' => Post, 'anchor' => 'queue workers', ...]]

Questions developers ask

What is Laravel AI Blog?

Laravel AI Blog is a free, open-source blog package for Laravel. It adds posts, categories and tags, an on-page SEO score with fixes, internal link suggestions, AI drafting through laravel/ai and an MCP server so AI agents can write drafts. Install it with composer require byteminus/laravel-ai-blog.

Which Laravel and PHP versions does it support?

Laravel 10, 11, 12 and 13 on PHP 8.2 to 8.5. Both the newest and the oldest allowed dependencies are tested on every push.

Does it work without an AI provider?

Yes. SEO scoring, link suggestions, structured data, the RSS feed and the blog routes need no API key. The AI features are optional and use laravel/ai when you install it, with any provider it supports.

Will the AI publish posts by itself?

No. Everything the AI or an agent writes is saved as a draft, and the MCP server has no publish tool. A post goes live when a person publishes it, or when the scheduler reaches a time set with schedule() or the schedule-post tool.

Can I keep my existing Post model?

Yes. Add the HasBlogSeo trait to your model, override any field names that differ, and point ai-blog.models.post at it in the config.

How do I connect Claude or ChatGPT to my Laravel blog?

Enable the MCP server in config/ai-blog.php and protect it with middleware. Claude Code connects with claude mcp add and a bearer token. Claude.ai and ChatGPT custom connectors use laravel/mcp's OAuth support with Passport.

Does it add SEO tags to the blog pages?

Yes, when you enable the routes. Post pages get a canonical URL, Open Graph and Twitter cards, publish and modified times, an RSS link and BlogPosting JSON-LD, plus FAQPage JSON-LD when the post has question headings. Index, category and tag pages get descriptions, canonical URLs and prev and next links.

Is it free?

Yes. Laravel AI Blog is MIT licensed, with no paid tier, no Nova or Filament license and no SaaS account.

Read the full FAQ: installation, every SEO check, AI drafting, the MCP tools, routes, safe fetching, testing and troubleshooting.

Write faster. Publish on purpose.

composer require byteminus/laravel-ai-blog