motivate-mcp

motivate-mcp

An MCP server that returns motivational quotes matched to the task you're working on, with tools to list topics and explain matches. It also includes a hook for receiving a quote on every prompt submission.

Category
Visit Server

README

motivate-mcp

An MCP server that returns a motivational quote matched to the task you are actually working on.

Most quote generators pick at random, which is why they stop landing after a day. This one reads a short description of what you are doing, scores it against a keyword map, and returns something relevant. Say you are debugging and you get Kernighan. Say you are stuck and you get Mandela. Say you are avoiding shipping and you get told to ship.

> "When you have eliminated the impossible, whatever remains, however improbable,
>  must be the truth."
>     — Arthur Conan Doyle

72 quotes across 57 topics. No API key, no network calls, no telemetry.

Install

git clone https://github.com/lazyturtle22/motivate-mcp.git
cd motivate-mcp
npm install

Use it as an MCP server

Add it to your MCP client config. For Claude Code, ~/.claude.json:

{
  "mcpServers": {
    "motivate": {
      "command": "node",
      "args": ["/absolute/path/to/motivate-mcp/src/index.js"]
    }
  }
}

Restart the client and three tools appear.

Tools

Tool What it does
motivate Returns a quote matched to a task description. Takes task (string) and optional avoid_repeats (boolean, default true)
list_topics Lists every topic and how many quotes sit under it
explain_match Shows which topics a description matches, without returning a quote. Useful when tuning the keyword map

Repeats are tracked per session, so a long session will not serve you the same line twice until it runs out of relevant ones.

Getting a quote on every message

An MCP tool only fires when the model decides to call it, so it will not reliably hit every message. If you want one every time, use the included hook instead. It runs on every prompt you submit, reads what you typed, and prints a matched quote into the context.

Add to ~/.claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "node /absolute/path/to/motivate-mcp/hook/motivate-hook.js"
          }
        ]
      }
    ]
  }
}

Set MOTIVATE_QUIET=1 to silence it without unwiring it. The hook fails silently by design: a broken quote generator should never be able to break your prompt.

The two can run together. The hook gives you the every-message drip, the MCP tool lets the model ask for one deliberately when it thinks you need it.

How the matching works

src/match.js holds a map of topic to signal words. A task description is scanned for those words, topics are scored (multi-word phrases count double, since they are stronger evidence), and quotes are ranked by how well their topics overlap the top matches.

Signals match at a word start, not anywhere in the string. This matters if you add your own. A plain substring check looks fine until you notice ui fires on "built" and "guide", try fires on "country", and lead fires on "misleading" — so you ask about building something and get a quote about design.

There is deliberately no boundary on the end of a signal, so stems still work: optimis matches "optimising", frustrat matches "frustrated". When adding a short signal (three characters or fewer), check it against a few real sentences first.

The final pick is randomised across everything within 70% of the best score, so the same input does not always produce the same line.

If nothing matches, it falls back to the whole database rather than returning nothing.

Check what a description matches before adding new signal words:

node -e "import('./src/match.js').then(m => console.log(m.scoreTopics('your text here')))"

Adding quotes

Edit src/quotes.js. Each entry is:

{
  text: "The quote itself.",
  by: "Who said it",
  topics: ["debugging", "persistence"],
}

Attribution rules, please keep to them:

  • Where a line is widely repeated but the original wording or source is disputed, by starts with attributed to. Do not strip that prefix to make it look tidier.
  • Proverbs and genuinely anonymous lines are credited as Proverb or Anonymous.

Use topics that already exist where you can, so quotes cluster rather than scatter. Run npm test afterwards, which checks for duplicates, missing authors and orphan topics.

Tests

npm test

Nine tests using the built-in node:test runner. No framework, no build step.

Licence

MIT. See LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured