# FastballAPI MCP Server

18 baseball data tools for AI assistants. MLB since 2015 plus college: pitches, plate appearances, box scores, odds by book. REST and MCP. All tools return structured output schemas for reliable parsing.

## Server URL

```
https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY
```

Transport: Streamable HTTP

## Get an API Key

1. Sign up at https://fastballapi.com/signup (free, 500 credits included)
2. Go to https://fastballapi.com/dashboard/keys
3. Create a key (starts with `sk_live_`)

## Setup

### Claude Code

```bash
claude mcp add --transport http --scope user fastballapi "https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY"
```

### Claude Desktop

Add to config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, `%APPDATA%\Claude\claude_desktop_config.json` on Windows):

```json
{
  "mcpServers": {
    "fastballapi": {
      "url": "https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY"
    }
  }
}
```

### Cursor

Add to `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "fastballapi": {
      "url": "https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY"
    }
  }
}
```

### VS Code (GitHub Copilot)

Add to `.vscode/mcp.json`:

```json
{
  "servers": {
    "fastballapi": {
      "type": "streamable-http",
      "url": "https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY"
    }
  }
}
```

### Cline

Settings > MCP Servers > Add Remote Server:
- Name: `fastballapi`
- URL: `https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY`

### Windsurf

Add to `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "fastballapi": {
      "serverUrl": "https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY"
    }
  }
}
```

## Available Tools

| Category | Tools | Credits |
|----------|-------|---------|
| Static reference | list_teams, search_players | 1 |
| Basic lookup | get_games, get_schedule, get_standings, get_injuries, get_ratings | 2 |
| Stats + aggregation | get_game, get_player, get_player_games, get_leaders, get_team_stats, get_pitch_mix, get_odds | 5 |
| Multi-table | get_plate_appearances, get_pitches, get_spray_chart | 10 |
| Time-series | get_line_movement | 10 |

## Pricing

500 free credits on signup. Plans from $19/mo at https://fastballapi.com/dashboard/billing.

## Documentation

Full API docs: https://fastballapi.com/docs
MCP setup guide: https://fastballapi.com/docs#claude-desktop
