golf-mcp 0.1.7__tar.gz → 0.1.8__tar.gz

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.

Potentially problematic release.


This version of golf-mcp might be problematic. Click here for more details.

Files changed (71) hide show
  1. {golf_mcp-0.1.7/src/golf_mcp.egg-info → golf_mcp-0.1.8}/PKG-INFO +41 -2
  2. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/README.md +40 -1
  3. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/pyproject.toml +2 -2
  4. golf_mcp-0.1.8/src/golf/__init__.py +1 -0
  5. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/core/builder.py +233 -278
  6. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/core/builder_auth.py +149 -43
  7. golf_mcp-0.1.8/src/golf/core/builder_telemetry.py +73 -0
  8. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/core/telemetry.py +50 -8
  9. golf_mcp-0.1.8/src/golf/examples/api_key/.env.example +5 -0
  10. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/api_key/golf.json +3 -1
  11. golf_mcp-0.1.8/src/golf/examples/basic/.env.example +5 -0
  12. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/golf.json +3 -1
  13. golf_mcp-0.1.8/src/golf/telemetry/__init__.py +19 -0
  14. golf_mcp-0.1.8/src/golf/telemetry/instrumentation.py +540 -0
  15. {golf_mcp-0.1.7 → golf_mcp-0.1.8/src/golf_mcp.egg-info}/PKG-INFO +41 -2
  16. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf_mcp.egg-info/SOURCES.txt +3 -0
  17. golf_mcp-0.1.7/src/golf/__init__.py +0 -1
  18. golf_mcp-0.1.7/src/golf/core/builder_telemetry.py +0 -208
  19. golf_mcp-0.1.7/src/golf/examples/basic/.env.example +0 -3
  20. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/.docs/docs.md +0 -0
  21. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/.docs/fast-mcp.md +0 -0
  22. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/.docs/fastmcp-example-1.py +0 -0
  23. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/.docs/fastmcp-example-2.py +0 -0
  24. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/.docs/mcp.md +0 -0
  25. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/.docs/oauth-implementation.md +0 -0
  26. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/.docs/oauth.md +0 -0
  27. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/LICENSE +0 -0
  28. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/MANIFEST.in +0 -0
  29. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/setup.cfg +0 -0
  30. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/auth/__init__.py +0 -0
  31. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/auth/api_key.py +0 -0
  32. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/auth/helpers.py +0 -0
  33. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/auth/oauth.py +0 -0
  34. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/auth/provider.py +0 -0
  35. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/cli/__init__.py +0 -0
  36. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/cli/main.py +0 -0
  37. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/commands/__init__.py +0 -0
  38. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/commands/build.py +0 -0
  39. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/commands/init.py +0 -0
  40. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/commands/run.py +0 -0
  41. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/core/__init__.py +0 -0
  42. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/core/config.py +0 -0
  43. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/core/parser.py +0 -0
  44. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/core/transformer.py +0 -0
  45. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/__init__.py +0 -0
  46. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/api_key/.env +0 -0
  47. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/api_key/README.md +0 -0
  48. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/api_key/pre_build.py +0 -0
  49. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/api_key/tools/issues/create.py +0 -0
  50. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/api_key/tools/issues/list.py +0 -0
  51. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/api_key/tools/repos/list.py +0 -0
  52. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/api_key/tools/search/code.py +0 -0
  53. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/api_key/tools/users/get.py +0 -0
  54. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/.env +0 -0
  55. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/README.md +0 -0
  56. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/pre_build.py +0 -0
  57. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/prompts/welcome.py +0 -0
  58. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/resources/current_time.py +0 -0
  59. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/resources/info.py +0 -0
  60. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/resources/weather/common.py +0 -0
  61. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/resources/weather/current.py +0 -0
  62. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/resources/weather/forecast.py +0 -0
  63. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/tools/github_user.py +0 -0
  64. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/tools/hello.py +0 -0
  65. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/tools/payments/charge.py +0 -0
  66. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/tools/payments/common.py +0 -0
  67. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf/examples/basic/tools/payments/refund.py +0 -0
  68. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf_mcp.egg-info/dependency_links.txt +0 -0
  69. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf_mcp.egg-info/entry_points.txt +0 -0
  70. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf_mcp.egg-info/requires.txt +0 -0
  71. {golf_mcp-0.1.7 → golf_mcp-0.1.8}/src/golf_mcp.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: golf-mcp
3
- Version: 0.1.7
3
+ Version: 0.1.8
4
4
  Summary: Framework for building MCP servers
5
5
  Author-email: Antoni Gmitruk <antoni@golf.dev>
6
6
  License-Expression: Apache-2.0
@@ -177,6 +177,11 @@ The `golf.json` file is the heart of your Golf project configuration. Here's wha
177
177
  // - "sse": Server-Sent Events (recommended for web clients)
178
178
  // - "streamable-http": HTTP with streaming support
179
179
  // - "stdio": Standard I/O (for CLI integration)
180
+
181
+ // OpenTelemetry Configuration (optional)
182
+ "opentelemetry_enabled": false, // Enable distributed tracing
183
+ "opentelemetry_default_exporter": "console" // Default exporter if OTEL_TRACES_EXPORTER not set
184
+ // Options: "console", "otlp_http"
180
185
  }
181
186
  ```
182
187
 
@@ -188,12 +193,46 @@ The `golf.json` file is the heart of your Golf project configuration. Here's wha
188
193
  - `"streamable-http"` provides HTTP streaming for traditional API clients
189
194
  - `"stdio"` enables integration with command-line tools and scripts
190
195
  - **`host` & `port`**: Control where your server listens. Use `"127.0.0.1"` for local development or `"0.0.0.0"` to accept external connections.
196
+ - **`opentelemetry_enabled`**: When true, enables distributed tracing for debugging and monitoring your MCP server
197
+ - **`opentelemetry_default_exporter`**: Sets the default trace exporter. Can be overridden by the `OTEL_TRACES_EXPORTER` environment variable
198
+
199
+ ## Features
200
+
201
+ ### 🔍 OpenTelemetry Support
202
+
203
+ Golf includes built-in OpenTelemetry instrumentation for distributed tracing. When enabled, it automatically traces:
204
+ - Tool executions with arguments and results
205
+ - Resource reads and template expansions
206
+ - Prompt generations
207
+ - HTTP requests and sessions
208
+
209
+ #### Configuration
210
+
211
+ Enable OpenTelemetry in your `golf.json`:
212
+ ```json
213
+ {
214
+ "opentelemetry_enabled": true,
215
+ "opentelemetry_default_exporter": "otlp_http"
216
+ }
217
+ ```
218
+
219
+ Then configure via environment variables:
220
+ ```bash
221
+ # For OTLP HTTP exporter (e.g., Jaeger, Grafana Tempo)
222
+ OTEL_TRACES_EXPORTER=otlp_http
223
+ OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318/v1/traces
224
+ OTEL_SERVICE_NAME=my-golf-server # Optional, defaults to project name
225
+
226
+ # For console exporter (debugging)
227
+ OTEL_TRACES_EXPORTER=console
228
+ ```
229
+
230
+ **Note**: When using the OTLP HTTP exporter, you must set `OTEL_EXPORTER_OTLP_ENDPOINT`. If not configured, Golf will display a warning and disable tracing to avoid errors.
191
231
 
192
232
  ## Roadmap
193
233
 
194
234
  Here are the things we are working hard on:
195
235
 
196
- * **Native OpenTelemetry implementation for tracing**
197
236
  * **`golf deploy` command for one click deployments to Vercel, Blaxel and other providers**
198
237
  * **Production-ready OAuth token management, to allow for persistent, encrypted token storage and client mapping**
199
238
 
@@ -139,6 +139,11 @@ The `golf.json` file is the heart of your Golf project configuration. Here's wha
139
139
  // - "sse": Server-Sent Events (recommended for web clients)
140
140
  // - "streamable-http": HTTP with streaming support
141
141
  // - "stdio": Standard I/O (for CLI integration)
142
+
143
+ // OpenTelemetry Configuration (optional)
144
+ "opentelemetry_enabled": false, // Enable distributed tracing
145
+ "opentelemetry_default_exporter": "console" // Default exporter if OTEL_TRACES_EXPORTER not set
146
+ // Options: "console", "otlp_http"
142
147
  }
143
148
  ```
144
149
 
@@ -150,12 +155,46 @@ The `golf.json` file is the heart of your Golf project configuration. Here's wha
150
155
  - `"streamable-http"` provides HTTP streaming for traditional API clients
151
156
  - `"stdio"` enables integration with command-line tools and scripts
152
157
  - **`host` & `port`**: Control where your server listens. Use `"127.0.0.1"` for local development or `"0.0.0.0"` to accept external connections.
158
+ - **`opentelemetry_enabled`**: When true, enables distributed tracing for debugging and monitoring your MCP server
159
+ - **`opentelemetry_default_exporter`**: Sets the default trace exporter. Can be overridden by the `OTEL_TRACES_EXPORTER` environment variable
160
+
161
+ ## Features
162
+
163
+ ### 🔍 OpenTelemetry Support
164
+
165
+ Golf includes built-in OpenTelemetry instrumentation for distributed tracing. When enabled, it automatically traces:
166
+ - Tool executions with arguments and results
167
+ - Resource reads and template expansions
168
+ - Prompt generations
169
+ - HTTP requests and sessions
170
+
171
+ #### Configuration
172
+
173
+ Enable OpenTelemetry in your `golf.json`:
174
+ ```json
175
+ {
176
+ "opentelemetry_enabled": true,
177
+ "opentelemetry_default_exporter": "otlp_http"
178
+ }
179
+ ```
180
+
181
+ Then configure via environment variables:
182
+ ```bash
183
+ # For OTLP HTTP exporter (e.g., Jaeger, Grafana Tempo)
184
+ OTEL_TRACES_EXPORTER=otlp_http
185
+ OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318/v1/traces
186
+ OTEL_SERVICE_NAME=my-golf-server # Optional, defaults to project name
187
+
188
+ # For console exporter (debugging)
189
+ OTEL_TRACES_EXPORTER=console
190
+ ```
191
+
192
+ **Note**: When using the OTLP HTTP exporter, you must set `OTEL_EXPORTER_OTLP_ENDPOINT`. If not configured, Golf will display a warning and disable tracing to avoid errors.
153
193
 
154
194
  ## Roadmap
155
195
 
156
196
  Here are the things we are working hard on:
157
197
 
158
- * **Native OpenTelemetry implementation for tracing**
159
198
  * **`golf deploy` command for one click deployments to Vercel, Blaxel and other providers**
160
199
  * **Production-ready OAuth token management, to allow for persistent, encrypted token storage and client mapping**
161
200
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "golf-mcp"
7
- version = "0.1.7"
7
+ version = "0.1.8"
8
8
  description = "Framework for building MCP servers"
9
9
  authors = [
10
10
  {name = "Antoni Gmitruk", email = "antoni@golf.dev"}
@@ -64,7 +64,7 @@ golf = ["examples/**/*"]
64
64
 
65
65
  [tool.poetry]
66
66
  name = "golf-mcp"
67
- version = "0.1.7"
67
+ version = "0.1.8"
68
68
  description = "Framework for building MCP servers with zero boilerplate"
69
69
  authors = ["Antoni Gmitruk <antoni@golf.dev>"]
70
70
  license = "Apache-2.0"
@@ -0,0 +1 @@
1
+ __version__ = "0.1.8"