Initial commit

This commit is contained in:
Jordan
2026-04-01 23:16:45 +01:00
commit 91cfdaee72
200 changed files with 25589 additions and 0 deletions

44
mcp-server/index.new.js Normal file
View File

@@ -0,0 +1,44 @@
/**
* Acai Code MCP Server - Entry Point
*
* This is the main entry point for the MCP server.
* All functionality is modularized in separate files for better maintainability.
*/
// Load configuration first
import { loadLocalConfigProfile, applyProfileToEnv } from "./config/index.js";
// Load and apply config profile (backward compatibility)
const selectedProfile = loadLocalConfigProfile();
applyProfileToEnv(selectedProfile);
console.error("[MCP] Server starting in SSE mode. Credentials will be provided per-session via HTTP headers.");
// Import core modules
import { createMcpServer, createRequestMonitor, toolHandlers } from "./server.js";
import { startHttpServer } from "./httpServer.js";
import { startMonitorServer } from "./monitor.js";
// Import registration functions
import { registerPrompts } from "./prompts/index.js";
import { registerTools } from "./tools/index.js";
// Create and configure MCP server
const server = createMcpServer();
// Create request monitor
const requestMonitor = createRequestMonitor(server);
// Register all prompts
registerPrompts(server);
// Register all tools
registerTools(server);
// Start HTTP server for SSE transport
startHttpServer(server);
// Start monitor server (if not disabled)
startMonitorServer(requestMonitor, toolHandlers);