Skip to main content
Glama
England Golf MCP

England Golf MCP

by mpvii

england-golf-mcp

An MCP server for My England Golf — your WHS handicap index, score history and competition results — so an agent can answer "how am I playing lately?" without you opening the portal.

Unofficial. England Golf publishes no API for individual golfers. This uses the member portal's own JSON API with a session you create yourself by logging in normally. It is fine for your own data; it is not an integration and is not endorsed by England Golf or DotGolf.

Why it works this way

There are two things that look like an API, and only one is usable:

Thing

What it is

Why

members.whsplatform.englandgolf.org

The member portal

Login is an ASP.NET WebForms form (membership number + password). No OAuth/OIDC — /.well-known/openid-configuration is a 404. But its pages are Vue shells over its own JSON API (/api/...), and that API is what the tools call.

isvapi.whsplatform.englandgolf.org

DotGolf ISV API

Real JSON, incl. club/members/{uid}/handicap, but credentials are per club (JWT, aud: isv-api) and only issued to accredited software vendors. Not an individual's account.

So the MCP:

  • opens a real browser for you to sign in, and stores only the resulting cookies;

  • never receives your password in this process;

  • keeps the session in the macOS Keychain, not in a file;

  • reads the portal's JSON, so there is no HTML scraping.

Related MCP server: ErgStats

Endpoints used

Found in the portal's Vue services (/controls-vue/services/*.js) and viewmodels (/controls/*/viewmodel.js). All are relative to members.whsplatform.englandgolf.org.

Endpoint

Method

Gives

/api/Member/GetSelf

GET

profile, home club, MemberUid

/api/Score/GetMemberHandicapIndex

POST {"memberUID": ...}

Handicap Index, Low Index, calculation detail

/api/Score/GetMyScores

POST {pageNumber, pageSize, ...}

score history, newest first

/api/competitions/GetMemberCompetitions

GET (full param set)

competitions played

GetMemberCompetitions only selects its action when every parameter is present (memberUid, clubId, competitionsPerPage, pageNumber, sortKey, sortAsc, fromDate, memberCompetitionsOnly, otherPassportId); without them it answers 404 "no resource matches".

Install

git clone https://github.com/mpvii/england-golf-mcp.git
cd england-golf-mcp

uv sync --extra login
uv run playwright install chromium   # one-time browser download

Clone it anywhere — nothing in the code assumes a location. --extra login is only needed to sign in; reading works with the base install once a session exists.

Works for any England Golf member: there is no shared account, key or club credential. Each person signs in as themselves.

Sign in

uv run england-golf-mcp login

A Chromium window opens at the My England Golf login. Enter your WHS membership number and password there (and clear any check England Golf asks for). When the member area loads, the window closes and the session is saved.

uv run england-golf-mcp status      # is the session still live?
uv run england-golf-mcp logout      # forget it

If an endpoint changes, capture the raw responses:

uv run england-golf-mcp discover --out samples

Use it as an MCP server

It speaks stdio by default (no arguments is serve).

OpenCode / Claude Code — add to your MCP config:

{
  "mcp": {
    "servers": {
      "eg": {
        "type": "local",
        "command": ["/absolute/path/to/england-golf-mcp/.venv/bin/england-golf-mcp", "serve"],
        "environment": { "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin" }
      }
    }
  }
}

Replace /absolute/path/to/england-golf-mcp with the clone from above.

Tools

Tool

Returns

eg_status

Whether a live session is stored, with its save time and the member name

eg_login / eg_logout

Start the browser sign-in / remove the stored session

eg_profile

Name, membership number, home club, region, percentiles

eg_handicap

Handicap Index, Low Index, scores counted/used; include_explanation adds the WHS breakdown

eg_scores

Score history: date, course, tee, gross, differential, points, competition flag; include_casual adds general-play rounds

eg_competitions

Competitions played: name, club, date, round, holes

All tools except login/logout are read-only.

Notes and limits

  • Session lifetime is England Golf's call. When the portal expires the cookies, eg_* tools return a not signed in error — run login again.

  • This is an internal API. It is stable enough in practice but undocumented; if a field disappears, discover shows the current payload and shape.py is the one place to adjust.

  • Keychain item is service england-golf-mcp, account session. It holds bearer cookies — treat it like a password.

  • One golfer per machine. The session is a single Keychain slot, not a multi-user store.

Privacy

  • The only credential stored is the portal session cookie, in the macOS Keychain.

  • Traffic goes to members.whsplatform.englandgolf.org and nowhere else. There is no telemetry, no server component, and no shared account.

  • samples/ holds raw API responses from your account; it is git-ignored. Never commit it.

  • Tests use a made-up member and club.

Development

uv sync --extra login
uv run pytest
uv run ruff check .

Layout:

src/england_golf_mcp/pages.py     page URLs + the four API paths
src/england_golf_mcp/keychain.py  macOS Keychain session storage
src/england_golf_mcp/session.py   browser login + status
src/england_golf_mcp/client.py    httpx portal client, 403 -> not signed in
src/england_golf_mcp/shape.py     JSON -> small, stable tool dicts
src/england_golf_mcp/service.py   endpoint calls per tool
src/england_golf_mcp/server.py    MCP tools + CLI
scripts/discover.py               save raw API responses for inspection

Licence

MIT.

Available Tools

7 tools
eg_competitionsC

Recent competition results: date, competition, position and score.

Inputs: limit. Returns: object

eg_handicapA

Current Handicap Index and Low Index.

include_explanation adds the portal's calculation breakdown (how many scores counted, soft/hard cap notes), which is long and usually not needed.

Inputs: include_explanation. Returns: object

eg_loginA

Open a browser for the user to sign in; store only the session cookies.

The user types their own WHS membership number and password in the window. Requires the optional login extra and a desktop session.

Inputs: force, timeout_seconds. Returns: object

eg_logoutA

Remove the stored session from the Keychain.

Inputs: no named parameters. Returns: object

eg_profileC

Name, membership number, home club and handicaps from the profile page.

Inputs: no named parameters. Returns: object

eg_scoresA

Score history: date, course, tee, gross, score differential, points.

include_casual includes casual/general-play rounds, which the portal hides from the handicap history view by default.

Inputs: limit, include_casual. Returns: object

eg_statusB

Whether the machine holds a live My England Golf session.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 7 tools

    Disambiguation4/5

    Session lifecycle (status/login/logout) and data retrieval (profile/handicap/scores/competitions) are clearly separated. Minor overlap: eg_profile also returns handicaps, which could be confused with eg_handicap, though the latter is clearly the detailed index tool.

    Naming Consistency5/5

    All tools use a consistent eg_ prefix with snake_case, and the verb/noun distinction is semantically meaningful: actions (login/logout/status) are verbs, data resources (profile/handicap/scores/competitions) are nouns.

    Tool Count5/5

    Seven tools is well-scoped for a read-only golf portal client: three for session management and four for distinct data views. Nothing is redundant or bloated.

    Completeness4/5

    Covers the core read path (session, profile, handicap, scores, competitions) with useful optional parameters. It is read-only with no score posting or certificate tool, but these are minor gaps for a portal viewer.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to access a ProTrainUp club account through its undocumented API and web panel, exposing read-only tools for calendars, motoric tests, exercises, conversations, team-wall posts, scheduled posts, event lists, and diary files. It also supports authenticated GET exploration without performing write operations.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to read a Concept2 Logbook account through MCP, covering training summaries, personal bests, workout lists, splits, intervals, stroke data and profile details. Access is read-only via an API key created after signing in with Concept2.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to query golf tournament leaderboards, hole-by-hole scorecards, course details, player profiles and stats, strokes-versus-field ratings, head-to-head records, and major winner odds across PGA Tour, LPGA, LIV, DP World Tour, and Korn Ferry Tour data.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to work with a user's signed-in Monograph account for project, staffing, budget, time, and billing tasks, with confirmation before sensitive actions. It exposes tools for guided status checks, reading and navigating Monograph screens, and forwarding tool calls to the hosted service.
      7
      Elastic 2.0