3.1 KiB
3.1 KiB
Core-MCP - January 2026
Features Implemented
Workspace Context Security
Prevents cross-tenant data leakage by requiring authenticated workspace context.
Files:
Exceptions/MissingWorkspaceContextException.phpContext/WorkspaceContext.php- Value objectTools/Concerns/RequiresWorkspaceContext.php- Tool traitMiddleware/ValidateWorkspaceContext.php
Security Guarantees:
- Workspace context MUST come from authentication
- Cross-tenant access prevented by design
- Tools throw exceptions when called without context
Query Security
Defence in depth for SQL injection prevention.
Files:
Exceptions/ForbiddenQueryException.phpServices/SqlQueryValidator.php- Multi-layer validation
Features:
- Blocked keywords: INSERT, UPDATE, DELETE, DROP, UNION
- Pattern detection: stacked queries, hex encoding, SLEEP/BENCHMARK
- Comment stripping to prevent obfuscation
- Query whitelist matching
- Read-only database connection support
Config: mcp.database.connection, mcp.database.use_whitelist, mcp.database.blocked_tables
MCP Playground UI
Interactive interface for testing MCP tools.
Files:
Services/ToolRegistry.php- Tool discovery and schemasView/Modal/Admin/McpPlayground.php- Livewire componentView/Blade/admin/mcp-playground.blade.php
Features:
- Tool browser with search and category filtering
- Dynamic form builder from JSON schemas
- JSON response viewer with syntax highlighting
- Conversation history (last 50 executions)
- Example input pre-fill
- API key validation
Route: GET /admin/mcp/playground
Tool Usage Analytics
Usage tracking and dashboard for MCP tools.
Files:
Migrations/2026_01_26_*- mcp_tool_metrics, mcp_tool_combinationsModels/ToolMetric.phpDTO/ToolStats.phpServices/ToolAnalyticsService.phpEvents/ToolExecuted.phpListeners/RecordToolExecution.phpView/Modal/Admin/ToolAnalyticsDashboard.phpView/Modal/Admin/ToolAnalyticsDetail.phpConsole/Commands/PruneMetricsCommand.php
Features:
- Per-tool call counts with daily granularity
- Average, min, max response times
- Error rates with threshold highlighting
- Tool combination tracking
- Admin dashboard with sortable tables
- Date range filtering
Routes:
GET /admin/mcp/analytics- DashboardGET /admin/mcp/analytics/tool/{name}- Tool detail
Config: mcp.analytics.enabled, mcp.analytics.retention_days
EXPLAIN Query Analysis
Query optimization insights with automated performance analysis.
Files:
Tools/QueryDatabase.php- Addedexplainparameter- Enhanced with human-readable performance interpretation
Features:
- Optional EXPLAIN execution before query runs
- Detects full table scans
- Identifies missing indexes
- Warns about filesort and temporary tables
- Shows row count estimates
- Includes MySQL warnings when available
Usage:
{
"query": "SELECT * FROM users WHERE email = 'test@example.com'",
"explain": true
}
Response includes:
- Raw EXPLAIN output
- Performance warnings (full scans, high row counts)
- Index usage analysis
- Optimization recommendations