Essentials

MCP Tools

13 MCP tools for AI agent blog management.

The package includes 13 Model Context Protocol tools for full blog management via AI agents.

Post Tools

ToolTypeAbilityDescription
ListPostsToolRead-onlyposts:readList posts with filters (status, category, search, pagination)
GetPostToolRead-onlyposts:readGet post by ID or slug
CreatePostToolWriteposts:createCreate post (markdown content, auto-slug, auto-sanitize)
UpdatePostToolIdempotentposts:updateUpdate post fields (partial updates)
DeletePostToolWriteposts:deleteSoft delete a post
RestorePostToolWriteposts:deleteRestore a soft-deleted post
GeneratePreviewUrlToolRead-onlyposts:readGenerate 1-hour signed preview URL

Category Tools

ToolTypeAbilityDescription
ListCategoriesToolRead-onlycategories:readList categories with post count
GetCategoryToolRead-onlycategories:readGet category by ID or slug
CreateCategoryToolWritecategories:createCreate category (auto-slug)
UpdateCategoryToolIdempotentcategories:updateUpdate category name
DeleteCategoryToolWritecategories:deleteSoft delete a category
RestoreCategoryToolWritecategories:deleteRestore a soft-deleted category

Registration

Register the tools in your MCP server:

app/Mcp/Servers/BlogServer.php
use ManukMinasyan\FilamentBlog\Mcp\Tools;

class BlogServer extends Server
{
    protected $tools = [
        Tools\ListPostsTool::class,
        Tools\GetPostTool::class,
        Tools\CreatePostTool::class,
        Tools\UpdatePostTool::class,
        Tools\DeletePostTool::class,
        Tools\RestorePostTool::class,
        Tools\GeneratePreviewUrlTool::class,
        Tools\ListCategoriesTool::class,
        Tools\GetCategoryTool::class,
        Tools\CreateCategoryTool::class,
        Tools\UpdateCategoryTool::class,
        Tools\DeleteCategoryTool::class,
        Tools\RestoreCategoryTool::class,
    ];
}

All tools require admin authentication and specific token abilities (Sanctum). The CreatePostTool and UpdatePostTool sanitize incoming markdown via Str::markdown with html_input='strip' and allow_unsafe_links=false — HTML is stripped, javascript: URLs are blocked.