Wire Harbor MCP declarations into task toolsets - #2546
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ac93a416a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9ac93a4. Configure here.
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR adds a new Harbor MCP integration that can launch task-declared processes and connect to SSE/HTTP endpoints, expanding runtime behavior beyond a simple wiring change. MCP setup occurs before execution egress policy enforcement, creating a material security and isolation concern alongside the new asynchronous transport lifecycle. Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c4dc486f2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Harbor tasks can expose the MCP servers declared in
task.tomlthrough the standard Verifiers tool interface. A reusableHarborMCPToolsetconnects over stdio, SSE, or Streamable HTTP, so individual tasks do not need custom wrapper classes.The declarations travel with
HarborData. Constructing aHarborTaskbinds them into its own task config, and the existingtoolsets(config)factory creates one colocated adapter per declaration. This applies to ordinary task loading and served-worker reconstruction while preserving the worker's shared config. Separate verifier task data omits the solver's toolsets.Each adapter runs in the harness runtime and keeps one upstream connection for the rollout, preserving session state across downstream client reconnects. It forwards every page of the upstream tool catalog, schemas, and call results through VF's normal MCP lifecycle. Stdio commands run in that runtime; HTTP and SSE endpoints retain their declared URLs and must be reachable from it.
Note
Wire Harbor MCP server declarations into task toolsets
HarborMCPToolsetin toolset.py that connects to a declared MCP server over stdio, SSE, or streamable HTTP, then exposes paginated tool discovery and tool-call forwarding via the MCP client.HarborTaskConfig,HarborData, andHarborTaskin taskset.py to carry task-declared MCP server lists;HarborTasknow appends one colocatedHarborMCPToolsetper declared server to its base toolsets.parse_tasknow retainsmcp_serversfrom the task environment intoHarborData.verifier_box_dataclearsmcp_serverswhen projecting solver task data for a separate verifier box, andparse_verifier_environmentno longer rejectsmcp_serversas an unsupported verifier field (the declarations are still not copied intoVerifierConfig).Macroscope summarized 339199a.
Note
Medium Risk
Introduces live MCP connections (stdio subprocesses and outbound HTTP/SSE) from the task runtime and changes
HarborConfig’s nestedtaskschema toHarborTaskConfig, which may affect existing Harbor taskset configs.Overview
Harbor tasks can now expose MCP servers declared in the task environment through Verifiers’ normal toolset/MCP path instead of treating
mcp_serversas unsupported.Config and data flow: Adds
HarborTaskConfig(withmcp_servers) onHarborConfig.task, stores declarations onHarborData, and copies them from the parsed environment inparse_task. EachHarborTaskbinds its row’s servers into a per-instance config copy so served workers don’t mutate shared config. Separate verifier-box task data explicitly clearsmcp_serversso grading boxes don’t inherit the agent’s MCP tools.Runtime:
HarborTask.toolsets()registers one colocatedHarborMCPToolsetper declaration. The new adapter connects upstream over stdio, SSE, or streamable HTTP, keeps a single session for the rollout, paginateslist_tools, and proxiescall_toolthrough VF’s MCP server lifecycle.Reviewed by Cursor Bugbot for commit 339199a. Bugbot is set up for automated code reviews on this repo. Configure here.