Skip to content

refactor: move logic out of main into command handlers to simplify#179

Open
wolfeidau wants to merge 5 commits intomainfrom
refactor_flags_and_http
Open

refactor: move logic out of main into command handlers to simplify#179
wolfeidau wants to merge 5 commits intomainfrom
refactor_flags_and_http

Conversation

@wolfeidau
Copy link
Member

@wolfeidau wolfeidau commented Oct 28, 2025

Moved API client initialization from main.go into individual command handlers (http.go and stdio.go), this enables better seperation of concerns and http specific features.

Example logs from the new HTTP middleware are as follows:

{"level":"info","version":"dev","time":"2026-01-09T16:59:49+11:00","message":"Starting Buildkite MCP server"}
{"level":"info","enabled_toolsets":["all"],"read_only":false,"tool_count":28,"required_scopes":["read_artifacts","read_build_logs","read_builds","read_clusters","read_organizations","read_pipelines","read_suites","read_user","write_builds","write_pipelines"],"time":"2026-01-09T16:59:49+11:00","message":"Registered tools from toolsets"}
{"level":"info","address":"127.0.0.1:3333","time":"2026-01-09T16:59:49+11:00","message":"starting HTTP server"}
{"level":"info","method":"POST","path":"/mcp","status":200,"duration_ms":2177.004167,"client_ip":"127.0.0.1:60001","user_agent":"curl/8.7.1","time":"2026-01-09T16:59:58+11:00","message":"HTTP request"}

Moved API client initialization from main.go into individual command handlers (http.go and stdio.go), this enables better seperation of concerns and http specific features.
@wolfeidau wolfeidau force-pushed the refactor_flags_and_http branch from 8ca633b to 4a9bd49 Compare January 9, 2026 05:25
@wolfeidau wolfeidau marked this pull request as ready for review January 9, 2026 08:40
@wolfeidau wolfeidau requested a review from catkins January 9, 2026 08:40
@wolfeidau wolfeidau requested a review from scadu January 9, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants