Skip to main content
Glama

Clockify MCP

by inakianduaga
index.ts1.83 kB
#!/usr/bin/env node /** * This is a template MCP server that implements a simple notes system. * It demonstrates core MCP concepts like resources and tools by allowing: * - Listing notes as resources * - Reading individual notes * - Creating new notes via a tool * - Summarizing all notes via a prompt */ import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js"; import process from "node:process"; import { listToolsHandler, callToolHandler } from "./handlers.js"; /** * Create an MCP server with capabilities for resources (to list/read notes), * tools (to create new notes), and prompts (to summarize notes). */ const server = new Server( { name: "clockify-mcp", version: "0.1.0", }, { capabilities: { resources: {}, tools: {}, prompts: {}, }, }, ); /** * Handler that lists available tools. * Exposes a single "create_note" tool that lets clients create new notes. */ server.setRequestHandler(ListToolsRequestSchema, listToolsHandler); /** * Handler for the create_note tool. * Creates a new note with the provided title and content, and returns success message. */ server.setRequestHandler(CallToolRequestSchema, callToolHandler); /** * Start the server using stdio transport. * This allows the server to communicate via standard input/output streams. */ async function main() { console.error("[Setup] Initializing Clockify MCP server..."); const transport = new StdioServerTransport(); await server.connect(transport); } main().catch((err) => { console.error("[Error] MCP server failed to start:", err); process.exit(1); }); export { server };

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/inakianduaga/clockify-mcp'

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