Skip to content

Repository files navigation

peppi-mcp

Minimal, idiomatic Julia MCP server for Slippi .slp replay files

A Model Context Protocol (MCP) server that provides LLM clients with tools to analyze Super Smash Bros. Melee replay files. Built with Julia for high-performance statistical analysis and semantic search.

Features

Tools

  • generate_stats — Generate competitive statistics from Slippi replays

    • Core stats: stocks, damage, neutral wins, opening rate
    • Punish analysis: conversion rate, zero-to-deaths, punish efficiency
    • Movement tech: wavedashes, L-cancels, dash dances, ledgedashes
    • Filterable by player, opponent, character, stage, date range
  • search_replays — Semantic search over replay collections

    • Natural language queries ("close last stock games I lost")
    • Structural filters (character, stage, outcome)
    • Replay-level embeddings with cosine similarity ranking

Installation

Prerequisites

  • Julia 1.9 or later
  • Rust toolchain (installed automatically via RustToolChain.jl)

The server auto-installs peppi-slp from source on startup via cargo install.

Setup

  1. Clone this repository:
cd /path/to/peppi-mcp
  1. Instantiate Julia dependencies:
julia --project=. -e 'using Pkg; Pkg.instantiate()'
  1. Configure Claude Desktop/Code (see Configuration section)

Configuration

Claude Desktop

Add to your ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or equivalent:

{
  "mcpServers": {
    "peppi-mcp": {
      "command": "julia",
      "args": [
        "--project=/path/to/peppi-mcp",
        "/path/to/peppi-mcp/bin/peppi-mcp.jl"
      ]
    }
  }
}

Claude Code

Add to your ~/.claude/mcp.json:

{
  "peppi-mcp": {
    "command": "julia",
    "args": [
      "--project=/path/to/peppi-mcp",
      "/path/to/peppi-mcp/bin/peppi-mcp.jl"
    ]
  }
}

Usage

Once configured, you can use the tools in your Claude conversations:

Generate stats for my replays:
> Use generate_stats with dir="/path/to/replays" and player_code="ABCD#123"

Search for specific game types:
> Use search_replays with dir="/path/to/replays" and query="Fox vs Marth games where I lost last stock"

Implementation Status

MCP ServerModelContextProtocol.jl-based server with stdio transport, generate_stats and search_replays tools

Replay Parsing.slp and .slpp file support via PeppiJlrs (Rust/Julia FFI)

Statistics Enginestats.jl: stocks, damage, punish metrics, movement tech

Search & Embeddingsembeddings.jl + search.jl: feature extraction and cosine similarity ranking

Architecture

peppi-mcp/
├── Project.toml          # Julia package manifest
├── peppi/
│   ├── parse.jl          # Low-level Rust FFI bindings (PeppiJlrs)
│   └── game.jl           # Game, Frame, Player type definitions
├── src/
│   ├── PeppiMCP.jl       # Main module: MCP server, tool handlers, replay readers
│   ├── Internal.jl       # Internal utilities
│   ├── action_states.jl  # Melee action state definitions
│   ├── parsing.jl        # High-level .slp/.slpp parsing helpers
│   ├── stats.jl          # Statistics calculation
│   ├── embeddings.jl     # Replay-level feature vectors
│   └── search.jl         # Semantic search implementation
└── bin/
    └── peppi-mcp.jl      # Executable entry point

Development

Running Tests

julia --project=. -e 'using Pkg; Pkg.test()'

Starting the Server

julia --project=. bin/peppi-mcp.jl

The server speaks the MCP protocol over stdio and is managed by ModelContextProtocol.jl.

References

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages