MCP_VideogameStats_Server

JPS4321/MCP_VideogameStats_Server

3.2

If you are the rightful owner of MCP_VideogameStats_Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The MCP Videogame Stats Server is a Python-based server that provides structured access to a dataset of videogames, enabling queries by various attributes such as title, release year, genre, publisher, platform, sales, and ratings.

Tools
7
Resources
0
Prompts
0

MCP Videogame Stats Server

An MCP (Model Context Protocol) server that exposes tools for querying videogame statistics. The server provides structured access to a dataset of videogames, enabling queries by title, release year, genre, publisher, platform, sales, and ratings.

Features

  • Implements a fully compliant MCP server in Python.
  • Exposes multiple tools for videogame analytics (see section below).
  • Uses a structured CSV dataset (videogames.csv) as the data backend.
  • Designed for integration with MCP clients (chatbots, assistants, analysis agents).

Repository Structure

MCP_VideogameStats_Server/
├── server.py           # Main MCP server entrypoint
├── tools.py            # Tool definitions (MCP endpoints)
├── videogames.csv      # Dataset with videogame metadata and sales
├── requirements.txt    # Python dependencies
├── README.md           # Project documentation
└── ...

Installation

Clone the repository and set up a virtual environment:

git clone https://github.com/JPS4321/MCP_VideogameStats_Server.git
cd MCP_VideogameStats_Server

python3 -m venv .venv
source .venv/bin/activate

pip install -r requirements.txt

Running the Server

Start the MCP server:

python server.py

Add this to your yaml file

game_stats:
    command: "ABSOLUTE PATH/MCP_VideogameStats_Server/.venv/bin/python"
    args: ["ABSOLUTE PATH/MCP_VideogameStats_Server/games/server.py"]
    env: {}

The server will initialize and expose its tools according to the MCP protocol specification.

Dataset Specification

The videogames.csv dataset contains the following schema:

FieldDescription
indexRow index (auto-increment)
NameGame title
PlatformRelease platform (e.g., NES, Wii, PS4)
Year_of_ReleaseRelease year (float, may contain decimals)
GenreGame genre (Action, Sports, RPG, etc.)
PublisherPublisher/Distributor
NA_SalesSales in North America (millions of copies)
EU_SalesSales in Europe (millions of copies)
JP_SalesSales in Japan (millions of copies)
Other_SalesSales in other regions (millions of copies)
Global_SalesGlobal sales (millions of copies)
Critic_ScoreAverage critic score
User_ScoreAverage user score

Tools

The server provides the following MCP tools (defined in tools.py):

1. tool_count_games_by_genre

Count games grouped by genre, optionally filtered by platform.

Arguments:

{
  "platform": "Wii"   
}

2. tool_best_publisher_by_sales

Identify the publisher with the highest sales, optionally within a year range.

Arguments:

{
  "year_min": 2000,   
  "year_max": 2010    
}

3. tool_game_info

Retrieve detailed information about a specific game.

Arguments:

{
  "name": "Wii Sports"
}

4. tool_top_games_by_sales

Top N games by Global_Sales, with optional filters.

Arguments:

{
  "limit": 10,        
  "year_min": 2000,   
  "year_max": 2010,   
  "genre": "Sports",  
  "platform": "Wii",  
  "publisher": "Nintendo" 
}

5. tool_publisher_leaderboard

Publishers ranked by total Global_Sales.

Arguments:

{
  "limit": 10,        
  "year_min": 2000,   
  "year_max": 2010,   
  "genre": "Action"   
}

6. tool_top_genres_by_platform

Top genres by Global_Sales for a given platform.

Arguments:

{
  "platform": "PS4",  
  "limit": 5          
}

7. tool_top_sales_by_platform

Platforms ranked by total Global_Sales.

Arguments:

{
  "limit": 10,        
  "year_min": 2000,   
  "year_max": 2015,   
  "genre": "RPG"      
}

Technical Notes

  • MCP Protocol: Exposes tools through the Model Context Protocol (JSON-RPC style).
  • Extensibility: New tools can be added by extending tools.py and updating server.py.
  • Data Backend: Current implementation uses videogames.csv; can be swapped for SQL/NoSQL/APIs.
  • Logging & Debugging: Python’s logging module is recommended for request/response debugging.

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/new-tool
  3. Commit your changes: git commit -m "Add new MCP tool"
  4. Push to your branch: git push origin feature/new-tool
  5. Open a Pull Request

License

This project is licensed under the MIT License.