定制 cleaniquecoders/laravel-mcp-kit 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cleaniquecoders/laravel-mcp-kit

Composer 安装命令:

composer require cleaniquecoders/laravel-mcp-kit

包简介

A Laravel MCP starter kit: a task-management MCP server distilled from production patterns, with token and OAuth 2.1 auth.

README 文档

README

Latest Version Tests License Total Downloads PHP Version

A reusable starter package for adding a Model Context Protocol (MCP) server to your Laravel projects, built on the official laravel/mcp package. It ships a small task-management domain as a working reference and gives you, ready to copy or extend, the patterns a production MCP server needs.

Features

  • Tools (read + write), Resources (read-by-URI context), and Prompts (reusable templates)
  • Per-tool authorization via Gate abilities — MCP is a third UI, never a back door
  • uuid-only inputs/outputs — the internal auto-increment id never leaks to the agent
  • Write tools funnel through Action classes — the agent, web UI, and CLI share one rule set
  • STDIO (local) and Streamable HTTP (remote) transports
  • Two HTTP auth methods — Sanctum personal access tokens and OAuth 2.1 (Passport) — on one endpoint
  • Honest annotations (#[IsReadOnly]) so clients know which tools change state and gate them

Requirements

  • PHP 8.4+
  • Laravel 11, 12, or 13
  • laravel/mcp ^0.8

Installation

composer require cleaniquecoders/laravel-mcp-kit
php artisan mcp-kit:install   # publishes config + migration (add --oauth to wire OAuth 2.1)
php artisan migrate

Then define the two Gate abilities every tool checks — see Installation.

Quick Start

php artisan mcp-kit:demo                          # seed demo tasks
claude mcp add mcp-kit -- php artisan mcp:start mcp-kit   # connect over STDIO

Set MCP_KIT_LOCAL_USER to the email the local transport should act as. See Quick Start for HTTP and OAuth.

Documentation

Full documentation lives in docs/:

Section Contents
Getting Started Installation, gates, first call
Architecture What the server exposes and the conventions
Authentication Connecting clients; Sanctum and OAuth 2.1
Configuration config/mcp-kit.php and MCP_KIT_* reference
Development Testbench Workbench and testing
Deployment Running the OAuth transport in production

Testing

composer test

Changelog

See CHANGELOG.md for recent changes.

License

MIT. © Nasrul Hazim / CleaniqueCoders. See LICENSE.md.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固