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

current-lucky-words

v1.1.0

Published

A sample MCP server that provides lucky words, lucky numbers (0-100), and current time with encouraging messages

Readme

Current Lucky Words MCP Server

A simple Model Context Protocol (MCP) server that provides current time functionality with encouraging lucky words. This server demonstrates how to create a basic MCP server using Node.js.

Features

  • get_current_lucky_time: Returns the current date and time in various formats
    • Supports ISO, locale, and Unix timestamp formats
    • Optional timezone specification
    • Includes random lucky words for positive vibes! 🍀
  • get_lucky_timestamp: Returns the current Unix timestamp in milliseconds
    • Also includes encouraging lucky words

Lucky Words Feature ✨

Every time response includes a random positive word or phrase such as:

  • "Good luck", "Happy", "Wonderful", "Amazing", "Fantastic"
  • "Brilliant", "Excellent", "Marvelous", "Spectacular"
  • "Joyful", "Blessed", "Fortunate", "Prosperous"
  • And many more uplifting words!

Sample Responses

"Joyful! Current time: 2025-10-06T22:07:12.063Z"
"Marvelous! Current Unix timestamp: 1759788432461"
"Hopeful! Current time: 10/6/2025, 3:07:12 PM (America/New_York)"
"Wonderful! Current time: 2025-10-06T22:07:12.063Z (UTC)"

Prerequisites

  • Node.js 18.0.0 or higher
  • npm or yarn package manager

Installation

  1. Navigate to the sample_server directory:

    cd sample_server
  2. Install dependencies:

    npm install

Usage

Running the Server

Start the server:

npm start

For development with auto-restart:

npm run dev

Available Tools

get_current_lucky_time

Returns the current date and time with optional formatting and timezone, plus lucky words.

Parameters:

  • format (optional): Time format - "iso" (default), "locale", or "unix"
  • timezone (optional): Timezone string (e.g., "UTC", "America/New_York")

Examples:

  • Get current time in ISO format: {"format": "iso"}
  • Get current time in New York timezone: {"format": "locale", "timezone": "America/New_York"}
  • Get Unix timestamp: {"format": "unix"}

get_lucky_timestamp

Returns the current Unix timestamp in milliseconds with lucky words.

Parameters: None

MCP Client Integration

To use this server with an MCP client, you'll need to configure the client to connect to this server via stdio transport. The server communicates through standard input/output.

Example configuration for MCP clients:

{
  "mcpServers": {
    "current-lucky-words": {
      "command": "node",
      "args": ["path/to/sample_server/server.js"]
    }
  }
}

Development

The server is built using the official MCP SDK for JavaScript/TypeScript. Key components:

  • Server Setup: Uses @modelcontextprotocol/sdk/server
  • Transport: Uses stdio transport for communication
  • Tool Handlers: Implements ListToolsRequestSchema and CallToolRequestSchema

Error Handling

The server includes comprehensive error handling for:

  • Invalid tool names
  • Invalid time formats
  • Timezone parsing errors
  • General runtime errors

All errors are returned as structured responses with error flags.

Distribution

This server is ready for distribution through multiple channels:

1. NPM Package Distribution

The server is configured for npm publication with:

  • CLI executable via sample-mcp-time-server command
  • Proper package metadata and dependencies
  • MCP registry integration via mcpName field

To publish to npm:

npm publish

Users can then install and run it:

npx current-lucky-words

2. MCP Registry Integration

The server includes a server.json file for integration with the official MCP Registry:

  • Standardized metadata format
  • Tool capability descriptions
  • Package reference for automated installation

To publish to the MCP Registry:

  1. Install the MCP publisher CLI: brew install mcp-publisher
  2. Authenticate: mcp-publisher login github
  3. Publish: mcp-publisher publish

3. Direct Distribution

Users can also clone and run the server directly:

git clone <repository-url>
cd sample_server
npm install
npm start

4. Docker Distribution (Future)

The server can be containerized for Docker distribution:

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY server.js ./
EXPOSE 3000
CMD ["npm", "start"]

MCP Client Configuration

To use this server with MCP clients, add it to your client configuration:

{
  "mcpServers": {
    "current-lucky-words": {
      "command": "npx",
      "args": ["current-lucky-words"]
    }
  }
}

Or if installed locally:

{
  "mcpServers": {
    "current-lucky-words": {
      "command": "node",
      "args": ["path/to/sample_server/server.js"]
    }
  }
}

License

MIT License