feat(ai-mcp): carve the agent<->MCP bridge into @gemstack/ai-mcp#14
Merged
Conversation
Promote the MCP bridge (mcpClientTools / mcpServerFromAgent) from the @gemstack/ai-sdk ./mcp subpath into its own package, @gemstack/ai-mcp. This is the first carve-out of the family and proves the dependency seam. ai-sdk (0.2.0 -> 0.3.0): drop the ./mcp export, the optional @modelcontextprotocol/sdk peer, and the mcp keywords. No other public surface changes. The MCP SDK peer now surfaces only to consumers of the bridge instead of every ai-sdk user. ai-mcp (0.1.0): depends on @gemstack/ai-sdk; @modelcontextprotocol/sdk is its only optional peer. One-directional (ai-mcp -> ai-sdk, never back); hard-move with no shim (a re-export would create a cycle). Bridge API unchanged. Closes #7
This was referenced Jun 25, 2026
Merged
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.
Implements #7 — the first carve-out of the GemStack AI family. Promotes the agent<->MCP bridge from
@gemstack/ai-sdk's./mcpsubpath into its own package,@gemstack/ai-mcp.What moved
mcpClientTools+mcpServerFromAgent(and their types/tests) move out ofai-sdk/src/mcp/into the newpackages/ai-mcp/. Cross-imports (../agent.js,../tool.js,../types.js) are rewritten to@gemstack/ai-sdk. Bridge behavior is unchanged; the only branding touch is the advertised MCP client name (rudderjs-ai-mcp-bridge->gemstack-ai-mcp-bridge), which no test depends on.@gemstack/ai-sdk0.2.0 -> 0.3.0 (breaking 0.x minor)./mcpexport, the optional@modelcontextprotocol/sdkpeer (+ meta + devDep), and themcp/model-context-protocolkeywords.ai-sdkuser — the carve-out's whole point.@gemstack/ai-mcp0.1.0 (new)@gemstack/ai-sdk(+zod);@modelcontextprotocol/sdkis its only optional peer.@gemstack/mcpserver framework.Decisions honored (per Architecture.md / #7)
ai-sdk -> ai-mcp -> ai-sdkcycle the dependency rule forbids.ai-sdkreferencesai-mcpnowhere.Verification
pnpm build— both packages ✓pnpm typecheck— both ✓@gemstack/ai-mcptests: 19 pass (againstai-sdkimported from the package root)@gemstack/ai-sdktests: 977 pass, 0 fail (mcp tests relocated cleanly)Follow-up (separate, in the Rudder repo)
Repoint the one internal consumer,
@rudderjs/ai/mcp, off the removed subpath — ties into the@rudderjs/aideprecation timeline. Not in this PR.Changesets:
@gemstack/ai-sdkminor (-> 0.3.0),@gemstack/ai-mcpminor (-> 0.1.0).