@opengolfapi/mcp-server 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -8
- package/dist/index.js +13 -6
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -63,9 +63,21 @@ Donor tiers raise the daily limit further (10k / 50k / 250k / 1M).
|
|
|
63
63
|
|
|
64
64
|
## Telemetry
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
This server reports unhandled errors to the OpenGolfAPI Sentry project by default so the maintainers can catch bugs that hit real users. **No request bodies, no API keys, no PII** — only stack traces of exceptions thrown inside the server process. Quotas and sampling live in the Sentry project config; the DSN is an ingest endpoint, not a secret.
|
|
67
|
+
|
|
68
|
+
To opt out completely:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
OPENGOLFAPI_DISABLE_TELEMETRY=1 npx @opengolfapi/mcp-server
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
To send to your own Sentry project instead (overrides the default DSN):
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
SENTRY_DSN=https://your-dsn@sentry.io/... npx @opengolfapi/mcp-server
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Example MCP config:
|
|
69
81
|
|
|
70
82
|
```json
|
|
71
83
|
{
|
|
@@ -74,17 +86,13 @@ running the server.
|
|
|
74
86
|
"command": "npx",
|
|
75
87
|
"args": ["@opengolfapi/mcp-server"],
|
|
76
88
|
"env": {
|
|
77
|
-
"OPENGOLFAPI_KEY": "ogapi_yourkeyhere"
|
|
78
|
-
"SENTRY_DSN": "https://<key>@o<org>.ingest.sentry.io/<project>"
|
|
89
|
+
"OPENGOLFAPI_KEY": "ogapi_yourkeyhere"
|
|
79
90
|
}
|
|
80
91
|
}
|
|
81
92
|
}
|
|
82
93
|
}
|
|
83
94
|
```
|
|
84
95
|
|
|
85
|
-
When `SENTRY_DSN` is unset the SDK is a complete no-op — nothing is initialized
|
|
86
|
-
and no network calls are made.
|
|
87
|
-
|
|
88
96
|
## License
|
|
89
97
|
|
|
90
98
|
MIT
|
package/dist/index.js
CHANGED
|
@@ -12,13 +12,20 @@
|
|
|
12
12
|
* Install: npx @opengolfapi/mcp-server
|
|
13
13
|
*/
|
|
14
14
|
// Sentry must initialize BEFORE any other imports that could throw, so any
|
|
15
|
-
// load-time error in transitive deps still gets captured.
|
|
16
|
-
//
|
|
17
|
-
//
|
|
15
|
+
// load-time error in transitive deps still gets captured.
|
|
16
|
+
//
|
|
17
|
+
// Default DSN ships baked-in so we get bug telemetry from every install — a
|
|
18
|
+
// Sentry DSN is designed to be public (it's an ingest endpoint, not a secret).
|
|
19
|
+
// Users can override with SENTRY_DSN, or opt out completely with
|
|
20
|
+
// OPENGOLFAPI_DISABLE_TELEMETRY=1.
|
|
18
21
|
import * as Sentry from '@sentry/node';
|
|
19
|
-
|
|
22
|
+
const DEFAULT_SENTRY_DSN = 'https://2cb261cd86bbfe9e105309d3c2edbced@o4511071885000704.ingest.us.sentry.io/4511345201315840';
|
|
23
|
+
const SENTRY_DSN_ACTIVE = process.env.OPENGOLFAPI_DISABLE_TELEMETRY
|
|
24
|
+
? ''
|
|
25
|
+
: (process.env.SENTRY_DSN || DEFAULT_SENTRY_DSN);
|
|
26
|
+
if (SENTRY_DSN_ACTIVE) {
|
|
20
27
|
Sentry.init({
|
|
21
|
-
dsn:
|
|
28
|
+
dsn: SENTRY_DSN_ACTIVE,
|
|
22
29
|
tracesSampleRate: 0.1,
|
|
23
30
|
release: `opengolfapi-mcp-server@${process.env.npm_package_version || 'unknown'}`,
|
|
24
31
|
});
|
|
@@ -27,7 +34,7 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
27
34
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
28
35
|
import { z } from 'zod';
|
|
29
36
|
// Package version — used in User-Agent so the API can identify MCP traffic.
|
|
30
|
-
const PKG_VERSION = '2.2.
|
|
37
|
+
const PKG_VERSION = '2.2.3';
|
|
31
38
|
const API_BASE = process.env.OPENGOLFAPI_BASE ?? 'https://api.opengolfapi.org';
|
|
32
39
|
// Optional API key for higher rate limits. Anonymous (no key) still works
|
|
33
40
|
// at 1k req/day per IP. With a free key from courses.opengolfapi.org/api-keys,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengolfapi/mcp-server",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "Open MCP server for AI agents to query the OpenGolfAPI dataset (14,708 US golf courses, ODbL)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
15
|
"build": "tsc",
|
|
16
|
-
"prepublishOnly": "npm
|
|
16
|
+
"prepublishOnly": "npm test",
|
|
17
|
+
"test": "npm run build && vitest run"
|
|
17
18
|
},
|
|
18
19
|
"repository": {
|
|
19
20
|
"type": "git",
|
|
@@ -38,6 +39,7 @@
|
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@types/node": "^20.0.0",
|
|
41
|
-
"typescript": "^5.0.0"
|
|
42
|
+
"typescript": "^5.0.0",
|
|
43
|
+
"vitest": "^4.1.5"
|
|
42
44
|
}
|
|
43
45
|
}
|