-
Notifications
You must be signed in to change notification settings - Fork 2.3k
chore(tests/mcp): testing for MCP sampling #5456
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
f0d73d5 to
dcb2259
Compare
1cc48e1 to
5810586
Compare
|
@jamadeo @DOsinga testing is now set up here for sampling. Douwe and I discussed how we should work to merge |
5810586 to
47b8945
Compare
47b8945 to
ca1b761
Compare
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.
Pull Request Overview
This pull request adds MCP (Model Context Protocol) sampling test functionality to the Goose project. The changes enable testing of MCP sampling capabilities across multiple AI providers by validating that models can properly respond to sampling requests initiated through MCP tools.
Key changes include:
- New test script
test_mcp.shthat validates MCP sampling across multiple providers (Anthropic, Google, OpenRouter, OpenAI, Tetrate, Databricks) - MockProvider implementation for testing MCP sampling in integration tests without requiring actual API calls
- Updated test replay files to reflect MCP sampling test results
- Integration of the MCP test script into the CI/CD workflow
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/test_mcp.sh | New bash script that tests MCP sampling across multiple providers using a judge model to validate responses |
| crates/goose/tests/mcp_integration_test.rs | Adds MockProvider implementation and integrates it with ExtensionManager for MCP sampling tests |
| crates/goose/tests/mcp_replays/npx-y@modelcontextprotocol_server-everything | Updated replay file showing successful sampleLLM tool invocation with Great Gatsby quote |
| crates/goose/tests/mcp_replays/npx-y@modelcontextprotocol_server-everything.results.json | Updated results showing successful sampling response |
| crates/goose/tests/mcp_replays/uvxmcp-server-fetch | Updated replay file with cleaner output (removed verbose setup logs) |
| crates/goose/tests/mcp_replays/uvxmcp-server-fetch.results.json | Updated error message for fetch failure |
| crates/goose/tests/mcp_replays/cargorun--quiet-pgoose-server--bingoosed--mcpdeveloper | Updated replay file with newer timestamps and different user environment |
| crates/goose/tests/mcp_replays/cargorun--quiet-pgoose-server--bingoosed--mcpdeveloper.results.json | Updated list_windows output with more window items |
| .github/workflows/pr-smoke-test.yml | Adds MCP test step to CI workflow with required API keys and configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…se into dkatz/manual-compact-fix-usage * 'dkatz/manual-compact-fix-usage' of github.com:block/goose: (35 commits) Fix image processing (#5544) docs: AI attribution for PRs (#5547) chore(tests/mcp): testing for MCP sampling (#5456) docs: adding HOWTOAI.md (#5533) added configuration content, also added signoff, fix merging issue with another commit by creating a clean branch. removed and closed commits that caused signoff issues. (#5519) Fixes Gemini API parse issue by converting nullable type arrays to single types in tool schemas (#5530) Troubleshooting diagnostics doc (#5526) fix link to Ollama FAQ (#5531) docs: remove speech-mcp (#5514) fix: adds ProviderRetry to openai provider (#5518) docs: extensions directory minor updates (#5466) Docs/json recipe support (#5492) docs: recipe buttons (#5507) Improve system theme detection and fallback (#5427) [Autovisualiser] remove unnecessary content from mermaid HTML template (#5505) Improve subagents docs (#5484) FIX: prefer linux in WSL and add INSTALL_OS override for CLI (#5215) Propagate session ID in LLM and MCP requests (#5165) feat: YT Short for Canva MCP + goose (#5495) Change Recipes Test Script (#5457) ...
* 'main' of github.com:block/goose: (21 commits) Manual compaction counting fix + cli cleanup (#5480) chore(deps): bump prismjs and react-syntax-highlighter in /ui/desktop (#5549) fix: remove qwen3-coder from provider/mcp smoke tests (#5551) fix: do not build unsigned desktop app bundles on every PR in ci. add manual option. (#5550) fix: update Husky prepare script to v9 format (#5522) Fix 404 for responsible coding guide (#5543) fix hermit `text file busy` issues on linux (#5372) Fix image processing (#5544) docs: AI attribution for PRs (#5547) chore(tests/mcp): testing for MCP sampling (#5456) docs: adding HOWTOAI.md (#5533) added configuration content, also added signoff, fix merging issue with another commit by creating a clean branch. removed and closed commits that caused signoff issues. (#5519) Fixes Gemini API parse issue by converting nullable type arrays to single types in tool schemas (#5530) Troubleshooting diagnostics doc (#5526) fix link to Ollama FAQ (#5531) docs: remove speech-mcp (#5514) fix: adds ProviderRetry to openai provider (#5518) docs: extensions directory minor updates (#5466) Docs/json recipe support (#5492) docs: recipe buttons (#5507) ...
Signed-off-by: fbalicchia <[email protected]>
Signed-off-by: Blair Allan <[email protected]>
Two approaches to tests that will ensure MCP sampling continues to work (following the merge of #5367)
mcp_integration_tests.rs- Make sure all codepaths related to sampling work correctly assuming the llm responds predictably. No assertions on content here, or integration with a real provider, just making sure the messages are handled properly.scripts/test_mcp.shscript, similar toscripts/test_providers.shbut which does two things: