JPS4321/MCP_VideogameStats_Server
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.
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:
| Field | Description |
|---|---|
index | Row index (auto-increment) |
Name | Game title |
Platform | Release platform (e.g., NES, Wii, PS4) |
Year_of_Release | Release year (float, may contain decimals) |
Genre | Game genre (Action, Sports, RPG, etc.) |
Publisher | Publisher/Distributor |
NA_Sales | Sales in North America (millions of copies) |
EU_Sales | Sales in Europe (millions of copies) |
JP_Sales | Sales in Japan (millions of copies) |
Other_Sales | Sales in other regions (millions of copies) |
Global_Sales | Global sales (millions of copies) |
Critic_Score | Average critic score |
User_Score | Average 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.pyand updatingserver.py. - Data Backend: Current implementation uses
videogames.csv; can be swapped for SQL/NoSQL/APIs. - Logging & Debugging: Python’s
loggingmodule is recommended for request/response debugging.
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-tool - Commit your changes:
git commit -m "Add new MCP tool" - Push to your branch:
git push origin feature/new-tool - Open a Pull Request
License
This project is licensed under the MIT License.