Skip to main content
Glama
by terasum
server.ts1.12 kB
import { FastMCP } from "fastmcp"; import { registerTools } from "../core/tools.js"; // import { registerPrompts } from "../core/prompts.js"; // import { registerResources } from "../core/resources.js"; // Create and start the MCP server async function startServer() { try { // Create a new FastMCP server instance const server = new FastMCP({ name: "Color Format Converter MCP Server", instructions: "This is a MCP server that converts colors from one format to another, It supports the following formats: RGB, HEX, HSL OKLCH, LAB and CMYK.", version: "1.0.0" }); // Register all resources, tools, and prompts // registerResources(server); registerTools(server); // registerPrompts(server); // Log server information console.error(`Color Format Converter MCP Server initialized`); console.error("Color Format Converter Server is ready to handle requests"); return server; } catch (error) { console.error("Failed to initialize server:", error); process.exit(1); } } // Export the server creation function export default startServer;

Latest Blog Posts

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/terasum/color-convert-mcp'

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