You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Add comprehensive authentication documentation with critical security emphasis (#60)
- Added detailed authentication section after Basic Usage
- Included quick start guide for Sanctum and custom API key auth
- Provided advanced security configurations (IP whitelisting, RBAC, audit logging)
- Added environment-specific configuration examples
- Included testing instructions and security best practices
- Emphasized authentication as ESSENTIAL for production with clear warnings
- Added common authentication patterns for different use cases
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Sangrak Choi <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+300Lines changed: 300 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -279,6 +279,306 @@ The MCP protocol also defines a "Streamable HTTP SSE" mode, but this package doe
279
279
280
280
## Basic Usage
281
281
282
+
### 🔐 Authentication (CRITICAL FOR PRODUCTION)
283
+
284
+
> **⚠️ SECURITY WARNING:** Authentication is **ESSENTIAL** for production deployments. Without proper authentication, your MCP server endpoints are publicly accessible, potentially exposing sensitive data and operations.
285
+
286
+
The Laravel MCP Server uses Laravel's middleware system for authentication, providing flexibility to implement various authentication strategies. **By default, NO authentication is enabled** - you MUST configure it for production use.
287
+
288
+
#### Quick Start: Securing Your MCP Server
289
+
290
+
##### 1. Enable Authentication in Configuration
291
+
292
+
Edit your `config/mcp-server.php` file to add authentication middleware:
293
+
294
+
```php
295
+
// config/mcp-server.php
296
+
297
+
'middlewares' => [
298
+
// PRODUCTION CONFIGURATION (Choose one or combine):
299
+
'auth:sanctum', // For Laravel Sanctum (recommended)
300
+
// 'auth:api', // For Laravel Passport
301
+
// 'custom.mcp.auth', // For custom authentication
302
+
'throttle:100,1', // Rate limiting (100 requests per minute)
0 commit comments