← Back to Leaderboard
Ggolf-mcp

golf-mcp/golf

A convention-driven Python framework that turns modules into MCP servers

Engineering Health (Methodology)
B+ · 72/100
Maintenance Activity
● Updated 2mo ago
Latest Release
v0.4.1
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance20/35
Fork Adoption15/25
Release Cadence17/20
License Clarity20/20
Self-HostedMCPCLIAPI
Total Stars
★ 841
24h Growth
+0
7d Growth
+0
Forks
74

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

golf-mcp/golf Star History (2025-02-23 - 2026-12-03) ALL-TIME STAR HISTORY (2025-02 – 2026-12) +840 in 648d · avg +1/day 888 444 0 2025-02-23: ★ 12025-04-05: ★ 722025-05-17: ★ 1162025-06-28: ★ 6172025-08-09: ★ 7072025-09-20: ★ 7632025-11-01: ★ 7782025-12-13: ★ 7912026-01-24: ★ 7972026-03-07: ★ 8032026-04-18: ★ 8122026-05-30: ★ 8232026-07-11: ★ 8292026-08-22: ★ 8342026-10-03: ★ 8382026-12-03: ★ 841 ★ 841 2025-02 2026-01 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Golf is a convention-driven Python framework that builds a runnable MCP server on FastMCP. The CLI scaffolds the project, and the build discovers and parses Python components under tools/, resources/, and prompts/. The manifest pins fastmcp==4.0.0 and constrains mcp-types to >=2.1.1,<3.0.0; it also lists Typer, Rich, Pydantic, and pydantic-settings.

In the tool pattern, export points to the entry function. Golf takes the description from the module docstring, infers inputs from the function signature, and can use a Pydantic return model to define the output schema. Default IDs derive from paths: tools/payments/submit.py becomes submit_payments. Capability naming decorators provide an alternative to path-derived names. Server settings live in golf.json, while authentication is configured separately in auth.py.

Key Capabilities & Differentiators

Golf targets MCP 2026-07-28, with legacy client negotiation handled by FastMCP. On the current protocol, sampling and elicitation are caller-driven multi-round interactions: declare InputRequiredResult in the tool's return type, propagate it unchanged, and handle re-entry when the caller supplies an answer. A nested helper does not resume the enclosing tool transparently. Legacy connections retain imperative requests.

auth.py supports JWT, OAuth Server, API keys, and development tokens. JWT setup can bind tokens to the MCP resource through an audience and check required scopes. The v0.3.0 release added Starlette middleware discovery and registration. OpenTelemetry tracing can be enabled separately; detailed tracing can collect inputs and outputs, so treat it as a data-handling decision, not just a debugging switch.

Trade-offs & Limitations

Compared with using FastMCP directly, Golf trades explicit registration for a common directory layout, discovery rules, and a build step. Those conventions reduce repeated setup across multiple MCP servers, but a file move or rename can change a path-derived ID and break clients that use it. Use explicit names where client contracts must remain stable, and verify the registered capabilities before shipping a reorganization.

The FastMCP pin makes the framework version predictable but limits independent upgrades. Compatibility negotiation helps with older clients, but it does not erase the different sampling and elicitation control flow; test both paths if you support both. The package is classified as Alpha, so validate parser behavior, authentication, and client compatibility in staging before committing to a production rollout. Apache-2.0 permits commercial use and self-hosting, but does not replace that validation.

Hardware & Deployment Guide

Use Python 3.10 or newer. Install with pip install golf-mcp, scaffold with golf init your-project-name, then enter the project directory and run golf build dev followed by golf run. The example configuration listens on localhost:3000. Use Streamable HTTP for a hosted endpoint or stdio for a client-launched process; SSE is deprecated. stateless_http is a legacy setting, not a prerequisite for the sessionless 2026-07-28 protocol.

For a network deployment, configure production authentication before exposing the endpoint, and do not forward inbound MCP bearer tokens to upstream APIs. Keep CLI usage telemetry separate from server traces: golf telemetry disable persists the CLI opt-out. Release v0.3.0 moved to FastMCP 3.x and added middleware discovery; v0.4.0 introduced FastMCP 4 support across current and legacy protocol versions; v0.4.1 fixed parsing of typed and dict() tool annotations. On upgrades, verify the schemas your clients actually receive.

Discovery: Golf builds a runnable server from Python modules in tools/, resources/, and prompts/; default IDs derive from paths.
Schemas: A tool exports its entry function as export; Golf infers inputs from the signature and can use a Pydantic return model for output.
Protocol: FastMCP 4.0.0 targets sessionless MCP 2026-07-28 and negotiates older clients through compatibility mode.
Client interaction: Under MCP 2026-07-28, tools must return InputRequiredResult unchanged and handle re-entry with the client's answer.
Authentication: auth.py supports JWT, OAuth Server, API keys, and development tokens; JWT validation requires a resource audience.
Observability: OpenTelemetry tracing is configurable independently of CLI usage telemetry; detailed tracing can capture tool inputs and outputs.
Best For

Python teams standardizing self-hosted MCP tool, resource, and prompt servers that want CLI scaffolding, shared authentication configuration, and a clear stdio-to-HTTP deployment path.

Skip If

You already have a small FastMCP service with straightforward explicit registration, need independent control of FastMCP upgrades, or cannot take on alpha-stage compatibility testing.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

Self-HostedMCPCLIAPI
pip install golf-mcp

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
golf ★841—PythonApache-2.0A convention-driven Python framework that turns modules into MCP servers
headroom81.5k+455PythonApache-2.0Local context compression for LLMs via a Python library, proxy, and MCP server
goose57.3k+219RustApache-2.0Rust coding agent with MCP tools and local or hosted models, embeddable via ACP
mcp-for-blender37.1k+1.1kPythonGPL-3.0A local MCP bridge for inspecting and editing live Blender scenes with AI

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/golf-mcp/golf.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

golf-mcp/golf Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about golf

How does a Python function become a tool an MCP client can call?

Put a Python module in tools/ and assign its entry function to export. Golf discovers the module, derives the default tool ID from its path, uses the module docstring as the description, and infers the input schema from the function signature. A Pydantic return model can define the output schema. Use stdio for a client-launched process or Streamable HTTP for a separately hosted endpoint.

Does Golf need a GPU, and how should I size a deployment?

Golf's Python/FastMCP server layer has no documented GPU requirement, and no CPU or memory minimum is specified. Start with CPU-based hosting and size it using representative tool payloads and concurrency. Account separately for any local inference added by your own tools; that workload, not Golf's MCP layer, determines whether you need a GPU and how much VRAM it needs.

Can I self-host Golf commercially, and what should I check for compliance?

Yes. Apache-2.0 permits commercial use and self-hosting. If you redistribute the software, comply with the applicable license and notice requirements. Separately, review how you handle credentials and trace payloads. Use golf telemetry disable to persistently opt out of CLI usage telemetry; configure server-side OpenTelemetry independently.

When should I choose Golf rather than use FastMCP directly?

Choose Golf when the CLI scaffold, filesystem discovery, and project conventions replace registration and configuration you would otherwise maintain yourself. Use FastMCP directly when you want explicit registration or need to choose a FastMCP version independently. Golf v0.4.1 pins FastMCP 4.0.0, and Golf's discovery conventions and build step become part of your release workflow.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining golf-mcp/golf? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature golf-mcp/golf on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare