simple_mcp_server

cesarlarsson/simple_mcp_server

3.1

If you are the rightful owner of simple_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This is a Model Context Protocol (MCP) server built in TypeScript that provides the current date and time in ISO 8601 format.

Tools
1
Resources
0
Prompts
0

MCP Datetime Server

This is a Model Context Protocol (MCP) server built in TypeScript that exposes a tool to return the current date and time in ISO 8601 format.

Features

  • MCP-compliant server using the official SDK
  • Written in TypeScript with proper type annotations
  • Exposes a single tool: get_current_datetime
  • Returns the current date and time in ISO 8601 format
  • Runs on stdio (for local integration with MCP clients)

Usage

Prerequisites

  • Node.js 18 or higher
  • npm

Install dependencies

cd mcp-datetime-server
npm install

Build the TypeScript project

npm run build

Run the server

npm start

Or for development (builds and runs):

npm run dev

Test with MCP Inspector

To test the server with the MCP Inspector:

npx @modelcontextprotocol/inspector /path/to/mcp-datetime-server/dist/index.js

Or use the VS Code MCP integration to launch via .vscode/mcp.json.

MCP SDK Reference

Configuration

The .vscode/mcp.json file configures this server for MCP clients:

{
  "servers": {
    "datetime-server": {
      "type": "stdio",
      "command": "node",
      "args": ["./mcp-datetime-server/dist/index.js"]
    }
  }
}

Available Tool

get_current_datetime

  • Description: Returns the current date and time in ISO 8601 format
  • Input: No parameters required
  • Output: Current timestamp as ISO 8601 string (e.g., "2024-01-15T10:30:45.123Z")

License

MIT