Murder Mystery MCP Server

Murder Mystery MCP Server

A procedurally-generated murder mystery game engine that enables AI agents to generate mysteries, interrogate AI suspects with memory and emotions, search for clues, and solve crimes through MCP tools. Features RAG-powered investigation tools for searching conversations, detecting contradictions, and cross-referencing testimony.

Category
Visit Server

README


title: Murder Mystery MCP Server emoji: šŸ•µļø colorFrom: indigo colorTo: red sdk: gradio sdk_version: "5.29.1" app_file: demo.py pinned: false tags:

  • building-mcp-track-creative
  • mcp
  • mcp-server
  • game-engine
  • murder-mystery
  • agents
  • tools
  • resources

šŸ•µļø Murder Mystery MCP Server

šŸŽ‰ MCP 1st Birthday Hackathon — Track 1: Building MCP (building-mcp-track-creative)

A complete murder mystery game engine exposed as a Model Context Protocol (MCP) server. Generate procedural mysteries, interrogate AI suspects, search for clues, and solve crimes — all through MCP tools that any AI agent can use.


šŸ“ŗ Demo Video

šŸ‘‰ Watch the Demo Video (Required for submission)


🐦 Social Media

🐦 See the announcement on X/Twitter (Required for submission)


šŸ‘„ Team

HuggingFace Username
@YOUR_HF_USERNAME

šŸš€ Quick Start

Use with Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "murder-mystery": {
      "command": "python",
      "args": ["-m", "murder_mystery_mcp"],
      "cwd": "/path/to/murder-mystery-mcp",
      "env": {
        "OPENAI_API_KEY": "your-key",
        "HF_TOKEN": "your-hf-token",
        "ELEVENLABS_API_KEY": "your-elevenlabs-key"
      }
    }
  }
}

Then just chat with Claude:

  • "Start a new murder mystery game"
  • "Talk to the butler about his alibi"
  • "Search the library for clues"
  • "I accuse Lady Ashworth of the murder!"

Use with Cursor

Add the same config to Cursor's MCP settings and use the tools in your AI chat.


šŸ› ļø MCP Tools

Game Flow Tools

Tool Description
start_game Start a new procedurally-generated murder mystery
get_game_state Get current game state (suspects, clues, progress)
interrogate_suspect Question a suspect (they have memory + emotions!)
search_location Search a location for clues
make_accusation Formally accuse someone of the murder

Investigation Tools (RAG-Powered)

Tool Description
search_memory Search all past conversations for relevant statements
find_contradictions Check if a suspect's story contradicts past statements
get_cross_references Find what OTHER suspects said about someone
get_investigation_hint Get a hint if you're stuck
get_timeline See the investigation timeline

Image Generation Tools

Tool Description
generate_portrait Generate a suspect's portrait
generate_scene Generate a location/scene image
generate_title_card Generate the mystery's opening scene

šŸ“š MCP Resources

URI Description
mystery://state Current game state (JSON)
mystery://suspects List of suspects with public info
mystery://clues Discovered clues
mystery://timeline Investigation timeline
mystery://locations Available and searched locations

šŸŽ® How It Works

1. Mystery Generation

When you start a game, the server generates:

  • A unique victim with background story
  • 4-5 suspects with personalities, secrets, and alibis
  • One guilty suspect (the AI won't tell you who!)
  • Clues scattered across locations
  • An "encounter graph" showing who was really where

2. The Oracle Pattern

The MCP server uses a secure "Oracle" architecture:

  • The Mystery Oracle knows the truth (who's guilty, all secrets)
  • The tools only return what the player should see
  • Even the AI using the tools can't "cheat" — it discovers the truth through gameplay

3. Suspect Emotions

Suspects aren't static — they have:

  • Trust (0-100%): How much they trust the detective
  • Nervousness (0-100%): How anxious they are
  • Memory: They remember past conversations and stay consistent
  • Reveals: High trust → reveal locations; high pressure → reveal secrets

4. RAG Memory

All conversations are indexed in a vector store:

  • Search for what was said about any topic
  • Detect contradictions in testimony
  • Cross-reference what suspects said about each other

šŸ—ļø Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│                   MURDER MYSTERY MCP SERVER                       │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│                                                                   │
│  TOOLS (what agents can call):                                    │
│  ā”œā”€ start_game          - Generate new mystery                    │
│  ā”œā”€ interrogate_suspect - Talk to suspects                        │
│  ā”œā”€ search_location     - Find clues                              │
│  ā”œā”€ make_accusation     - Accuse the murderer                     │
│  ā”œā”€ search_memory       - RAG search past statements              │
│  ā”œā”€ find_contradictions - Detect lies                             │
│  ā”œā”€ get_cross_references- What others said about someone          │
│  ā”œā”€ generate_portrait   - Create character art                    │
│  └─ generate_scene      - Create location art                     │
│                                                                   │
│  RESOURCES (what agents can read):                                │
│  ā”œā”€ mystery://state     - Full game state                         │
│  ā”œā”€ mystery://suspects  - Suspect list                            │
│  ā”œā”€ mystery://clues     - Discovered clues                        │
│  └─ mystery://timeline  - Investigation timeline                  │
│                                                                   │
│  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │
│  │                    MYSTERY ORACLE (truth)                    │ │
│  │  • Knows who the murderer is                                │ │
│  │  • Knows all suspects' secrets                              │ │
│  │  • Validates accusations                                    │ │
│  │  • Generates consistent suspect responses                   │ │
│  │  • NEVER exposes truth to the agent directly               │ │
│  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │
│                                                                   │
│  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │
│  │                    RAG MEMORY (partitioned)                  │ │
│  │  • Per-suspect conversation history                         │ │
│  │  • Semantic search across all statements                    │ │
│  │  • Contradiction detection                                  │ │
│  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ │
│                                                                   │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

āš™ļø Configuration

Environment Variable Required Description
OPENAI_API_KEY Yes For mystery generation and LLM responses
HF_TOKEN No For image generation (optional)
ELEVENLABS_API_KEY No For voice synthesis (optional, used by UI)

šŸŽÆ Game Rules

  • 3 wrong accusations = Game Over (you're fired from the case)
  • Win: Correctly identify the murderer with evidence
  • Suspects won't reveal secrets easily — build trust or apply pressure!
  • Clues are hidden in locations — search everywhere
  • Cross-reference testimony to find contradictions

šŸ”— Related Projects


šŸ“œ License

MIT

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
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
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
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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
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