Skip to content
Back to search

laravel-claude-code-setup

One-command setup for AI-powered Laravel development with Claude Code and MCP servers

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/laraben--laravel-claude-code-setup/badge.svg)](/listings/laraben--laravel-claude-code-setup)

HTML

<a href="/listings/laraben--laravel-claude-code-setup"><img src="/api/listings/laraben--laravel-claude-code-setup/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.

These steps run a script from the network that findsafeskills does not scan.

Option 1: Direct Installation (Recommended)

Run this single command from your Laravel project root:

curl -fsSL https://raw.githubusercontent.com/laraben/laravel-claude-code-setup/main/install.sh | bash

Option 2: With Tokens Pre-configured

If you want to skip the interactive prompts:

export GITHUB_TOKEN="your_github_personal_access_token"
export GITLAB_TOKEN="your_gitlab_personal_access_token"
export FIGMA_ACCESS_TOKEN="your_figma_access_token"
curl -fsSL https://raw.githubusercontent.com/laraben/laravel-claude-code-setup/main/install.sh | bash

Option 3: Download and Run

For more control or if you prefer to review the script first:

# Download the script
curl -fsSL https://raw.githubusercontent.com/laraben/laravel-claude-code-setup/main/install.sh -o setup.sh

# Make it executable
chmod +x setup.sh

# Run it
./setup.sh

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 · 356 lines · 2 findings marked

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

  1. # Laravel Claude Code Setup 🚀
  2. **One-command setup** for Claude Code with Laravel development. Automatically configures all MCP servers for the ultimate AI-powered Laravel development experience with **Figma integration**.
  3. ## 🎯 What This Does
  4. Installs and configures Claude Code with a complete development ecosystem:
  5. ### 🌐 Global MCP Servers (shared across all projects)
  6. - ✅ **GitHub integration** - Access all your repositories, manage PRs (with automatic token configuration!)
  7. - ✅ **GitLab integration** - Access all your repositories, manage MRs, issues, and projects (with automatic token configuration!)
  8. - ✅ **Memory system** - Remember decisions across all projects
  9. - ✅ **Context7** - Latest Laravel/PHP documentation access
  10. - ✅ **Web fetch** - Access external APIs and resources
  11. - ✅ **Figma integration** - Design-to-code workflows with automatic design token extraction
  12. ### 📁 Project-Specific MCP Servers
  13. - ✅ **Filesystem access** - Read/write your specific Laravel project files
  14. - ✅ **Database integration** - Direct access to your project's database
  15. - ✅ **Laravel DebugBar** - Real-time debugging (if installed)
  16. ### 🎨 **NEW: Figma Design Integration**
  17. - **Design-to-code workflows** - Convert Figma designs directly to Laravel/Livewire components
  18. - **Automatic design token extraction** - Colors, typography, and spacing for Tailwind CSS
  19. - **Component specifications** - Get precise implementation details from Figma designs
  20. - **Seamless integration** - Works with your existing Laravel + Livewire + Filament + Tailwind stack
  21. The installer intelligently sets up global servers once and adds project-specific servers for each Laravel project.
  22. ## 🚀 Quick Install
  23. ### Option 1: Direct Installation (Recommended)
  24. Run this single command from your Laravel project root:
  25. ```bash
  26. curl -fsSL https://raw.githubusercontent.com/laraben/laravel-claude-code-setup/main/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 37 on GitHub
  27. ```
  28. ### Option 2: With Tokens Pre-configured
  29. If you want to skip the interactive prompts:
  30. ```bash
  31. export GITHUB_TOKEN="your_github_personal_access_token"
  32. export GITLAB_TOKEN="your_gitlab_personal_access_token"
  33. export FIGMA_ACCESS_TOKEN="your_figma_access_token"
  34. curl -fsSL https://raw.githubusercontent.com/laraben/laravel-claude-code-setup/main/install.sh | bash
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 48 on GitHub
  35. ```
  36. ### Option 3: Download and Run
  37. For more control or if you prefer to review the script first:
  38. ```bash
  39. # Download the script
  40. curl -fsSL https://raw.githubusercontent.com/laraben/laravel-claude-code-setup/main/install.sh -o setup.sh
  41. # Make it executable
  42. chmod +x setup.sh
  43. # Run it
  44. ./setup.sh
  45. ```
  46. ## 📋 Prerequisites
  47. Before running the installer, make sure you have:
  48. 1. **Claude Code** installed ([Download here](https://claude.ai/code))
  49. 2. **Node.js & npm** installed
  50. 3. **Go 1.22+** installed (for database MCP server)
  51. 4. **A Laravel project** with `.env` file configured
  52. 5. **GitHub Personal Access Token** (the installer will guide you)
  53. 6. **GitLab Personal Access Token** (optional, for GitLab integration)
  54. 7. **Figma Personal Access Token** (optional, for design integration)
  55. ## 🔑 Token Setup
  56. ### GitHub Token Setup
  57. You'll need a GitHub Personal Access Token for private repository access:
  58. 1. Go to [GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)](https://github.com/settings/tokens)
  59. 2. Click "Generate new token (classic)"
  60. 3. Select these scopes:
  61. - ✅ `repo` (Full control of private repositories)
  62. - ✅ `read:user` (Read user profile data)
  63. - ✅ `user:email` (Access user email addresses)
  64. 4. Copy the generated token when prompted by the installer
  65. ### GitLab Token Setup (Optional)
  66. For GitLab integration and private repository access:
  67. 1. Go to [GitLab Settings → Access Tokens](https://gitlab.com/-/profile/personal_access_tokens)
  68. 2. Click "Add new token"
  69. 3. Give it a descriptive name (e.g., "Claude Code MCP")
  70. 4. Select these scopes:
  71. - ✅ `api` (Complete API access)
  72. - ✅ `read_user` (Read user profile data)
  73. - ✅ `read_repository` (Read repository data)
  74. 5. Set an expiration date (optional)
  75. 6. Click "Create personal access token"
  76. 7. Copy the generated token when prompted by the installer
  77. ### 🎨 Figma Token Setup (Optional)
  78. For design-to-code workflows:
  79. 1. Go to [Figma Settings → Personal access tokens](https://www.figma.com/settings/account)
  80. 2. Click "Create new token"
  81. 3. Give it a descriptive name (e.g., "Claude Code MCP")
  82. 4. Copy the generated token when prompted by the installer
  83. ## 🎮 Usage After Installation
  84. Once installed, just open Claude Code in your Laravel project:
  85. ```bash
  86. cd /path/to/your/laravel/project
  87. claude
  88. ```
  89. Then test everything works:
  90. ### 📊 Database & Project Analysis
  91. - "Show me the database structure"
  92. - "What Laravel version is this project using?"
  93. - "Read my .env file and suggest optimizations"
  94. ### 🐙 GitHub Integration
  95. - "List recent commits from my private GitHub repo"
  96. - "Show me open pull requests"
  97. - "What's the current branch status?"
  98. ### 🦊 GitLab Integration
  99. - "Show me recent commits from my GitLab project"
  100. - "List open merge requests"
  101. - "What issues are assigned to me?"
  102. - "Create a new merge request"
  103. ### 🎨 Figma Design Integration
  104. - "Analyze this Figma design: https://www.figma.com/design/ABC123/MyProject"
  105. - "Convert this Figma button component to a Livewire component"
  106. - "Extract the color palette from this Figma file for Tailwind CSS"
  107. ### 🧠 Memory & Learning
  108. - "Remember that we use Filament for admin panels"
  109. - "What coding standards do we follow in this project?"
  110. - "What decisions have we made about the authentication system?"
  111. ### 🔧 Development Shortcuts
  112. ```bash
  113. # Load helpful aliases
  114. source .claude/shortcuts.sh
  115. # Quick commands
  116. pa migrate # php artisan migrate
  117. make-livewire Button # php artisan make:livewire Button
  118. serve # php artisan serve
  119. ```
  120. ## 🛠️ What Gets Installed
  121. The script intelligently manages global vs project-specific resources:
  122. ### Global MCP Servers (installed once, shared by all projects)
  123. 1. **GitHub MCP Server** - Repository access across all projects
  124. 2. **GitLab MCP Server** - GitLab project access and management
  125. 3. **Memory MCP Server** - Shared knowledge base
  126. 4. **Context7** - Documentation access
  127. 5. **Web Fetch** - External API access
  128. 6. **Figma MCP Server** - Design file access and analysis
  129. ### Project-Specific MCP Servers (per Laravel project)
  130. 1. **Filesystem MCP Server** - Access to your project files
  131. 2. **Database MCP Server** - Connected to your project's database
  132. 3. **Laravel DebugBar MCP** (if available)
  133. ### Project Files (created in `.claude/`)
  134. - **instructions.md** - AI-optimized development instructions with Figma usage guide
  135. - **project_context.md** - Project-specific context and tech stack
  136. - **coding_standards.md** - Laravel/Livewire/Filament best practices
  137. - **memory_prompts.md** - Memory initialization for AI learning
  138. - **shortcuts.sh** - Development aliases and shortcuts
  139. - **README.md** - Setup documentation
  140. ### MCP Server Binaries & Dependencies
  141. - **Context7** - Built from source with npm
  142. - **Database MCP** - Built from Go source
  143. - **Web Fetch** - Built from TypeScript source
  144. - **All other servers** - Installed via npm globally
  145. The installer automatically configures everything based on your Laravel `.env` file.
  146. ## 🎨 Figma Integration Features
  147. ### Design-to-Code Workflow
  148. ```mermaid
  149. graph LR
  150. A[Figma Design] --> B[Share URL with Claude]
  151. B --> C[Analyze Design Structure]
  152. C --> D[Extract Design Tokens]
  153. D --> E[Generate Laravel Components]
  154. E --> F[Apply Tailwind Styling]
  155. F --> G[Add Alpine.js Interactions]
  156. ```
  157. ### Example Figma Commands
  158. ```bash
  159. # Analyze a complete design
  160. > Please analyze this Figma design and create the corresponding Laravel views
  161. # Extract design system
  162. > Extract all colors, typography, and spacing from this Figma file for our Tailwind config
  163. # Create specific components
  164. > Convert this Figma card component to a Livewire component with proper validation
  165. # Generate admin interface
  166. > Create a Filament resource based on this Figma admin panel design
  167. ```
  168. ### Supported Figma Features
  169. - ✅ **Design token extraction** - Colors, typography, spacing
  170. - ✅ **Component analysis** - Buttons, forms, cards, layouts
  171. - ✅ **Layout understanding** - Grid systems, responsive design
  172. - ✅ **Auto-layout interpretation** - Flexbox and grid generation
  173. - ✅ **Style guide creation** - Consistent design system implementation
  174. ## 🔧 Advanced Configuration
  175. ### Multiple Projects
  176. The installer can be run in multiple Laravel projects. Global MCP servers are shared, while project-specific servers are unique to each project.
  177. ### Custom Database Connections
  178. Supports MySQL, PostgreSQL, and SQLite. The installer automatically detects your database configuration from `.env`.
  179. ### Team Collaboration
  180. All team members can use the same setup. Share your `.claude/` folder (except sensitive tokens) for consistent AI assistance across the team.
  181. ## 🐛 Troubleshooting
  182. ### Interactive Mode Not Working?
  183. If you're running via `curl | bash` and the interactive prompts aren't working:
  184. ```bash
  185. # Download and run directly for interactive mode
  186. curl -fsSL https://raw.githubusercontent.com/laraben/laravel-claude-code-setup/main/install.sh -o setup.sh
  187. chmod +x setup.sh
  188. ./setup.sh
  189. ```
  190. ### GitHub Private Repository Access Issues?
  191. The installer should configure this automatically. If you still can't access private repos:
  192. 1. Check if your token is configured:
  193. ```bash
  194. claude mcp list
  195. ```
  196. 2. Manually update the token in your Claude config:
  197. ```bash
  198. # Edit the config file
  199. nano ~/.claude.json
  200. # Add your token to the GitHub MCP server configuration
  201. ```
  202. ### Figma Integration Not Working?
  203. 1. Verify your Figma token is valid
  204. 2. Check that the file you're trying to access is not private (unless you have access)
  205. 3. Use the full Figma URL format: `https://www.figma.com/design/FILE_KEY/File-Name`
  206. ### Database Connection Failed?
  207. Make sure your Laravel `.env` file has valid database credentials before running the installer.
  208. ### Missing Dependencies?
  209. The installer will tell you what's missing, but you can check manually:
  210. ```bash
  211. # Check Claude Code
  212. claude --version
  213. # Check Node.js
  214. node --version
  215. # Check Go
  216. go version
  217. # Check npm
  218. npm --version
  219. ```
  220. ## 🆕 What's in v1.0
  221. ### 🎨 Figma Integration
  222. - **Complete design-to-code workflow** with Framelink Figma MCP Server
  223. - **Automatic design token extraction** for Tailwind CSS
  224. - **Interactive token management** with proper update prompts
  225. - **Laravel-specific design patterns** and component generation
  226. ### 🔧 Enhanced User Experience
  227. - **Improved interactive detection** - Works correctly with `curl | bash`
  228. - **Better token management** - Proper prompts for token updates
  229. - **Graceful error handling** - Continues installation even if some components fail
  230. - **Smart fallbacks** - Multiple installation methods for reliability
  231. ### 🧠 AI-Optimized Instructions
  232. - **Figma usage guide** - Detailed instructions for design integration
  233. - **Error handling documentation** - Clear guidance for common issues
  234. - **Laravel-specific workflows** - Optimized for Laravel + Livewire + Filament + Tailwind
  235. ### 🛠️ Technical Improvements
  236. - **Robust configuration management** - Better handling of existing setups
  237. - **Cross-platform compatibility** - Enhanced support for different environments
  238. - **Performance optimizations** - Faster installation and startup times
  239. ## 🔗 Links & Resources
  240. - **Repository**: [github.com/laraben/laravel-claude-code-setup](https://github.com/laraben/laravel-claude-code-setup)
  241. - **Claude Code**: [claude.ai/code](https://claude.ai/code)
  242. - **Figma MCP Documentation**: [framelink.ai](https://framelink.ai)
  243. - **Laravel Documentation**: [laravel.com/docs](https://laravel.com/docs)
  244. ## 🤝 Contributing
  245. Found a bug or want to add a feature? PRs are welcome!
  246. 1. Fork the repository
  247. 2. Create a feature branch
  248. 3. Make your changes
  249. 4. Add tests if applicable
  250. 5. Submit a pull request
  251. ## 📝 License
  252. MIT License - feel free to use this in your projects!
  253. ## 🙏 Acknowledgments
  254. - **Claude Code team** for the amazing AI development platform
  255. - **Laravel community** for the incredible framework and ecosystem
  256. - **Figma team** for the design tools and API
  257. - **MCP Server developers** for the various integration tools
  258. ---
  259. Made with ❤️ for the Laravel community by [@laraben](https://github.com/laraben)
  260. **Transform your Laravel development with AI-powered assistance! 🚀**

Ratings and comments

Sign in to rate this skill.

Sign in

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