Skip to main content
Glama
opengolfapi

OpenGolfAPI MCP Server

Official
by opengolfapi

@opengolfapi/mcp-server

Open MCP server for AI agents to query the OpenGolfAPI dataset (14,708 US golf courses). All data is ODbL licensed and open.

All requests go through the public API at https://api.opengolfapi.org. With an optional OPENGOLFAPI_KEY, requests authenticate as your tier and unlock higher rate limits.

Install

npm install -g @opengolfapi/mcp-server

Configure

Add to your MCP client config:

{
  "mcpServers": {
    "opengolfapi": {
      "command": "opengolfapi-mcp"
    }
  }
}

API keys (optional)

Optional: higher rate limits with a free key

Without a key, the MCP server uses anonymous access (1,000 requests/day per IP).

Get a free key at https://courses.opengolfapi.org/api-keys (~30 seconds, no card), then set:

export OPENGOLFAPI_KEY=ogapi_yourkeyhere

In Claude Desktop's MCP config, add the env var to the server entry:

{
  "mcpServers": {
    "opengolfapi": {
      "command": "npx",
      "args": ["@opengolfapi/mcp-server"],
      "env": { "OPENGOLFAPI_KEY": "ogapi_yourkeyhere" }
    }
  }
}

Donor tiers raise the daily limit further (10k / 50k / 250k / 1M).

Tools

  • search_courses(query, state?, lat?, lng?, radius_mi?) — find courses by name, state, or location

  • get_course(id) — full course record with scorecard (par + handicap index per hole)

  • get_tees(id) — all tee sets with ratings, slopes, and yardages

  • get_climate(id) — monthly climate normals for the course location

  • get_nearby(id) — nearby POIs (hotels, restaurants, airports)

Telemetry

Optional: set SENTRY_DSN env var to send errors to your own Sentry instance. We do not collect telemetry from end users — this is opt-in for the operator running the server.

{
  "mcpServers": {
    "opengolfapi": {
      "command": "npx",
      "args": ["@opengolfapi/mcp-server"],
      "env": {
        "OPENGOLFAPI_KEY": "ogapi_yourkeyhere",
        "SENTRY_DSN": "https://<key>@o<org>.ingest.sentry.io/<project>"
      }
    }
  }
}

When SENTRY_DSN is unset the SDK is a complete no-op — nothing is initialized and no network calls are made.

License

MIT

Install Server
A
license - permissive license
A
quality
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/opengolfapi/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server