🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

murphys-laws-mcp

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

murphys-laws-mcp

MCP server for Murphy's Laws - exposes 1500+ laws to AI agents via Model Context Protocol

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

murphys-laws-mcp

npm version npm downloads CI coverage license

A Model Context Protocol (MCP) server that gives AI agents access to 1,500+ Murphy's Laws, corollaries, and humorous observations about life's tendency for things to go wrong.

Works with Claude Desktop, Cursor, VS Code Copilot, and any MCP-compatible host.

Quick Start

Add to your MCP client config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "murphys-laws": {
      "command": "npx",
      "args": ["-y", "murphys-laws-mcp"]
    }
  }
}

That's it. No API key, no database, no setup.

Tools

ToolDescription
search_lawsSearch laws by keyword with optional category filter
get_random_lawGet a random Murphy's Law
get_law_of_the_dayGet today's featured law (rotates daily)
get_lawGet a specific law by ID
list_categoriesList all 55 categories with slugs and law counts
get_laws_by_categoryBrowse laws in a specific category
submit_lawSubmit a new law for review

Example Usage

Once connected, you can ask your AI assistant things like:

  • "What's today's Murphy's Law?"
  • "Find Murphy's Laws about computers"
  • "Give me a random Murphy's Law"
  • "Browse the military laws category"
  • "Submit a new Murphy's Law: 'The printer will always jam when you're in a hurry'"

Configuration

Environment Variables

VariableDefaultDescription
MURPHYS_API_URLhttps://murphys-laws.comBase URL for the Murphy's Laws API

Local Development

If running from the monorepo source:

cd mcp
npm install
npm start          # Run the server
npm run dev        # Run with watch mode
npm run inspect    # Open MCP Inspector

API

This MCP server uses the public Murphy's Laws REST API. No authentication required for reads. Rate limits apply only to writes (3 law submissions/minute).

License

CC0 1.0 Universal (Public Domain)

Keywords

murphys-law

FAQs

Package last updated on 21 Apr 2026

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