Skip to content

Wire Harbor MCP declarations into task toolsets - #2546

Merged
hallerite merged 6 commits into
mainfrom
harbor-mcp-servers
Sep 10, 2026
Merged

Wire Harbor MCP declarations into task toolsets#2546
hallerite merged 6 commits into
mainfrom
harbor-mcp-servers

Conversation

@xeophon

@xeophon xeophon commented Sep 6, 2026

Copy link
Copy Markdown
Member

Harbor tasks can expose the MCP servers declared in task.toml through the standard Verifiers tool interface. A reusable HarborMCPToolset connects over stdio, SSE, or Streamable HTTP, so individual tasks do not need custom wrapper classes.

The declarations travel with HarborData. Constructing a HarborTask binds them into its own task config, and the existing toolsets(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

  • Adds HarborMCPToolset in 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.
  • Extends HarborTaskConfig, HarborData, and HarborTask in taskset.py to carry task-declared MCP server lists; HarborTask now appends one colocated HarborMCPToolset per declared server to its base toolsets.
  • parse_task now retains mcp_servers from the task environment into HarborData.
  • Behavioral Change: verifier_box_data clears mcp_servers when projecting solver task data for a separate verifier box, and parse_verifier_environment no longer rejects mcp_servers as an unsupported verifier field (the declarations are still not copied into VerifierConfig).

Macroscope summarized 339199a.


Note

Medium Risk
Introduces live MCP connections (stdio subprocesses and outbound HTTP/SSE) from the task runtime and changes HarborConfig’s nested task schema to HarborTaskConfig, 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_servers as unsupported.

Config and data flow: Adds HarborTaskConfig (with mcp_servers) on HarborConfig.task, stores declarations on HarborData, and copies them from the parsed environment in parse_task. Each HarborTask binds its row’s servers into a per-instance config copy so served workers don’t mutate shared config. Separate verifier-box task data explicitly clears mcp_servers so grading boxes don’t inherit the agent’s MCP tools.

Runtime: HarborTask.toolsets() registers one colocated HarborMCPToolset per declaration. The new adapter connects upstream over stdio, SSE, or streamable HTTP, keeps a single session for the rollout, paginates list_tools, and proxies call_tool through 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T18:04:24.420920Z 8d3f559 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread verifiers/v1/tasksets/harbor/toolset.py
Comment thread verifiers/v1/tasksets/harbor/toolset.py Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread verifiers/v1/tasksets/harbor/toolset.py
@macroscopeapp

macroscopeapp Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Comment thread verifiers/v1/tasksets/harbor/taskset.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread verifiers/v1/tasksets/harbor/toolset.py Outdated
Comment thread verifiers/v1/tasksets/harbor/toolset.py
Comment thread verifiers/v1/tasksets/harbor/toolset.py
@hallerite
hallerite merged commit 9f13001 into main Sep 10, 2026
14 checks passed
@hallerite
hallerite deleted the harbor-mcp-servers branch September 10, 2026 17:43
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