Get the FREE Ultimate OpenClaw Setup Guide →

StatsPlus

MCP server exposing the StatsPlus API (for OOTP) as tools for Claude

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio joshuarichard-statsplus-mcp node dist/index.js \
  --env STATSPLUS_COOKIE="sessionid=<value>;csrftoken=<value>" \
  --env STATSPLUS_LEAGUE_URL="your-league-url slug (e.g., myleague)"

How to use

StatsPlus MCP Server exposes the StatsPlus API as a set of Claude-compatible tools. It acts as an adapter between your StatsPlus account and MCP clients, offering a suite of data retrieval tools such as player statistics, team statistics, roster lookups, and export utilities. You can query player batting, pitching, and fielding stats, fetch team stats, retrieve rosters, search players by name, and manage an asynchronous ratings export workflow. The server is designed to work with Claude and other MCP-compatible clients, returning structured results that can be consumed in your workflows.

How to install

Prerequisites: Node.js 18 or later, access to a StatsPlus account with a team/league.

  1. Clone the repository:
git clone https://github.com/joshuarichard/StatsPlus-MCP.git
  1. Install dependencies:
cd StatsPlus-MCP
npm install
  1. Build the TypeScript sources (if applicable):
npm run build
  1. Prepare environment variables (see below) and run the server:
# Example using a shell session
export STATSPLUS_LEAGUE_URL=your-league-slug
export STATSPLUS_COOKIE=sessionid=<value>;csrftoken=<value>
npm start
  1. Alternatively, run the server via a process manager or Docker if you prefer containerized deployment.

Additional notes

Environment variables: STATSPLUS_LEAGUE_URL should be set to your StatsPlus league URL slug (e.g., myleague). STATSPLUS_COOKIE must contain the combined session cookie in the format sessionid=<value>;csrftoken=<value>, which is obtained by exporting cookies from your browser as described in the README. The cookie typically expires; you will need to refresh it periodically and update the environment variable. The server relies on a browser session to access the StatsPlus API, so ensure your credentials and cookies remain valid. If you encounter HTTP 204 responses during preseason, make sure you pass year=<most recent completed season> to receive data. When using the ratings export, remember that it is asynchronous; initiate with start_ratings_job() and poll with get_ratings(poll_url) to retrieve results. For local development, copy .env.example to .env and fill in your credentials; .env is gitignored.

Related MCP Servers

Sponsor this space

Reach thousands of developers