- 
                Notifications
    You must be signed in to change notification settings 
- Fork 130
Add command to bootstrap an MCP Server with a template #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    6d98110    to
    143d0f6      
    Compare
  
    Introduces `docker mcp server init <directory>` command to scaffold complete MCP server projects with ChatGPT App integration. Command features: - Creates project structure in specified directory - --language=go flag (only Go supported currently) - Validates empty directory and language support - Customizes all files based on directory name Generated project includes: - main.go: MCP server with greet tool and UI resource - ui.html: Interactive ChatGPT App UI with dropdown (Hi/Hey/Hello) and form - Dockerfile: Multi-stage build with git for Go dependencies - compose.yaml: Streaming gateway on port 8811, auth disabled (DOCKER_MCP_IN_CONTAINER=1) - catalog.yaml: Server registry entry - go.mod: Module with MCP SDK v1.0.0 - README.md: Complete documentation ChatGPT App features: - UI registered as resource at ui://greeter/widget.html with text/html+skybridge MIME type - Tool metadata: openai/outputTemplate, openai/widgetAccessible, openai/toolInvocation/invoking - Greet tool with name and greetingType parameters - Returns structured data for UI consumption - UI uses window.openai.callTool() API for real tool invocation - Dropdown, text input, styled button, animated responses 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5ae5716    to
    97fc3bc      
    Compare
  
    Restructures the `docker mcp server init` command to use file-based templates
instead of embedded constants, making it easier to maintain and extend.
Changes:
- Created two template directories:
  - templates/basic: Simple MCP server without UI
  - templates/chatgpt-app-basic: MCP server with ChatGPT App UI
- Each template has separate .tmpl files for all generated files
- Refactored init.go to use go:embed and text/template
- Added required --template flag to init command
- Template files use {{.ServerName}} for customization
Templates:
- basic: Simple greeter with single name parameter, no UI
- chatgpt-app-basic: Greeter with dropdown (Hi/Hey/Hello), UI resource,
  and full ChatGPT App integration
Usage:
- docker mcp server init --template=basic my-server
- docker mcp server init --template=chatgpt-app-basic my-app
Benefits:
- Easy to add new templates (just create new folder)
- Templates are actual files, easier to edit and test
- Clear separation between basic and ChatGPT App templates
- Better error messages for invalid templates
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
    97fc3bc    to
    0009501      
    Compare
  
    ee760ad    to
    686e671      
    Compare
  
    686e671    to
    d8e2cf4      
    Compare
  
    
              
                    saucow
  
              
              approved these changes
              
                  
                    Oct 30, 2025 
                  
              
              
            
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Summary
Adds a
docker mcp server init --template=<X>command that scaffolds an MCP server project given a template name. This PR contains two templates: "basic" and "chatgpt-app-basic".docker mcp server init my-server --template=basicdocker mcp server init my-chatgpt-app --template=chatgpt-app-basicExample Usage
Create, build and run a new ChatGPT app:
Now give it a public UI with ngrok:
ngrok http 8811Open the ChatGPT Settings page on ChatGPT.com (not the app), then click on the "Apps and Connectors" section.
Ensure Developer Mode is enabled at the bottom and click the "Create" button at the top right of the settings pane.
Give the connector a name ("UI Test" in this example) and add the ngrok URL. Set the "Authentication" to None
The created connector should look like this:

Then ask ChatGPT to call the tool "call the greet tool from the UI test server":

After you select a greeting and specify a name within the ChatGPT UI, click "Greet Me" and the tool call will be made.