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
| Tool | Type | Ability | Description |
|---|---|---|---|
ListPostsTool | Read-only | posts:read | List posts with filters (status, category, search, pagination) |
GetPostTool | Read-only | posts:read | Get post by ID or slug |
CreatePostTool | Write | posts:create | Create post (markdown content, auto-slug, auto-sanitize) |
UpdatePostTool | Idempotent | posts:update | Update post fields (partial updates) |
DeletePostTool | Write | posts:delete | Soft delete a post |
RestorePostTool | Write | posts:delete | Restore a soft-deleted post |
GeneratePreviewUrlTool | Read-only | posts:read | Generate 1-hour signed preview URL |
Category Tools
| Tool | Type | Ability | Description |
|---|---|---|---|
ListCategoriesTool | Read-only | categories:read | List categories with post count |
GetCategoryTool | Read-only | categories:read | Get category by ID or slug |
CreateCategoryTool | Write | categories:create | Create category (auto-slug) |
UpdateCategoryTool | Idempotent | categories:update | Update category name |
DeleteCategoryTool | Write | categories:delete | Soft delete a category |
RestoreCategoryTool | Write | categories:delete | Restore 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.