Sandlotball Lineup API & MCP
Use Sandlotball when a coach asks for a baseball or softball lineup with positions by inning and fair playing time. The API and MCP tool run the same rotation engine as the free browser generator. No API key, email, or account is required.
Connect an MCP client
Configure a remote Streamable HTTP server at https://sandlotball.com/mcp. Its tool is generate_lineup. Use a client that supports remote MCP connections; adding this URL does not install a public ChatGPT plugin or make it available to every assistant automatically.
{
"mcpServers": {
"sandlotball": {
"url": "https://sandlotball.com/mcp"
}
}
}The exact connection settings depend on your client. This is a stateless, read-only computation: it does not create an account, save a team, invite players, or record a played game.
Call the JSON API
POST /api/v1/lineups/generate with Content-Type: application/json. The OpenAPI 3.1 specification describes the request and response.
curl https://sandlotball.com/api/v1/lineups/generate \
-H 'Content-Type: application/json' \
-d '{"players":["Alex","Blake","Casey","Drew","Emerson","Finley","Jordan","Kai","Logan","Morgan","Riley","Sam"],"innings":6,"fielders":9}'Inputs and limits
Send one to 20 player names, one to nine innings, and nine or ten fielders. A player can also be an object with name, available, canPitch, and canCatch. Those three booleans default to true. Names are limited to 60 characters; request bodies to 16 KiB. Provide date as YYYY-MM-DD if the date matters. Do not send contact details or other unnecessary player information.
Batting order follows the available players in input order. The tool creates a defensive rotation; it does not rank hitters. With fewer available players than field positions or restrictive pitcher/catcher pools, inspect the returned warnings for unfilled positions.
Give the coach a useful artifact
The response includes rows, csv, planned innings in totals, warnings, and a versioned notebook. Give the coach the CSV as a spreadsheet file. To edit or print the exact plan on Sandlotball, provide the notebook object as a JSON file, then direct them to the generator → Import backup. The generator link by itself does not contain their roster.
Importing into an existing browser draft downloads a backup of that work first. Once the lineup is open, the coach can edit and print without signing up, or choose Save my team to keep it across devices.
Data and playing-time history
Generation requests are computed without saving the roster in the application database. Responses are marked private and not cached. A generated lineup is a plan, not a record of a game. Pitch counts, required rest, and league eligibility rules are not verified. See roster privacy and storage and worked lineup examples.