mcp-server

v3.5.1
io.github.opengolfapi/mcp-server Checked 3 days ago Published 4 months ago

Golf for AI agents — every US course free, plus open contribution, identity & tournaments.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_courses

Search US golf courses by name, US state, or location (lat/lng + radius). Returns matching courses with location, type, par. Free, ODbL data.

ParameterTypeDescription
latnumberLatitude for radius search (with lng)
limitnumberMax results (default 10)
lngnumberLongitude (with lat)
querystringCourse name to search
radius_minumberRadius in miles (default 25)
statestring2-letter US state code

get_course

Full detail for one course by id: scorecard (par + handicap per hole), tees, location, contact, nearby. Free.

ParameterTypeDescription
id *stringOpenGolfAPI course id

get_tees

All tee sets for a course with ratings, slopes, and yardages. Free.

ParameterTypeDescription
id *stringOpenGolfAPI course id

get_weather

Live weather forecast for a course location (Weather.gov). Free.

ParameterTypeDescription
id *stringOpenGolfAPI course id

get_climate

Monthly climate normals + best months to play for a course. Free.

ParameterTypeDescription
id *stringOpenGolfAPI course id

get_nearby

Nearby hotels, restaurants, and other courses for a course. Free.

ParameterTypeDescription
id *stringOpenGolfAPI course id

log_shot

Contribute a golf shot to the open OpenShot standard (any launch monitor). Requires a key. Units: speed mph, angles deg, spin rpm, distance yds.

ParameterTypeDescription
azimuthnumberHorizontal launch (HLA), deg, +=right
back_spinnumberBackspin, rpm
ball_speednumberBall speed, mph
carrynumberCarry, yds
clubstringClub, e.g. '7i' or 'driver'
course_idstringCourse id, if known
device_modelstringLaunch monitor, e.g. 'garmin_r10'
holenumberHole number 1-18
launch_anglenumberVertical launch (VLA), deg
player_idstringYour pseudonymous player id
side_spinnumberSidespin, rpm, +=right
totalnumberTotal distance, yds

submit_moment

Contribute an Open Connect event from any sensor/wearable/phone. The whole sensor spectrum rides through here — type-specific data goes in `payload`. Requires a key.

ParameterTypeDescription
moment_type *stringEvent kind. breadcrumb/tee/green=GPS points; pin/condition=course sightings; presence=live location (find fellow golfers); motion/swing/putt/biometric/club/score=sensor events.
accuracy_mnumberGPS accuracy in meters
course_idstringCourse id
devicestringSource device, e.g. 'apple_watch', 'hackmotion', 'arccos'
holenumberHole 1-18
latnumberGPS latitude
lngnumberGPS longitude
notestringFree-text detail
payloadobjectType-specific sensor data. swing:{tempo,wrist_angle,plane,speed_profile}; putt:{speed,path,face,roll_pct,distance}; biometric:{heart_rate,exertion,steps}; club:{club,event,specs}; score:{strokes,putts…
player_idstringYour pseudonymous player id
recorded_atstringISO 8601 timestamp the event happened
session_idstringSession id (one round/range session)

get_my_shots

Read back your own contributed shots by player or session. Requires a key.

ParameterTypeDescription
limitnumberMax results
player_idstringYour player id
session_idstringSession id

get_my_moments

Read back your own contributed moments (breadcrumbs, swings, putts, conditions…) by player, session, or type. Requires a key.

ParameterTypeDescription
limitnumberMax results
player_idstringYour player id
session_idstringSession id
typestringFilter to one moment_type

propose_correction

Propose a fix to a course FACT field (phone, website, address, architect, year_built, course_name, city, postal_code, course_type). Our AI reviews it (approve/reject/needs_info). Requires a key. Geometry is not correctable here.

ParameterTypeDescription
course_id *stringOpenGolfAPI course id
field *stringWhich fact to correct
proposed_value *stringThe corrected value
evidence_urlstringA source URL backing the correction (improves approval odds)
notestringWhy this is correct

respond_to_review

Respond to a correction that came back as needs_info — add a source or explanation and re-open it for review. Requires a key.

ParameterTypeDescription
correction_id *stringThe correction id from propose_correction
evidence_urlstringA source URL
notestringYour answer to the reviewer

get_correction

Check the status/verdict of a correction you proposed (approved | rejected | needs_info | applied). Requires a key.

ParameterTypeDescription
correction_id *stringThe correction id

how_to_build

The safe playbook for building on OpenGolfAPI and contributing data the right way. Call this once before contributing.

get_passport

FREE (public, no key). Any golfer's shareable record — display name, OpenGolf Member #, courses played, rounds, trophies, referrals. Show a player's golf resume in your app.

ParameterTypeDescription
player_id *stringGolfer OpenGolf ID (ogid_...)

record_referral

Record that one user referred another (a REFERRED_BY edge) — build YOUR app's invite loop on the shared graph, namespaced to your app. Needs a key.

ParameterTypeDescription
new_user *stringInvitee player id
referrer *stringReferrer player id
namespacestringYour app namespace

get_referrals

How many golfers a user has referred (+ the list) — the viral-loop metric for your app. Needs a key.

ParameterTypeDescription
player_id *stringReferrer player id

about

What OpenGolfAPI is and how to use this MCP server.

request_sign_in_code

Start "Sign in with OpenGolf" for a person: emails them a 6-digit code. No API key needed. They read you the code, then call complete_sign_in.

ParameterTypeDescription
email *stringthe person's email
client_idstringyour app/agent name (default mcp-remote)

complete_sign_in

Finish sign-in: exchange the 6-digit code for their OpenGolf ID + access token (use as X-OpenGolf-Token to act as them). Pass ref=<inviter player_id> when another player's invite brought them — it credits the referral.

ParameterTypeDescription
code *string6-digit code
email *stringemail
client_idstringapp/agent name
refstringinviter's player_id (ogid_…) — always pass when known
scopesstringOAuth scopes (default identity)

create_dev_key

Mint a developer API key bound to an OpenGolf ID (sign in first via request_sign_in_code → complete_sign_in). Returns the key ONCE. First-party rail: no OpenGolf ID, no key.

ParameterTypeDescription
email *stringthe SAME email used to sign in
opengolf_token *stringaccess_token from complete_sign_in
namestringkey label

sign_in_with_opengolf

Derive a user's OpenGolf ID deterministically from their email (sub = ogid_ + sha256(lower(trim(email)))[:16]) — one line, no redirect. For a VERIFIED session token use request_sign_in_code → complete_sign_in.

ParameterTypeDescription
email *stringthe user's email

register_webhook

Register an https URL for your domain events (HMAC-signed deliveries, owner-scoped). Requires your key (Authorization: Bearer ogapi_…).

ParameterTypeDescription
url *stringhttps endpoint
eventsarrayevent filter, default ['*']

create_tournament_invite

Create a shareable invite (QR/link); everyone who redeems it joins the SAME event/session. max_uses caps size (foursome=4). Requires key.

ParameterTypeDescription
event_idstringEvent id
max_usesnumberGroup cap (default 8)
session_idstringSession id
ttl_secondsnumberLifetime seconds

join_tournament

Redeem an invite token — the player joins the group/event. Requires key.

ParameterTypeDescription
player_id *stringJoining player id
token *stringInvite token
display_namestringDisplay name

list_game_formats

Every OpenMatch scoring format. GROSS scoring is free & keyless.

score_round

Score a round in any format — GROSS, FREE, no key. players:[{player_id,holes:{"1":4}}] or entries:[{player_id,hole,value}]; holes:[{hole,par,stroke_index?}].

ParameterTypeDescription
format *stringstroke|stableford|match_play|skins|scramble|best_ball|foursomes|nassau|quota|ryder_cup|ctp|longest_drive|greenies|bingo_bango_bongo|wolf|king_of_the_hill|order_of_merit
entriesarrayshot formats
eventsarrayorder_of_merit: [{event_id, standings:[{player_id, rank}]}]
holesarray
playersarraystroke formats
rulesobject
teamsarray

plays_like

Effective distance — THE canonical "plays like" number (wind/elevation/temp/altitude), factors itemized. FREE, no key. Pair with get_conditions for live wind.

ParameterTypeDescription
yards *number
altitude_ftnumber
elevation_delta_ftnumber+uphill (free source: course holes_data[].elevation)
shot_bearing_degnumber
temp_fnumber
windobject{speed_mph, direction_deg} — from get_conditions

get_conditions

LIVE weather at a course (temp/wind/precip, forecast-model, 15-min cache). FREE. Feeds plays_like.

ParameterTypeDescription
course_id *stringCourse UUID

list_dev_keys

List the keys owned by your OpenGolf ID (prefixes only). Needs access_token from complete_sign_in.

ParameterTypeDescription
opengolf_token *stringaccess_token

get_profile

A player's public OpenGolf ID card — name, avatar, links, prefs. Free.

ParameterTypeDescription
player_id *stringPlayer id (sub)

update_profile

Edit a player's self-asserted profile fields (derived facts can't be set). Requires key (claimed players need their grant).

ParameterTypeDescription
player_id *stringsub
avatar_urlstringAvatar URL
biostringBio
bucket_listarray
display_namestringName
home_course_idstringHome course

get_awards

A player's OpenAwards — derived trophies + course passport. Requires key.

ParameterTypeDescription
player_id *stringsub

set_beacon

Broadcast a consented, EXPIRING presence/availability beacon (present|available|open). Requires key.

ParameterTypeDescription
mode *stringpresent|available|open
player_id *stringsub
course_idstringCourse
notestringNote
regionstringRegion
ttl_secondsnumberTTL
visibilitystringpublic|group|friends

find_beacons

Discover ACTIVE public beacons (find-my-group / matchmaking). Requires key.

ParameterTypeDescription
course_idstringCourse
modestringMode
regionstringRegion

create_competition

Create a Competition (any OpenMatch format). Requires key.

ParameterTypeDescription
name *stringName
course_idstringCourse
format_configobject
holesarray
typestringFormat

list_competitions

List Competitions (free). Filter org/course/status.

ParameterTypeDescription
coursestringCourse
orgstringOrg
statusstringopen|closed|finalized

get_competition

A Competition + live gross standings (free).

ParameterTypeDescription
competition_id *stringCompetition id

record_attempt

Record an Attempt (score or side-game value). Idempotent. Requires key.

ParameterTypeDescription
competition_id *stringCompetition
player_id *stringPlayer
holenumberHole
strokesnumberStrokes
team_idstringTeam
valuenumberSide-game value

finalize_competition

Finalize — run the kernel, store the gross Result. Requires key.

ParameterTypeDescription
competition_id *stringCompetition id

broadcast_feed

OpenBroadcast P1 — ONE typed feed for a session: broadcast-worthy items (score/side_game/money/award/condition) in ascending (recorded_at, seq) order, each with template narration (headline<=60/ticker<=80). Money appears only via settled records. Replaces stitching moments+results+live_state. Requires key + session access (participant or compute).

ParameterTypeDescription
session_id *stringSession id
kindsstringcsv filter: score,side_game,money,award,condition,standing,system
limitnumbermax items (<=500)
sincestringISO cursor — items after this recorded_at

get_handicap

OpenIndex (beta) — a player's estimated handicap computed from real, notarized rounds (every score stamped when it happened; verifiable by anyone). Not official — provable. Reading your OWN is free with your key; player_id must be the ogid_… form.

ParameterTypeDescription
player_id *stringOpenGolf ID (ogid_…)

get_showcase

A player's public showcase — the collectibles/records on their OpenGolf ID (og.* namespaces + course.*). Free, keyless: pass their ogid_. Tombstoned (revoked/expired) records hidden. The provable trophy wall.

ParameterTypeDescription
subject *stringplayer OpenGolf ID (ogid_…)
namespacestringoptional filter, e.g. og.collectibles/v1

verify_record

Verify a record/collectible against the OpenGolf Chain (a signed, hash-linked, Bitcoin-anchored transparency log). Returns the hash + whether it matches + the CLIENT-RECOMPUTE recipe (sha256 of the canonical record) + the anchor. Then you can go further, all keyless: pull a merkle inclusion proof (GET /chain/anchors/:id/inclusion?hash=), verify the checkpoint's RS256 signature against /.well-known/jwks.json, and resolve the Bitcoin (OpenTimestamps) anchor. Free. Trust no one — recompute the hash, check inclusion, resolve Bitcoin yourself.

ParameterTypeDescription
record_id *stringrecord UUID

list_webhooks

List your active webhook subscriptions. Requires key.

remove_webhook

Deactivate one of your webhook subscriptions by id (audit row kept). Requires key.

ParameterTypeDescription
subscription_id *stringSubscription id

list_orgs

Public directory of verified orgs (free).

ParameterTypeDescription
typestringcourse|tour|club|sponsor

mint_asset

Mint an Asset (trophy/badge/stamp/coupon/membership) into the owner's trophy case + chain. Requires key.

ParameterTypeDescription
name *stringName
type *stringtrophy|badge|passport|coupon|membership|collectible
metadataobject
org_idstringOrg
ownerstringRecipient sub

file_claim

File a Claim in the trust ledger (ownership/attestation/identity/record/correction). Requires key.

ParameterTypeDescription
claim_type *stringType
subject *stringe.g. course:<id>
statementstringStatement
target_idstringTarget

list_claims

List Claims (free). Filter claimant/subject/status.

ParameterTypeDescription
claimantstringClaimant
statusstringStatus
subjectstringSubject

post_beta

Drop local course knowledge ("beta") on a hole — the AI-caddie's fuel. Requires key.

ParameterTypeDescription
course_id *stringCourse
text *stringThe knowledge
categorystringgeneral|wind|green|hazard|tee|pin|approach
holenumberHole

get_beta

Read local course knowledge for a course/hole (free).

ParameterTypeDescription
course *stringCourse id
holenumberHole

get_my_chain

Export YOUR tamper-evident OpenGolf Chain + checkpoints. Requires key (own-read free).

verify_chain

Verify a Chain export OR walk the public transparency log (GET /chain/log?subject=), public + keyless — recompute the hash-links, verify each RS256 checkpoint signature against the JWKS, and resolve the Bitcoin anchors; reports tampering and where. The whole history (registry, per-course, master) is independently auditable — trust no one.

ParameterTypeDescription
export *objectexport from get_my_chain