Add hosted MCP endpoint at POST /mcp for remote agents.

Bearer-auth JSON-RPC exposes engines, generate, and job tools without duplicating the aigen API path.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-11-02 21:41:31 -06:00
co-authored by Cursor
parent 08caeb51de
commit 96776ed493
9 changed files with 430 additions and 169 deletions
+1
View File
@@ -38,6 +38,7 @@ export function aigenBearerAuthorized(event: H3Event) {
}
export function aigenApiPathAllowed(path: string, method: string) {
if (path === '/mcp') return true
if (path === '/api/aigen' || path.startsWith('/api/aigen/')) return true
if (method === 'GET' && (path === '/api/library/stills' || path.startsWith('/api/library/stills/'))) return true
return false