Skip to content

Backport: feat(mcp): expose server instructions to be accessible through client#15166

Merged
aayush-kapoor merged 2 commits into
release-v6.0from
backport-pr-14764-to-release-v6.0
May 11, 2026
Merged

Backport: feat(mcp): expose server instructions to be accessible through client#15166
aayush-kapoor merged 2 commits into
release-v6.0from
backport-pr-14764-to-release-v6.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This is an automated backport of #14764 to the release-v6.0 branch. FYI @aayush-kapoor

…#14764)

## Background

#14669

The `@ai-sdk/mcp` client received instructions from the MCP server in
the initialize handshake response but silently dropped them.

## Summary

added `instructions?: string` to the MCPClient interface + added a get
instructions() getter returning that field.

then stored `result.instructions` alongside serverInfo/capabilities in
init().

## Manual Verification

verified by running `examples/mcp/src/server-instructions/server.ts` and
`examples/mcp/src/server-instructions/client.ts`

## Checklist

- [x] All commits are signed (PRs with unsigned commits cannot be
merged)
- [x] Tests have been added / updated (for bug fixes / features)
- [x] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [x] I have reviewed this pull request (self-review)

## Related Issues

fixes #14669
@github-actions github-actions Bot enabled auto-merge (squash) May 11, 2026 14:31
auto-merge was automatically disabled May 11, 2026 14:34

Pull request was closed

@aayush-kapoor aayush-kapoor reopened this May 11, 2026
@aayush-kapoor aayush-kapoor enabled auto-merge (squash) May 11, 2026 14:44
@aayush-kapoor aayush-kapoor merged commit 725f2ed into release-v6.0 May 11, 2026
17 checks passed
@aayush-kapoor aayush-kapoor deleted the backport-pr-14764-to-release-v6.0 branch May 11, 2026 14:52
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