Skip to content

Conversation

@aayush-kapoor
Copy link
Contributor

@aayush-kapoor aayush-kapoor commented Oct 31, 2025

Background

In continuation to #6294, we need to expose the prompts the MCP servers define.

Also see #9953

Summary

Updated mcpClient schema to allow listing prompts and getting prompts.

Manual Verification

Added tests in examples/mcp/src/mcp-prompts

  • UI example not added yet since currently the SDK doesn't support sending the server resources and prompts to the LLM

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)

Future Work

Work on integrating resources and prompts into the LLM call (planned for post v6)

Related Issues

Fixes #9953

@aayush-kapoor aayush-kapoor marked this pull request as draft October 31, 2025 19:40
Copy link
Collaborator

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I confirmed it's working with

pnpm tsx src/mcp-prompts/server

and

pnpm tsx src/mcp-prompts/client

Would it make sense to update examples/mcp/README.md to explain how to run the new example? Maybe instead of adding scripts for all of them, just do one script for client and one script for server and pass the folder name of the example? Or just document usingpnpm tsx like we do for examples/ai-acore.

@gr2m gr2m removed their assignment Nov 3, 2025
@aayush-kapoor
Copy link
Contributor Author

aayush-kapoor commented Nov 3, 2025

i think it makes sense to pass the folder name along with the script for a unified approach

@aayush-kapoor
Copy link
Contributor Author

I have verified that the changes in scripts in README.md work - merging now

@aayush-kapoor aayush-kapoor merged commit 1cff766 into main Nov 3, 2025
20 checks passed
@aayush-kapoor aayush-kapoor deleted the aayush/mcp-prompt-support branch November 3, 2025 20:38
vercel-ai-sdk bot pushed a commit that referenced this pull request Nov 3, 2025
## Background

In continuation to #6294, we need to expose the prompts the MCP servers
define.

Also see #9953 

## Summary

Updated `mcpClient` schema to allow listing prompts and getting prompts.

## Manual Verification

Added tests in `examples/mcp/src/mcp-prompts`
- UI example not added yet since currently the SDK doesn't support
sending the server resources and prompts to the LLM

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [ ] 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)

## Future Work

Work on integrating resources and prompts into the LLM call (planned for
post v6)

## Related Issues

Fixes #9953
@vercel-ai-sdk vercel-ai-sdk bot removed the backport label Nov 3, 2025
@vercel-ai-sdk
Copy link
Contributor

vercel-ai-sdk bot commented Nov 3, 2025

✅ Backport PR created: #9994

vercel-ai-sdk bot added a commit that referenced this pull request Nov 3, 2025
…sed (#9994)

This is an automated backport of #9957 to the release-v5.0 branch.

Co-authored-by: Aayush Kapoor <[email protected]>
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.

MCP Prompts Support in MCPClient

3 participants