feat(mcp): mount /mcp Streamable HTTP endpoint
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,8 @@ import { router as ingestRouter } from './lib/api/routes/ingest.js';
|
||||
import { router as iconsRouter } from './lib/api/routes/icons.js';
|
||||
import { startCron } from './lib/cron/index.js';
|
||||
import { seedFromConfig } from './lib/health/registry.js';
|
||||
import { mcpAuth } from './lib/api/middleware/mcp_auth.js';
|
||||
import { handleMcp } from './lib/mcp/http.js';
|
||||
|
||||
const VERSION = '2.0.0-alpha.13';
|
||||
|
||||
@@ -41,6 +43,9 @@ export function createApp() {
|
||||
|
||||
mountApi(app);
|
||||
|
||||
// MCP Streamable HTTP for external agents (read + suggest-only, space-scoped).
|
||||
app.all('/mcp', mcpAuth, handleMcp);
|
||||
|
||||
app.use((_req, res) => res.status(404).json({ error: { code: 'not_found' } }));
|
||||
|
||||
app.use((err, _req, res, _next) => {
|
||||
|
||||
Reference in New Issue
Block a user