Skip to content

fix(run): the TUI's MCP tab lists the servers of runtime agents - #80

Open
cryxnet wants to merge 1 commit into
mainfrom
fix/tui-mcp-servers
Open

cryxnet wants to merge 1 commit into
mainfrom
fix/tui-mcp-servers

Conversation

@cryxnet

@cryxnet cryxnet commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Description

The MCP tab in promptise run --tui stayed empty for agents started by the runtime.

An AgentProcess connects its MCP servers itself and hands the agent ready-made MCP tools. The agent then has no _mcp_multi, so describe_agent found no servers, and the tools showed no owning server. describe_agent now also collects the MCP clients behind the agent's tools (each _PromptiseMCPTool knows its client through _multi), de-duplicated, next to the one build_agent() connects.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Changes Made

  • src/promptise/run/harness.py: describe_agent reads the servers and tool owners from agent._mcp_multi and from each tool's _multi.
  • tests/test_run_core.py: regression test with an agent that has only ready-made MCP tools. It fails without the fix.

Testing

  • All existing tests pass: tests/test_run_core.py, tests/test_run_tui_state.py, tests/test_run_tui.py (131 passed)
  • Added a new test that proves the fix
  • Tested manually: in a real promptise run --tui with several agents on HTTP MCP servers, the MCP tab now lists each agent's servers and tool counts

ruff check and ruff format --check are clean.

🤖 Generated with Claude Code

An AgentProcess connects its MCP servers itself and hands the agent
ready-made tools, so the agent has no _mcp_multi and describe_agent
found no servers: the MCP tab stayed empty. describe_agent now also
collects the MCP clients behind the agent's tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cryxnet cryxnet mentioned this pull request Oct 27, 2026

This branch has not been deployed

No deployments
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.

1 participant