@@ -231,22 +231,36 @@ The MCP protocol also defines a "Streamable HTTP SSE" mode, but this package doe
231231
232232### Domain Restriction
233233
234- You can restrict the MCP server routes to specific domains by configuring the ` domain ` option in your ` config/mcp-server.php ` file :
234+ You can restrict MCP server routes to a specific domain for better security and organization :
235235
236236``` php
237237// config/mcp-server.php
238238
239- // Allow MCP routes on all domains (default)
239+ // Allow access from all domains (default)
240240'domain' => null,
241241
242- // Restrict to a specific domain
242+ // Restrict to a specific domain only
243243'domain' => 'api.example.com',
244+ ```
245+
246+ ** When to use domain restriction:**
247+ - Running multiple applications on different subdomains
248+ - Separating API endpoints from your main application
249+ - Implementing multi-tenant architectures where each tenant has its own subdomain
250+
251+ ** Example scenarios:**
252+ ``` php
253+ // API subdomain only
254+ 'domain' => 'api.myapp.com',
255+
256+ // Admin panel subdomain
257+ 'domain' => 'admin.myapp.com',
244258
245- // Restrict to multiple domains (using array)
246- 'domain' => ['api.example .com', 'admin.example.com'] ,
259+ // Tenant-specific subdomain
260+ 'domain' => 'tenant1.myapp .com',
247261```
248262
249- This feature allows you to control which domains can access your MCP server, providing an additional layer of security and flexibility in multi-domain applications .
263+ > ** Note: ** This feature uses Laravel's route ` domain() ` method. For multiple domain support, consider implementing custom middleware instead .
250264
251265### Creating and Adding Custom Tools
252266
0 commit comments