Skip to main content
Glama

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



๐Ÿ“œ License

MIT

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DigitalBoopLtd/murder-mystery-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server