Configuration reference
The golf.json
file is the main configuration file for your Golf project. Place this file in your project root directory to configure your MCP server.
The name of your MCP server instance.
A brief description of your Golf project.
The network interface the server will bind to.
The port number the server will listen on.
The transport protocol for client-server communication.
Options:
"sse"
- Server-Sent Events"streamable-http"
- HTTP with streaming support"stdio"
- Standard input/output
Enable OpenTelemetry distributed tracing for your MCP server.
The default exporter to use for OpenTelemetry traces when enabled.
Options:
"otlp_http"
- OTLP HTTP exporter (for Jaeger, Grafana Tempo, etc.)"console"
- Console exporter (for debugging)
When using otlp_http
, you must set the OTEL_EXPORTER_OTLP_ENDPOINT
environment variable. See the environment variables section below.
Example configuration
Environment variables for OpenTelemetry
When OpenTelemetry is enabled, configure these environment variables in your .env
file:
Required for OTLP HTTP exporter
The endpoint URL for your OpenTelemetry collector.
Example: http://localhost:4318/v1/traces
Optional
The service name for traces. Defaults to the name
from golf.json.
Additional headers for the OTLP exporter.
Example: Authorization=Bearer your-token
Override the exporter type.
Example: console
for debugging
Example .env
file
The {{project_name}}
placeholder will be replaced with your actual project name when you run golf init
.