Skip to content
MCP server
Registry

murphys-laws MCP Server

Access thousands of Murphy's Laws: search, browse by category, random, daily, submit.

murphys-laws scores 60 (Good), licensed Creative Commons Zero v1.0 Universal and written in TypeScript. It installs as a local process. It does not declare tools yet. Filed under Search. GitHub shows 1 stars. Package registries report about 108 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.

by ravidorrCreative Commons Zero v1.0 UniversalTypeScript1 stars
Trust score
60Good
Trust score 60 of 100, Good

Good trust

60 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • License present: creative-commons-zero-v1.0-universal.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 60 comes from

22 + 20 + 1 + 6 + 4 + 7 = 60. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity1 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 1 of 20 points.
License6 / 10

A clear, OSI-style open-source license.

License: 6 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs7 / 10

A real summary, a README with depth, listed tools.

Docs: 7 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "ravidorr-murphys-laws": {      "command": "npx",      "args": [        "-y",        "murphys-laws-mcp@1.3.0"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.

About

Murphy's Laws

Web CI Dependency Audit

PRs Welcome Maintenance License: CC0-1.0 Node.js iOS Android

A comprehensive collection of Murphy's Laws - humorous observations about life's tendency for things to go wrong.

Available on the Web, with iOS and Android releases forthcoming.

Platforms

AI & Developer Integration

Four official ways to integrate Murphy's Laws. No API key for reads.

PackagenpmPurpose
murphys-laws-sdknpmTyped TypeScript client, zero deps
murphys-laws-clinpmCommand-line interface (npx murphys-laws-cli)
murphys-laws-mcpnpmModel Context Protocol server for AI agents
REST API-Public HTTP API at https://murphys-laws.com/api/v1/

Full details and examples on the developer landing page.

REST API

Public API at https://murphys-laws.com/api/v1/, no auth required for reads.

TypeScript SDK

murphys-laws-sdk on npm is a tiny typed client over the REST API with zero runtime dependencies.

import { MurphysLawsClient } from 'murphys-laws-sdk';
const law = await new MurphysLawsClient().getRandomLaw();

Command-line interface

murphys-laws-cli on npm wraps the API for scripts and terminal use.

npx murphys-laws-cli random
npx murphys-laws-cli search "computer" --limit 3

MCP Server (Model Context Protocol)

An MCP server lets AI agents (Claude Desktop, Cursor, VS Code Copilot) query Murphy's Laws directly.

Quick start, no clone needed:

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

7 tools: search_laws, get_random_law, get_law_of_the_day, get_law, list_categories, get_laws_by_category, submit_law.

See mcp/README.md or npm, or the developer landing page for the full picture.

Repository Structure

This is a monorepo containing:

murphys-laws/
├── backend/        # Node.js API server (TypeScript runtime via tsx)
├── web/            # Web application (TypeScript + Vite)
├── mcp/            # MCP server for AI agent integration (npm: murphys-laws-mcp)
├── sdk/            # TypeScript SDK over the public REST API (npm: murphys-laws-sdk)
├── cli/            # Command-line interface (npm: murphys-laws-cli)
├── ios/            # iOS app (Swift + SwiftUI)
├── android/        # Android app (Kotlin + Jetpack Compose)
└── shared/         # Shared resources and documentation

Quick Start

Backend (API Server)

cd backend
npm install
npm run build:db # Build SQLite database
npm run dev # Start API server
npm start # Run API from src/server/api-server.ts via tsx

Web Application

cd web
npm install
npm run dev # Start dev server

iOS App

cd ios
open MurphysLaws.xcodeproj
# Press ⌘R to run

Android App

cd android
./gradlew assembleDebug
# Or open in Android Studio

Documentation

Testing

# Run all tests (backend, web, SDK, CLI, and MCP)
npm test

# Test a subset only
npm run test:backend   # Backend Vitest suite
npm run test:web       # Web Vitest suite only (no E2E)
npm run test:web:e2e   # Web E2E (Playwright) only

Development

Prerequisites

  • Node.js 22+
  • For iOS: macOS, Xcode 15+
  • For Android: Android Studio Hedgehog+, JDK 17+

Install Dependencies

# Install all dependencies (root and workspaces)
npm run install:all

# Or install individually
cd backend && npm install
cd web && npm install

Run Development Servers

# Run backend + web concurrently
npm run dev

# Or run individually
npm run dev:backend
npm run dev:web

Note: The predev script automatically cleans up any orphaned processes using ports 8787 and 5175 before starting.

Troubleshooting Port Issues

If you encounter EADDRINUSE errors (port already in use):

# Check which processes are using development ports
npm run cleanup-ports

# Automatically kill processes using development ports
npm run cleanup-ports -- --kill

# Or manually check and kill
lsof -i :8787  # Check API port
lsof -i :5175  # Check frontend port
kill <PID>     # Kill the process

Building

# Generate OpenAPI and build the web app
npm run build

# Build specific platform
npm run build:web
npm run build:backend:db

npm run build:web prerenders the static pages from a local API. By default that API serves a database it builds from the archive, which is what pull-request CI uses. When MURPHYS_DB_PATH names a SQLite file, the build instead applies the pending migrations to that file and serves it, and backend/scripts/migrate.ts and npm --prefix backend start read the same variable (unset or blank, they keep using backend/murphys.db). The production deploy uses that: the step before the build streams backend/scripts/sanitize-db-copy.sh to the server over SSH, which takes a backup of the live database, removes the private data from the copy and sends it back; the build then migrates and prerenders from the copy, which is deleted at the end of the job and never committed or uploaded. Every law page and sitemap entry therefore matches what the API serves, and a data fix in a migration shows up in the same deploy. The deploy stops before anything is uploaded when the copy cannot be fetched or fails a check. To rehearse the sanitizer locally, run bash backend/scripts/sanitize-db-copy.sh export <database> > copy.db (it only reads <database>), then MURPHYS_DB_PATH=$PWD/copy.db npm run build:web; verify and sanitize modes check or clean a file in place.

TypeScript Runtime Architecture

  • Backend runs TypeScript source directly with tsx (no JS build step required for startup).
  • Canonical backend runtime entrypoint: backend/src/server/api-server.ts.
  • PM2 runtime uses Node loader: node --import tsx.
  • Shared runtime templates are TypeScript in shared/modules/*.ts.

Deployment

See Deployment Guide for detailed instructions.

# Deploy web app (builds and syncs to production)
npm run deploy

Keyboard Shortcuts (Web)

Press ? anywhere on the site to see all available shortcuts:

ShortcutAction
/Focus search
↑ / ↓Navigate search suggestions (when autocomplete is open)
EnterSelect search suggestion (when autocomplete is open)
EscapeClose search suggestions / modal / popover
jNext law card
kPrevious law card
?Show shortcuts help
Enter / SpaceActivate focused card

Search Autocomplete: When typing in the search field, suggestions appear automatically. Use arrow keys to navigate, Enter to select, or Escape to close.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Policies and Support

  • Security: Private vulnerability reporting and supported versions.
  • Privacy: Data-handling policy.
  • Support: Help and troubleshooting.
  • Agent Guide: Canonical instructions for AI coding agents.
  • Design System: Token and component-contract guidance.

License

This project is licensed under CC0 1.0 Universal (Public Domain).

Acknowledgments

Thanks to all contributors who have submitted Murphy's Laws over the years!


Made with love for anyone who's ever experienced Murphy's Law in action

Frequently asked questions

What is murphys-laws MCP Server?

Access thousands of Murphy's Laws: search, browse by category, random, daily, submit.

How do I install murphys-laws MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. murphys-laws MCP Server runs locally from the npm package murphys-laws-mcp with the command npx -y murphys-laws-mcp@1.3.0.

Is murphys-laws MCP Server free and open source?

murphys-laws MCP Server is released under the Creative Commons Zero v1.0 Universal license, which is not on MCPpedia's list of OSI-approved open-source licenses. Read the license terms before using it, especially commercially.

Does murphys-laws MCP Server support remote (HTTP) connections?

No remote endpoint is listed for murphys-laws MCP Server. It runs locally on your machine over stdio, started by your MCP client.

How is murphys-laws MCP Server's trust score calculated?

murphys-laws MCP Server scores 60 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server