Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .azure/containerization-plan.copilotmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Containerization Plan

## Goal
Set up a production-ready Docker image for this repository so it can run in containers, including the UI build assets required by the server and the Go runtime needed to execute the MCP server.

## List of services to be containerized
- github-mcp-server
- Language: Go
- Entrypoint: `./cmd/github-mcp-server`
- Runtime mode: default `stdio` transport, with optional HTTP mode supported via CLI flags
- Dependencies: Go modules, GitHub PAT or OAuth configuration via environment variables, optional UI assets built from the `ui/` Vite app
- Notes: uses a multi-stage build to compile the Go binary and bake UI output into the final image

## Execution Steps
1. Check containerization pre-requisites
- Confirm Docker is installed and the daemon is running.
2. Scan the repository
- Confirm the project is a Go server with a frontend UI build step.
3. Check the app is container-friendly
- Keep runtime configuration in environment variables instead of hardcoded values.
- Confirm required external dependencies are documented for deployment (GitHub auth and host configuration).
4. Create the Docker image
- Use a multi-stage build to compile the Go binary.
- Build the Vite UI in a Node stage and inject the generated assets into the Go build context.
5. Build and validate the image
- Run `docker build -t github-mcp-server:test .`.
- Verify the build succeeds and the resulting image can start the server entrypoint.
6. Summarize results
- Document that the repo is now container-ready and point to the Dockerfile and build validation evidence.

## Implementation notes
- The application is a Go CLI binary with a `stdio` server command as the default container entrypoint.
- It must be started with the correct environment variables such as `GITHUB_PERSONAL_ACCESS_TOKEN`, `GITHUB_HOST`, or OAuth-related settings.
- The repository includes a UI bundle generation step under `ui/`, so the Docker image needs both a Node build stage and a Go build stage.
- The production image should remain lean by copying only the final binary and required runtime assets.

## Recommended build command
```bash
docker build --progress=plain -t github-mcp-server:test .
```

## Validation status
This repository already contains a working multi-stage Dockerfile, and the image has been validated with the build command above.
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"cwd": "${workspaceFolder}",
"program": "cmd/github-mcp-server/main.go",
"args": ["stdio"],
"console": "integratedTerminal",
"console": "integratedTerminal"
},
{
"name": "Launch stdio server (read-only)",
Expand All @@ -22,7 +22,7 @@
"cwd": "${workspaceFolder}",
"program": "cmd/github-mcp-server/main.go",
"args": ["stdio", "--read-only"],
"console": "integratedTerminal",
"console": "integratedTerminal"
},
{
"name": "Launch http server",
Expand All @@ -32,7 +32,7 @@
"cwd": "${workspaceFolder}",
"program": "cmd/github-mcp-server/main.go",
"args": ["http", "--port", "8082"],
"console": "integratedTerminal",
"console": "integratedTerminal"
}
]
}