Skip to main content
Glama

Local Utilities MCP Server

by arjshiv
test-time.js820 B
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { getCurrentTimeAndDate } from "./utils/time.js"; async function main() { // Create a server instance const server = new McpServer({ name: "Test Server", version: "1.0.0" }); // Add the time tool const toolFn = server.tool("get_time_and_date", {}, async () => { const result = getCurrentTimeAndDate(); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; }); // Call the tool handler directly const result = getCurrentTimeAndDate(); console.log('Current Time and Date:'); console.log(JSON.stringify(result, null, 2)); process.exit(0); } main().catch(console.error);

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/arjshiv/localutils-mcp-server'

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