feat: drop self-hosted mcp servers and tool labels overwrite - #81
Merged
Conversation
…oad() - remove `mcp_servers:`, `MCPServerDef`, and `server:` on MCP clients - we support only stdio or already running remote servers - remove `MCPLifecycle` - collapse `resolve_infra`, `ResolvedInfra`, and `load_session` into `load` - build models and MCP clients inside every `load()` call, making each call a fully isolated session - make `strands-compose load` synchronous and have it report what was wired - fix transport auto-detection for `url:` - fix the ANSI renderer reading a non-existent `message` key on ERROR events - fix `strands-compose check` reporting `session: None` for built-in session providers, which only populate `provider` - raise the coverage gate to 80% and update docs, examples, and skills
- remove `tool_labels:` from agents, `EventPublisher`, and `make_event_queue` - render INTERRUPT events instead of dropping them - load directory tools recursively, skipping `_`- and `.`-prefixed path segments - treat a Swarm's or Graph's `entry_name` as a node reference - raise `ConfigurationError` from the conversation-manager resolver - flush the queue each turn in the streaming example 12 - prune tests that asserted framework behaviour or duplicated coverage - refresh stale docs (directory scanning, swarm/graph session limits, chapter nav, task list)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two related refactors that shrink the public surface and fix behaviour that was silently wrong.
Net: ~1.5k lines removed.
1. Drop self-hosted MCP servers, collapse resolution into
load()strands-compose acted as both an MCP client and an MCP server host.
Hosting was a second responsibility that duplicated what the MCP SDK already does, so
mcp_servers:,MCPServerDef,server:on clients,create_mcp_server, andMCPLifecycleare gone.We now support only stdio (client spawns the subprocess) or an already-running remote server.
Resolution also had two entry points doing the same work:
resolve_infra/ResolvedInfra/load_sessionare collapsed intoload().Models and MCP clients are built inside each
load()call, which makes every call a fully isolated session instead of sharing process-wide infra.strands-compose loadis now synchronous and reports what it wired.Fixed along the way: transport auto-detection for
url:, the ANSI renderer reading a non-existentmessagekey on ERROR events, andstrands-compose checkprintingsession: Nonefor built-in session providers (which only populateprovider).2. Drop
tool_labels, close silent gaps in loading and renderingtool_labelslet YAML rename a tool for display. Display naming is a renderer concern, and the auto-generated"Delegating work to agent: X"labels hid the actual tool name the LLM invoked — the one thing a reader of the stream needs.Removed from the agent schema,
EventPublisher, andmake_event_queue; the renderer now always shows the real name.Fixed:
INTERRUPTevents reached the ANSI renderer and produced no output, so a run waiting on human input looked hung../tools/) used a flat glob despite docs promising recursion. Now walks the tree and skips segments starting with_or., so__pycache__/and.venv/are never imported.entry_namewas not counted as a node reference by the orchestration planner, so a nested orchestration used only as the entry could be built after its parent.resolve_conversation_managerraised bareValueError; nowConfigurationError, matching every other resolver.Related Issues
N/A
Type of Change
YAML / API Impact
Breaking in both YAML and Python. No deprecation shims.
YAML keys removed — configs using them now fail schema validation:
mcp_servers:(top level)server:on anmcp_clients:entrytool_labels:on an agentPython exports removed from
strands_compose:MCPServerDef,create_mcp_server,MCPLifecycleResolvedInfra,resolve_infra,load_sessiontool_labels=parameter onEventPublisherandmake_event_queueBehaviour changes for code that still compiles:
load()is the single entry point and builds models + MCP clients per call, so each call is an isolated session. Callers that relied on shared infra across sessions must restructure.strands-compose loadis synchronous.Minimum
strands-agentsis now>=1.52.0.Testing
How have you tested the change?
uv run just check(lint + type check)uv run just testfor overall testingexamples/still workCoverage gate raised to 80%. Suite pruned of tests asserting framework behaviour or
duplicating coverage; added a parametrized test that fails if any
EventTypelacks arenderer handler, and directory-recursion tests including same-stem files in sibling
subdirectories.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.