Stu Mason
Stu Mason

Activity

Pull Request Opened

PR #6 opened: feat: add MCP (Model Context Protocol) integration

Summary

Adds full MCP (Model Context Protocol) integration to Laravel Kick, enabling AI assistants like Claude to interact with your Laravel application through conversational tools.

What is MCP?

Model Context Protocol is an open standard for connecting AI assistants to external data sources and tools. This PR integrates with Laravel's official laravel/mcp package.

Changes

New MCP Server

  • KickServer auto-registers at /mcp/kick when both packages installed
  • Uses same token-based authentication as HTTP API
  • Configurable via KICK_MCP_ENABLED env var

8 MCP Tools

ToolDescription
kick_healthCheck application health (DB, cache, storage, redis)
kick_statsGet system/container statistics
kick_logs_listList available log files
kick_logs_readRead and filter log entries
kick_queue_statusQueue overview with optional failed jobs
kick_queue_retryRetry a specific or all failed jobs
kick_artisan_listList allowed artisan commands
kick_artisan_runExecute whitelisted commands

Documentation

  • README updated with MCP setup instructions
  • Claude Desktop configuration example
  • Example conversation showing tool usage
  • CHANGELOG updated

Files Added

routes/mcp.php
src/Mcp/KickServer.php
src/Mcp/Tools/
  ├── ArtisanListTool.php
  ├── ArtisanRunTool.php
  ├── HealthTool.php
  ├── LogsListTool.php
  ├── LogsReadTool.php
  ├── QueueRetryTool.php
  ├── QueueStatusTool.php
  └── StatsTool.php

Test plan

  • All existing tests pass (94 tests, 277 assertions)
  • PHPStan passes
  • Pint passes
  • Manual test with Claude Desktop against local devtrends.test
+1481
additions
-37
deletions
31
files changed