golf
by golf-mcp
Overview
Golf is a Python framework for building MCP (Model Context Protocol) servers, allowing developers to define tools, resources, and prompts as Python files to create runnable AI agent backends.
Installation
golf runEnvironment Variables
- JWT_PUBLIC_KEY
- JWKS_URI
- JWT_ISSUER
- JWT_AUDIENCE
- OAUTH_BASE_URL
- OAUTH_AUTH_ENDPOINT
- OAUTH_TOKEN_ENDPOINT
- OAUTH_CLIENT_ID
- OAUTH_CLIENT_SECRET
- AUTH_SERVERS
- RESOURCE_URL
- API_KEY
- WEATHER_API_KEY
- WEATHER_API_URL
- WEATHER_TEMP_UNIT
- HOST
- PORT
- GOLF_TELEMETRY
- OTEL_TRACES_EXPORTER
- OTEL_EXPORTER_OTLP_ENDPOINT
Security Notes
The `src/golf/examples/basic/tools/calculator.py` tool uses `eval()` to evaluate mathematical expressions. While it attempts to sanitize input with a character whitelist, `eval()` is inherently dangerous when processing untrusted input as it can lead to arbitrary code execution if not handled with extreme care and robust sanitization. The framework dynamically loads and executes user-provided `startup.py`, `middleware.py`, `health.py`, and `readiness.py` files, which means the overall security of a deployed server heavily depends on the security practices within the user's own project code. A default PostHog API key for anonymous telemetry is hardcoded in `src/golf/core/telemetry.py`, though it's a public client-side key and can be overridden by an environment variable. OAuth configurations include robust URL validation to mitigate SSRF and enforce HTTPS in production, which is a good security practice.
Similar Servers
zenfeed
An AI-powered information hub that acts as an intelligent RSS reader, real-time news knowledge base, and personal assistant for monitoring events and delivering analysis reports.
cupertino
Local Apple Developer documentation crawler and Model Context Protocol (MCP) server for AI agents, providing offline access and structured API information.
biomedmcp
A biomedical research Model Context Protocol (MCP) server and an autonomous research agent that uses local LLMs to search PubMed and the web for medical questions, providing evidence-based answers with citations.
PDFlow
Transform PDF documents into structured data (Markdown, JSON, XML, etc.) using multimodal AI, with web UI, CLI, and AI agent integration.