Matches the pattern used by logApiRequest and recordQuotaUsage.
Without this, a missing mcp_tool_calls table causes the entire
API response to fail even when tool execution succeeds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use AgentToolRegistry::execute() directly instead of spawning
php artisan processes. Faster, simpler, and tools are already
registered via McpToolsRegistering lifecycle event.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use request()->getSchemeAndHttpHost()/tools/call instead of
config('app.url')/api/v1/mcp/tools/call — MCP domain is the endpoint.
Co-Authored-By: Virgil <virgil@lethean.io>
Move functional API routes (tools/call, servers.json, etc.) from
Website\Mcp\Routes\web.php to Mcp\Boot via the McpRoutesRegistering
lifecycle event. HTML portal routes stay in web.php with web middleware.
Co-Authored-By: Virgil <virgil@lethean.io>
The mcp.* domain now serves both the human-readable portal AND the
functional API. Agents POST to /tools/call with an API key, browsers
get the HTML docs as a fallback. No separate api.* bridge needed.
- Add POST /tools/call, GET /resources/{uri} routes to mcp domain
- Add JSON server list/detail routes (servers.json, servers/{id}.json)
- Add OpenBrain icon to landing, index, and show views
- Replace all api.* domain references with mcp.* (request()->getSchemeAndHttpHost())
- Rewrite connect.blade.php as HTTP-only documentation
- Update ApiExplorer base URL to use current mcp domain
- Remove stdio/Docker configuration from all views
Co-Authored-By: Virgil <virgil@lethean.io>
Register routes for each domain in config('mcp.domains') array,
allowing the portal to serve from multiple subdomains (e.g.
mcp.host.test and mcp.lthn.test simultaneously).
Co-Authored-By: Virgil <virgil@lethean.io>
Route file referenced Mod\Mcp\ and Website\Mcp\ namespaces which don't
exist — the correct vendor namespaces are Core\Mcp\ and Core\Website\Mcp\.
This was the blocker preventing the MCP portal from loading.
Co-Authored-By: Virgil <virgil@lethean.io>
Aligns composer package name with forge repo path
(forge.lthn.ai/core/php-mcp). Part of host-uk/* → core/* migration.
Co-Authored-By: Virgil <virgil@lethean.io>
Replace github.server_url/GITHUB_REF_NAME with explicit forge URL
and GITEA_REF_NAME/GITEA_OUTPUT.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On tag push (v*), zips the package and publishes to the
forge.lthn.ai Composer package registry.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace setup-php action with pre-built container.
Eliminates ~50s setup overhead per matrix job.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Direct git clone of ../php-framework avoids shell escaping
issues with dynamic PHP-based path extraction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch php -r argument to single quotes so PHP dollar signs
are not interpreted by bash. Pipe output to while-read loop.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The PHP variables inside php -r need \$ escaping, but shell
variables outside need bare $ for command substitution and
variable expansion.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Forgejo act runner caches reusable workflow definitions,
preventing updates from being picked up. Inline the workflow
with dependency checkout step.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Guard every Schema::create() with hasTable() so migrations
coexist safely with the consolidated app-level migration in
host.uk.com. Prevents "table already exists" failures that
would block the entire migration batch.
Co-Authored-By: Virgil <virgil@lethean.io>
Add extensive Pest tests for workspace context security covering:
- WorkspaceContext resolution from headers and authentication
- Automatic workspace scoping for queries
- MissingWorkspaceContextException handling
- Workspace boundary enforcement
- Cross-workspace data isolation and query prevention
- Context injection via middleware
- Edge cases including concurrent contexts and request isolation
Also update Pest.php to include src/Mcp/Tests/Unit directory.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Mod\Mcp -> Core\Mcp
- Core\Mod\Tenant -> Core\Tenant
Part of namespace restructure to align with L1/L2 module conventions.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Relocates the MCP module to a top-level namespace as part of the
monorepo separation, removing the intermediate Mod directory layer.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>