CLI and MCP server for Scottfree Analytics sports predictions API
Project description
Scottfree Sports CLI & MCP Server
Command-line tool and MCP server for the Scottfree Analytics sports predictions API.
Installation
# From repo (development)
cd sflow-cli && uv sync --dev
# Install as a global tool
cd sflow-cli && uv tool install .
Quick Start
# Configure your API key
sfs config set --api-key sk_alphapysports_... --env default
# For local development
sfs config set --api-key dev_local_alphapy_key --api-url http://localhost:8009 --env local
# Get today's predictions
sfs predictions get nba spread
sfs predictions get mlb over_under
# List available sports and models
sfs predictions list-sports
Commands
sfs
config Manage API configuration and profiles
predictions Get game predictions
results Get historical prediction results
summary Get model performance summaries
odds Get current betting odds
analysis Get AI-powered game analysis (premium)
account Manage your account
admin Admin operations (Scottfree admin only)
Predictions
sfs predictions get nba spread # Table output (default)
sfs predictions get nba spread -o json # JSON output (pipeable)
sfs predictions get nfl ml -o csv # CSV output
sfs predictions list-sports # Available sports & models
Results & Summary
sfs results get nba spread --limit 20
sfs summary get nhl over_under
Odds
sfs odds get nba
sfs odds get mlb -o json | jq '.odds[:3]'
AI Analysis (Premium)
sfs analysis get nba spread
Account Management
sfs account info # Account details
sfs account usage # API usage stats
sfs account keys # List API keys
sfs account create-key --name "CLI Key" # Create new key
sfs account rename-key sk_... --name "X" # Rename key
sfs account revoke-key sk_... # Revoke key
Output Formats
| Flag | Format | Use Case |
|---|---|---|
-o table |
Rich table (default) | Terminal viewing |
-o json |
Raw JSON | Piping to jq, scripts |
-o csv |
CSV | Spreadsheets, data analysis |
Configuration
Config is stored in ~/.sfs/config.toml:
[default]
api_key = "sk_alphapysports_..."
api_url = "https://api.scottfreellc.com"
[local]
api_key = "dev_local_alphapy_key"
api_url = "http://localhost:8009"
Resolution Order
SFS_API_KEY/SFS_API_URLenvironment variables (highest)--envflag selects a profile[default]profile (lowest)
Model Type Shorthands
| Shorthand | Full Value |
|---|---|
spread |
won_on_spread |
moneyline, ml |
won_on_points |
over_under, ou |
over_under |
MCP Server
The sfs-mcp command exposes predictions as tools for AI assistants (Claude Code, Claude Desktop).
Claude Code Setup
Add to ~/.claude/mcp.json:
{
"mcpServers": {
"scottfree-sports": {
"command": "uv",
"args": ["run", "--project", "/path/to/sflow-cli", "sfs-mcp"],
"env": {
"SFS_API_KEY": "sk_alphapysports_...",
"SFS_API_URL": "https://api.scottfreellc.com"
}
}
}
}
Available MCP Tools
| Tool | Description |
|---|---|
get_predictions |
ML predictions for today's games |
get_results |
Historical prediction results |
get_summary |
Model performance metrics |
get_odds |
Current betting odds |
get_ai_analysis |
AI-powered analysis (premium) |
get_sports |
List sports and model types |
get_account_info |
Account details |
get_usage |
API usage statistics |
clear_cache |
Clear cache (admin) |
invalidate_cache |
Invalidate specific cache entries (admin) |
Supported Sports
MLB, NBA, NCAAB, NCAAF, NFL, NHL
Development
cd sflow-cli
uv sync --dev
uv run pytest tests/ -v # Run tests
uv run ruff check src/ tests/ # Lint
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scottfree_sports_cli-0.1.0.tar.gz.
File metadata
- Download URL: scottfree_sports_cli-0.1.0.tar.gz
- Upload date:
- Size: 117.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4cbcbae2fadb2d914062061aeb0f3dec081774f97fbaccff07d628ae2e51d9e
|
|
| MD5 |
734e34ff19c495cdd0cab776bd5d4dd0
|
|
| BLAKE2b-256 |
4627333ec7528901041d3a7af70c83b26b31be0fe036c305154c783e28b54783
|
File details
Details for the file scottfree_sports_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scottfree_sports_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 40.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5faed95625e03e27dfaf7f0c59e98f61d1e0dcca64074e300b3cb2626031f048
|
|
| MD5 |
530de9e66163ac36ba6c57c2782c4445
|
|
| BLAKE2b-256 |
cc97aa4fb0d346603b67973a171f2000fbb4206ffca2bd09916614120758c4a6
|