Laravel AI MCP Server
# Laravel AI - MCP Server
MCP (Model Context Protocol) server for providing Laravel AI documentation to Claude Code and other AI assistants.
## š Quick Start
### 1. Install Dependencies
```bash
# Clone or navigate to the project directory
cd laravel-ai
npm install
```
### 2. Start MCP Server
```bash
npm start
```
Documentation is expected to be in: `./docs` (relative to project root)
## āļø Claude Code Configuration
Add to your Claude Code settings (`~/.config/claude-code/config.json`):
```json
{
"mcpServers": {
"laravel-ai": {
"command": "node",
"args": ["path/to/laravel-ai/index.js"]
}
}
}
```
### Alternative: With Custom Docs Path
If your documentation is in a different location:
```json
{
"mcpServers": {
"laravel-ai": {
"command": "node",
"args": ["path/to/laravel-ai/index.js"],
"env": {
"DOCS_PATH": "/path/to/your/docs"
}
}
}
}
```
## š ļø Available Tools
| Tool | Description |
|------|-------------|
| `get_doc_structure` | Get all documentation files structure |
| `read_doc` | Read a specific documentation file |
| `search_docs` | Search across all documentation |
| `get_quick_reference` | Get all coding rules (quick-reference.md) |
| `get_templates` | Get CRUD templates (specific or all) |
| `get_checklist` | Get validation checklist (specific layer or all) |
| `get_domain_examples` | Get domain-specific examples |
| `get_design_system` | Get design system documentation |
## š Documentation Structure
```
laravel-ai/
āāā docs/ # Documentation folder
ā āāā ai/
ā ā āāā quick-reference.md # All coding rules
ā ā āāā templates.md # Implementation templates
ā ā āāā checklist.md # Validation checklist
ā āāā domains/
ā ā āāā ecommerce/ # E-commerce examples
ā ā āāā hr/ # HR examples
ā ā āāā tourism/ # Tourism examples
ā āāā patterns/ # Pattern documentation
ā āāā design-system.md # Design system (configurable)
āāā index.js # MCP server
āāā package.json # Dependencies
āāā README.md # This file
```
## š” Usage Examples
### For AI Assistant
When user says "pelajari docs", AI should:
```javascript
// 1. Get quick reference
mcp.call_tool('get_quick_reference')
// 2. Get templates
mcp.call_tool('get_templates', { template_type: 'all' })
// 3. Get checklist
mcp.call_tool('get_checklist', { layer: 'all' })
// 4. Confirm ready
```
### Search Documentation
```javascript
// Search for "transaction"
mcp.call_tool('search_docs', { query: 'transaction' })
```
### Get Domain Examples
```javascript
// Get e-commerce examples
mcp.call_tool('get_domain_examples', { domain: 'ecommerce' })
// Get all domains overview
mcp.call_tool('get_domain_examples', { domain: 'all' })
```
## š§ Development
### Watch Mode
```bash
npm run dev
```
### Testing
Test the MCP server manually:
```bash
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node index.js
```
## š Notes
- This server uses **stdio** transport for communication
- All documentation is read from the file system
- No caching - always reads latest documentation
- Supports incremental updates to documentation
## š Updates
When documentation is updated, just restart the MCP server:
```bash
# Stop current server (Ctrl+C)
npm start
```
---
**Version:** 1.0.0
**Last Updated:** 2026-02-23TDQS
Scored across 8 tools
Every tool has a clearly distinct purpose with no ambiguity. The tools target different aspects of documentation retrieval: checklists, design systems, structures, examples, references, templates, specific files, and search. There is no overlap in functionality.
All tools follow a consistent verb_noun pattern using snake_case. Each name starts with 'get_' or a similar verb ('read_', 'search_') followed by a descriptive noun, making the set predictable and readable.
With 8 tools, the server is well-scoped for its purpose of providing Laravel documentation and resources. Each tool earns its place by covering a specific aspect of documentation retrieval, avoiding bloat or thinness.
The tool surface is complete for the domain of documentation access, covering all key operations: retrieving specific files, searching, getting structured overviews, examples, templates, and references. There are no obvious gaps that would hinder an agent's workflow.