Let’s get you started with your first GolfMCP project from scratch.Documentation Index
Fetch the complete documentation index at: https://docs.golf.dev/llms.txt
Use this file to discover all available pages before exploring further.
Initialize your project
Create a new GolfMCP project using the This will create a new directory named
init command:my_awesome_server with the following structure:golf.json: Configures your server’s name, port, transport, etc. (see Configuration)auth.py: Dedicated file for authentication setup (see Authentication)tools/,resources/,prompts/: Directories where you’ll define your server’s capabilities (see Component Specification)
Set up authentication
The boilerplate example includes a tool that requires authentication. Golf v0.2.0 offers three authentication methods (for complete details, see Authentication):
- API key authentication
- Development authentication
- JWT authentication (Production)
-
Configure API key authentication in
auth.py: - Pass the token when connecting your MCP client
-
Access the API key in your tools using:
Create your first tool
Let’s modify the example “hello” tool. Open For more details on tool structure, parameters, and advanced patterns, see the Component Specification.
tools/hello.py:Build for development
Compile your project for development:This command builds the actual MCP server.
Next Steps
Now that you have a working MCP server, learn how to test it comprehensively:- Test your server - Use mcp-t to validate your implementation
- Set up automated testing - Create test suites for CI/CD
- Learn testing philosophy - Understand why traditional testing fails for MCP