-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(packages/mcp): add support for MCP server prompts exposed #9957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
content/docs/07-reference/01-ai-sdk-core/23-create-mcp-client.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
|
i think it makes sense to pass the folder name along with the script for a unified approach |
|
I have verified that the changes in scripts in |
## 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
|
✅ Backport PR created: #9994 |
…sed (#9994) This is an automated backport of #9957 to the release-v5.0 branch. Co-authored-by: Aayush Kapoor <[email protected]>
Background
In continuation to #6294, we need to expose the prompts the MCP servers define.
Also see #9953
Summary
Updated
mcpClientschema to allow listing prompts and getting prompts.Manual Verification
Added tests in
examples/mcp/src/mcp-promptsChecklist
pnpm changesetin the project root)Future Work
Work on integrating resources and prompts into the LLM call (planned for post v6)
Related Issues
Fixes #9953