Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@dennisk2025/daily-random-fact

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dennisk2025/daily-random-fact

Fetches a new and interesting random fact each day from a public fact database (MCP server).

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Daily Random Fact MCP Server

Overview

This MCP (Model Context Protocol) server provides a daily random fact fetched from the public Useless Facts API. It's designed to be integrated into any model context that supports MCP tool invocation.

Features

  • Retrieves a new and interesting random fact each day.
  • Simple, robust stdio-based MCP server.
  • Can be used as an API tool for chat models and automation.

Installation

  • Install Node.js (v16 or newer required).

  • Clone or download this repository, or install via npm:

    npm install -g daily-random-fact

  • Install dependencies:

    npm install

Usage

Run the server using the CLI or via Node:

daily-random-fact

or

node index.js

This will start the MCP server, listening on stdio for protocol requests.

Example Tool Call

Tool Name: get_daily_fact

Description: Retrieves a random fact of the day in English from a public API.

Input Schema:

{}

Sample MCP Call (as JSON):

{
  "tool": "get_daily_fact",
  "input": {}
}

Sample Output:

{
  "fact": "The dot over the letter 'i' is called a tittle.",
  "source": "unknown",
  "permalink": "https://uselessfacts.jsph.pl/1573701123446.html"
}

Configuration

No configuration required. The server fetches facts from the live API. To change the data source, edit the apiUrl in index.js.

Troubleshooting

  • Ensure you have internet connectivity — the server must access the API at https://uselessfacts.jsph.pl/.
  • For verbose logs, check console output.

License

MIT License

FAQs

Package last updated on 25 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts