Skip to main content
Glama

Color Scheme Generator MCP Server

index.ts1.35 kB
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { registerPrompts } from "./prompts/index.js"; import { registerTools } from "./tools/index.js"; // Initialize the MCP Server instance export const server = new McpServer({ name: "color-scheme-generator", // Unique name for this server version: "0.0.1", // Server version // Declare the types of capabilities the server will offer capabilities: { prompts: {}, // Will be populated by registerPrompts tools: {}, // Will be populated by registerTools }, }); // Load and register all defined prompts and tools registerPrompts(); registerTools(); // Main entry point for the server application async function main(): Promise<void> { // Use StdioServerTransport to communicate over standard input/output // This is common for MCP servers launched as child processes by clients. const transport = new StdioServerTransport(); // Connect the server logic to the transport layer await server.connect(transport); console.log("Server started and connected successfully==============="); } // Start the server and handle potential errors main().catch((error: Error) => { console.error("Server startup failed:", error); // Log errors to stderr process.exit(1); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/deepakkumardewani/color-scheme-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server