@dennisk2025/daily-random-fact
v1.0.0
Published
Fetches a new and interesting random fact each day from a public fact database (MCP server).
Readme
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-factor
node index.jsThis 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
