OpenGolfAPI

Model Context Protocol · v3.5.1 · 56 tools

Golf, for your AI agent.

One MCP server gives Claude, ChatGPT, Gemini, and Cursor the whole platform: search 16,800+ courses, score any game, sign players in, and send shots & moments — most of it with no key.

View on npm →

Setup — 60 seconds

Runs over npx; no install, no build. Reads are free with no key. Add it to any MCP client.

# Try it instantly
npx -y @opengolfapi/mcp-server

# Claude Desktop / Cursor — claude_desktop_config.json (or .cursor/mcp.json):
{
  "mcpServers": {
    "opengolfapi": {
      "command": "npx",
      "args": ["-y", "@opengolfapi/mcp-server"],
      "env": { "OPENGOLFAPI_KEY": "ogapi_… (optional — only for contributing)" }
    }
  }
}

No key = reads + gross scoring. A key (free — Sign in with OpenGolf → create_dev_key) = contributing shots/moments + identity. No OpenGolf ID, no key.

The 56 tools

Everything an agent can do. free = no key · key = a free dev key.

Courses — read, free

search_coursesFind courses by name, location, state, or architect. Full course info.
get_courseFull detail for one course — tees, holes, weather, nearby, pricing.
get_teesEvery tee set with course rating & slope.
get_climate30-year climate normals + the best months to play.
get_nearbyNearby courses, hotels, restaurants.

Scoring — OpenMatch, free & keyless

list_game_formatsList all 16 game formats.
score_roundScore a round in any format (gross) — stroke, skins, scramble, nassau, wolf, …. No key.

Identity — Sign in with OpenGolf

request_sign_in_codeEmail a player a 6-digit sign-in code. No key.
complete_sign_inExchange the code for a portable OpenGolf ID + access token.
sign_in_with_opengolfThe full hosted sign-in flow.
get_profileRead a player's public OpenGolf ID card.
update_profileEdit name, avatar, links, home course, prefs.

Dev keys — no OpenGolf ID, no key

create_dev_keyMint an API key bound to your OpenGolf ID (sign up to build).
link_dev_keyConfirm your OpenGolf ID on an existing key (legacy keys keep working).
list_dev_keysList the keys your OpenGolf ID owns.

Contribute — OpenShot & Moments key

log_shotLog a measured shot from any launch monitor (OpenShot, CC0).
submit_momentSend any sensor signal — GPS, swing, putt, club, score, presence.
get_my_shotsRead your own shots back.
get_my_momentsRead your own moments back.

Play & social

create_tournament_inviteMint a signed, expiring join token (OpenJoin).
join_tournamentRedeem a join token — everyone lands in the same round.
set_beaconBroadcast consented, expiring presence — "playing now / open to a game."
find_beaconsDiscover nearby golfers broadcasting presence (find-my-group).
get_awardsA player's trophies, milestones, and course passport.
record_consentRecord a player's consent grant in the ledger.

Guides

aboutWhat OpenGolfAPI is and how to use it.
how_to_buildThe safe playbook for building + contributing the right way.

The pieces, defined

So your agent (and you) "gets it" — each is an open standard you can adopt on its own. OpenGolf ID is the glue that ties them to one golfer.

OpenShot CC0
One normalized shape for every launch monitor. Any GSPro OpenConnect (port 921) payload is valid OpenShot.
Moments CC0
Any sensor signal as one flexible event — breadcrumb, swing, putt, club, score, presence. Send what you have.
OpenMatch
The scoring engine — 16 game formats, gross, free & keyless. POST a card, get standings.
OpenJoin
Signed, scoped, expiring join tokens — onboard a foursome or a tournament in one tap.
OpenGolf ID the glue
"Sign in with OpenGolf" (OIDC). One portable, pseudonymous golfer identity; handicap & history follow the player across every app.