mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-11-01 18:19:43 +00:00
Add MCP server and enhance AI content tools
Implement self-hosted MCP server for admin actions, update AI generation tools in admin dashboard, and refine mobile app stores and components.
This commit is contained in:
1 parent
b0f1700e40
commit
4e40b92b16
71 files changed
+10511
-1008
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { serve } from '@hono/node-server';
|
||||
import { Hono } from 'hono';
|
||||
import { logger } from 'hono/logger';
|
||||
import { authMiddleware } from './lib/auth.js';
|
||||
import { createMcpServer } from './server.js';
|
||||
|
||||
const app = new Hono();
|
||||
|
||||
app.use('*', logger());
|
||||
app.use('/mcp', authMiddleware);
|
||||
|
||||
app.get('/health', (c) => c.json({ status: 'ok', service: 'sauci-mcp' }));
|
||||
|
||||
// Initialize MCP server
|
||||
const mcpServer = createMcpServer();
|
||||
|
||||
// Mount MCP server
|
||||
app.all('/mcp', async (c) => {
|
||||
return mcpServer.handleRequest(c);
|
||||
});
|
||||
|
||||
const port = Number(process.env.PORT) || 3000;
|
||||
console.log(`Server is running on port ${port}`);
|
||||
|
||||
serve({
|
||||
fetch: app.fetch,
|
||||
port
|
||||
});
|
||||
Reference in new issue
Block a user