Skip to content

Hub: detect a pool upstream that the agent already has as its own MCP server #473

Closed

Description

@fen89

Problem

A member can have a pool upstream configured directly in the agent, outside devstack, e.g. after following a service's own setup hint:

claude mcp add --scope user --transport http nuts-timetrack https://timetrack.nuetzliche.it/mcp

The hub does not notice. Observed on 2026-11-06 (devstack 0.40.0):

  • The pool offered nuts-timetrack; in the hub's upstreams.toml it was neither accepted nor declined, the member had never decided on it.
  • The agent had the tools anyway, from its own entry in ~/.claude.json (mcpServers, user scope), as mcp__nuts-timetrack__*.
  • Both hooks of a pool skill gated on upstream = "nuts-timetrack" (Distribute agent hooks (session start, prompt pattern) from the pool, like skills #453) stayed silent for the whole session: the session-start reminder and the end-of-session prompt hook. devstack hook session-start printed nothing, exit 0. The model skipped the skill, and the time entries came out wrong (missing reference, wrong tags).
  • Nothing pointed at the cause. Finding it took reading agent-hooks.json, upstreams.toml, ~/.claude.json and the shell history.

Accepting the upstream in the dashboard as well would give the agent the same tools twice (mcp__nuts-timetrack__* and mcp__devstack__nuts_timetrack__*).

Proposal

The hub compares the pool's upstreams with the MCP servers configured in each enabled agent (Claude Code: mcpServers in ~/.claude.json, global and per project, plus .mcp.json; Codex: config.toml), matched by URL (normalised: scheme, host, path, no trailing slash), not by name.

On a match:

  1. Dashboard: the upstream shows "already configured directly in Claude Code (user scope)". One action: accept the upstream and remove the own entry (with confirmation), or keep the own entry.
  2. devstack doctor: a warning naming the agent, the scope, the entry and the command that removes it (claude mcp remove --scope user <name>).
  3. Hooks gated on that upstream (Distribute agent hooks (session start, prompt pattern) from the pool, like skills #453): either count the direct configuration as present, or at least do not stay silent. devstack hook could print a one-line note instead of nothing, e.g. "the upstream nuts-timetrack is configured outside devstack; accept it in the hub so this hook applies".

Option 3 alone would have prevented this case. 1 and 2 avoid the double tools and make the state visible.

Related

Activity

  1. added a commit that references this issue on Nov 6, 2026
    d2c185d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions