feat: bidirectional MCP bridge + tool composer (S20)#394
Merged
Conversation
Phase 3 sprint S20 — issues #167, #168. - @agentskit/tools/mcp (subpath): bidirectional Model Context Protocol bridge. createMcpClient + toolsFromMcpClient consume MCP servers as native ToolDefinitions. createMcpServer exposes AgentsKit tools to MCP hosts. Transports: createStdioTransport (newline-JSON on stdin/stdout), createInMemoryTransportPair for tests. Protocol subset: initialize + tools/list + tools/call over JSON-RPC 2.0. - @agentskit/core/compose-tool (subpath): composeTool chains N ToolDefinitions into one macro tool. mapArgs builds next sub-call from state, mapResult transforms, stopWhen short-circuits, finalize reduces. One schema visible to the model, fixed recipe underneath. 23 new tests. Core bundle still 8.7 KB / 9.7 KB gzipped.
This was referenced Apr 19, 2026
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.
Summary
Phase 3 sprint S20 — closes #167, #168.
23 new tests.
Coverage
Docs
Changeset
`.changeset/phase3-s20-mcp-composer.md` — minor bumps on `@agentskit/tools`, `@agentskit/core`.
Test plan