Skip to main content

Model Context Protocol

The API exposes a native MCP endpoint:

https://api.eae.golf/mcp

MCP uses the same Bearer API key, plan, trial catalogue, data-access policy and rate limits as the REST API.

Authentication

Send the API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Use the MCP endpoint only from environments where the credential can be kept secret. Do not expose a production API key in frontend JavaScript.

Available tools

The server currently exposes:

ToolPurpose
search_golf_clubsSearch by place, coordinates, access rules, green fee, holes and other supported filters.
get_golf_clubRetrieve one normalized golf club by slug.
get_golf_club_contextRetrieve compact, language-neutral context for a known club.

Tool schemas are discoverable through MCP tools/list. Clients should use the discovered schema rather than hard-coding tool arguments.

Available prompts

MCP prompts/list exposes these prompt definitions:

  • club-summary
  • visitor-briefing
  • club-comparison
  • club-recommendation
  • natural-language-search

Prompt definitions remain model-independent and follow the same rules for grounded answers and unknown values as the AI Toolkit.

Verify the connection

A raw MCP request can be used to verify tool discovery:

curl 'https://api.eae.golf/mcp' \
--request POST \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json, text/event-stream' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'

A successful response contains the registered tools.

Call a tool

For example, search for clubs near Berlin that allow independent players:

curl 'https://api.eae.golf/mcp' \
--request POST \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json, text/event-stream' \
--data '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "search_golf_clubs",
"arguments": {
"near": "Berlin",
"independent_players": true
}
}
}'

Tool results include MCP text content and structured content. Structured content preserves the normalized API response for clients that consume typed results directly.

Access rules

MCP does not bypass API entitlements. The authenticated client determines:

  • Fairway or Tour data access
  • trial or active catalogue
  • rate limits
  • access status

The same request therefore follows the same data policy whether it reaches the underlying functionality through REST or MCP.

MCP or AI Toolkit?

Use MCP when the AI client supports remote MCP and can securely send the Bearer credential. Tool and prompt discovery are handled through the protocol.

Use the AI Toolkit REST endpoints when the application controls its own model tool-calling loop or needs the definitions independently of MCP.

Both interfaces use the same normalized golf data and domain semantics.