feat(wip): set up mcp server and tools, but mcp on cursor not working despite working in inspector
This commit is contained in:
@@ -2,15 +2,11 @@
|
||||
|
||||
import TaskMasterMCPServer from "./src/index.js";
|
||||
import dotenv from "dotenv";
|
||||
import { logger } from "../scripts/modules/utils.js";
|
||||
import logger from "./src/logger.js";
|
||||
|
||||
// Load environment variables
|
||||
dotenv.config();
|
||||
|
||||
// Constants
|
||||
const PORT = process.env.MCP_SERVER_PORT || 3000;
|
||||
const HOST = process.env.MCP_SERVER_HOST || "localhost";
|
||||
|
||||
/**
|
||||
* Start the MCP server
|
||||
*/
|
||||
@@ -19,21 +15,17 @@ async function startServer() {
|
||||
|
||||
// Handle graceful shutdown
|
||||
process.on("SIGINT", async () => {
|
||||
logger.info("Received SIGINT, shutting down gracefully...");
|
||||
await server.stop();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
process.on("SIGTERM", async () => {
|
||||
logger.info("Received SIGTERM, shutting down gracefully...");
|
||||
await server.stop();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
try {
|
||||
await server.start({ port: PORT, host: HOST });
|
||||
logger.info(`MCP server running at http://${HOST}:${PORT}`);
|
||||
logger.info("Press Ctrl+C to stop");
|
||||
await server.start();
|
||||
} catch (error) {
|
||||
logger.error(`Failed to start MCP server: ${error.message}`);
|
||||
process.exit(1);
|
||||
|
||||
Reference in New Issue
Block a user