Skip to content
Back to search

laravel

MCP server for all of your Laravel projects - better AI pair programming

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/usecroft--laravel/badge.svg)](/listings/usecroft--laravel)

HTML

<a href="/listings/usecroft--laravel"><img src="/api/listings/usecroft--laravel/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install the package via composer:

composer require usecroft/laravel --dev

Publish the config file with:

php artisan vendor:publish --tag="croft-config"

Add to your IDE:

php artisan croft:install

Add more functionality with [usecroft.com »](https://usecroft.com) hosted servers (coming soon)

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 147 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. > # Croft is now [Laravel Boost](https://github.com/laravel/boost)!
  3. > Croft was built by [Ashley Hindle](https://github.com/ashleyhindle) in collaboration with [Springloaded](https://github.com/springloadedco), and would eventually become [Laravel Boost](https://github.com/laravel/boost). Croft is no longer maintained - check out [boost](https://github.com/laravel/boost) instead!
  4. ---
  5. ![Croft Laravel](https://github.com/user-attachments/assets/6c42134d-5236-4ae1-8c61-bce4db5d9de1)
  6. Croft is an MCP server designed specifcally for Laravel developers, by Laravel developers. We wanted a plug and play solution to boosting productivity, so we built one. The `php artisan croft` command provides tools to your MCP client to help your AI pair programmer work better. This package is specifically designed to offer tools that are useful _locally_.
  7. Add even more functionality with [usecroft.com »](https://usecroft.com) hosted servers.
  8. ## Installation
  9. Install the package via composer:
  10. ```bash
  11. composer require usecroft/laravel --dev
  12. ```
  13. Publish the config file with:
  14. ```bash
  15. php artisan vendor:publish --tag="croft-config"
  16. ```
  17. Add to your IDE:
  18. ```bash
  19. php artisan croft:install
  20. ```
  21. Add more functionality with [usecroft.com »](https://usecroft.com) hosted servers (coming soon)
  22. ## Usage
  23. To make use of Croft you need to add it as an MCP server in your favourite tool.
  24. The command the MCP client needs to run is `./artisan croft`
  25. **Cursor** ([Docs](https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers))
  26. We recommend you ship an `mcp.json` file with your project in `.cursor/mcp.json`
  27. ```json
  28. {
  29. "mcpServers": {
  30. "croft": {
  31. "command": "./artisan",
  32. "args": ["croft"]
  33. }
  34. }
  35. }
  36. ```
  37. ## Current functionality
  38. - Screenshot URLs
  39. - Query database (read only, or read write)
  40. - Get absolute URL from relative path
  41. - Get current date and time
  42. - Read last X log entries
  43. - Read & filter database structure - tables, columns, indexes, foreign keys
  44. - List/filter routes
  45. - List artisan commands
  46. - List available config() keys (and optionally values) in dot notation
  47. - List available env() keys (without leaking secrets of course)
  48. ## Extra functionality
  49. Add more functionality with [usecroft.com »](https://usecroft.com) remote MCP servers (coming soon).
  50. ## Add your own tools
  51. It's trivial to add your own tools.
  52. Just create a class that extends our `Croft\Feature\Tool\AbstractTool` class, then make sure it's in your `croft.php` config file.
  53. Example:
  54. ```php
  55. <?php
  56. declare(strict_types=1);
  57. namespace Croft\Tools;
  58. use Croft\Feature\Tool\AbstractTool;
  59. use Croft\Feature\Tool\ToolResponse;
  60. class {{CLASSNAME}} extends AbstractTool
  61. {
  62. public function __construct()
  63. {
  64. // Setup annotations according to MCP specification
  65. $this->setTitle('{{NAME}}')
  66. ->setReadOnly(true) // Just listing commands, no modifications
  67. ->setDestructive(false) // No destructive operations
  68. ->setIdempotent(true); // Safe to retry
  69. }
  70. public function getName(): string
  71. {
  72. return '{{NAME}}';
  73. }
  74. public function getDescription(): string
  75. {
  76. return 'Must explain well what the tool can do so the MCP client can decide when to use it.';
  77. }
  78. /**
  79. * What params does the MCP client need to provide to use this tool?
  80. **/
  81. public function getInputSchema(): array
  82. {
  83. return [
  84. 'type' => 'object',
  85. 'properties' => (object) [
  86. ],
  87. 'required' => [],
  88. ];
  89. }
  90. public function handle(array $arguments): ToolResponse
  91. {
  92. return ToolResponse::text("Howdy, this is the start of something great.");
  93. }
  94. }
  95. ```
  96. After adding a tool you'll need to restart the server, or ask the MCP client to relist the tools.
  97. ## Support & Credits
  98. Croft was developed by [Ashley Hindle](https://ashleyhindle.com) with support from [Springloaded](https://springloaded.co). If you like it, please star it, share it, and let us know!
  99. **Ashley Hindle**
  100. - https://bsky.app/profile/ashleyhindle.com
  101. - https://twitter.com/ashleyhindle
  102. - https://ashleyhindle.com
  103. **Springloaded**
  104. - https://bsky.app/profile/springloaded.co
  105. - https://twitter.com/ashleyhindle
  106. - https://springloaded.co

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.