npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-asia-time

v1.1.0

Published

MCP server implementation for Asian timezone tools, with focus on Bali/Makassar time

Readme

MCP Asia Time

A Modern Control Protocol (MCP) server implementation focused on providing time-related tools for Asian timezones, with a particular emphasis on Bali/Makassar time. This package provides both a CLI interface and an HTTP server that can be integrated with various MCP clients.

Features

  • Get current time in Asia/Makassar timezone
  • Flexible date/time formatting options
  • Full MCP protocol support
  • Command-line interface for direct usage
  • Extensible tool registration system

Installation

Global Installation (recommended for CLI usage)

npm install -g mcp-asia-time

Local Installation (for programmatic usage)

npm install mcp-asia-time

Usage

CLI Commands

  1. Get current time:
# Basic usage
mcp-asia-time gettime

# Custom format
mcp-asia-time gettime -f "DD MMM YYYY HH:mm:ss"

# Different timezone
mcp-asia-time gettime -z "Asia/Jakarta"
  1. List available tools:
mcp-asia-time list
  1. Start HTTP server:
mcp-asia-time serve

# Custom port
mcp-asia-time serve -p 8080

MCP Protocol Integration

The server implements the Model Context Protocol (MCP), providing standardized endpoints for tool discovery and execution:

1. Health Check (GET /health)

Verify server status:

curl http://localhost:3000/health

Response:

{
    "status": "ok"
}

2. Tool Discovery (GET /tools)

Get metadata for all available tools:

curl http://localhost:3000/tools

Response:

[
    {
        "name": "gettime",
        "description": "Returns the current date and time in the specified timezone (default: Asia/Makassar)",
        "parameters": {
            "format": {
                "type": "string",
                "description": "Format string according to moment.js",
                "default": "YYYY-MM-DD HH:mm:ss"
            },
            "timezone": {
                "type": "string",
                "description": "Timezone string (e.g. Asia/Makassar, Europe/London)",
                "default": "Asia/Makassar"
            }
        }
    }
]

3. Tool Execution (POST /tool/:name)

Execute a specific tool with parameters:

curl -X POST http://localhost:3000/tool/gettime \
  -H "Content-Type: application/json" \
  -d '{
    "format": "DD MMM YYYY HH:mm:ss",
    "timezone": "Asia/Jakarta"
  }'

Response:

{
    "success": true,
    "result": "21 Feb 2024 15:30:45 (Asia/Jakarta)"
}

Error Response:

{
    "success": false,
    "error": "Invalid timezone or format: Unknown timezone"
}

Integration with MCP Clients

To integrate with MCP clients (like Claude for Desktop):

  1. Start the HTTP server:
mcp-asia-time serve
  1. Configure your MCP client with:
    • Base URL: http://localhost:3000
    • The client will automatically discover available tools through the /tools endpoint
    • Tools can be executed via POST requests to /tool/:name

Development

Project Structure

/
├── src/
│   ├── index.js        # Main entry point
│   ├── mcpServer.js    # MCP server implementation
│   └── tools/
│       └── getTime.js  # Time tool implementation
├── test/               # Test files
├── cli.js             # CLI implementation
└── server.js          # HTTP server entry point

Adding New Tools

To add a new tool that's compatible with the MCP protocol:

  1. Create a new tool file in src/tools/:
export function myTool(params = {}) {
    const {
        param1 = 'default1',
        param2 = 'default2'
    } = params;
    
    // Tool implementation
    return result;
}

export default {
    name: 'mytool',
    description: 'Description of what the tool does',
    parameters: {
        param1: {
            type: 'string',
            description: 'Description of param1',
            default: 'default1'
        },
        param2: {
            type: 'string',
            description: 'Description of param2',
            default: 'default2'
        }
    },
    execute: myTool
};
  1. Register the tool in src/index.js:
import myTool from './tools/myTool.js';
server.registerTool(myTool);

Configuration

The following environment variables are supported:

  • PORT - HTTP server port (default: 3000)

License

MIT

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request