Skip to content

Conversation

@nexon33
Copy link
Contributor

@nexon33 nexon33 commented May 17, 2025

Refactor weather server example implementation inside of prompt to use new MCP SDK features

Related GitHub Issue

Closes: #2032

Description

These changes fix the MCP prompt example so that it is back up to date.

Test Procedure

  1. Open roo-code.
  2. Configure deepseek r1
  3. Ask it to create a tool (can you add a calculator tool that can do basic math?)
  4. Continue until the MCP server is added, there might be some slight problems while creating the MCP server but this is because of deepseek-r1 and not because of an incorrect prompt, usually deepseek manages to set it up now however.

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Code Quality:
    • My code adheres to the project's style guidelines.
    • There are no new linting errors or warnings (npm run lint).
    • All debug code (e.g., console.log) has been removed.
  • Testing:
    • New and/or updated tests have been added to cover my changes.
    • All tests pass locally (npm test).
    • The application builds successfully with my changes.
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Changeset: A changeset has been created using npm run changeset if this PR includes user-facing changes or dependency updates.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Additional Notes

This fix has fixed the actual prompt but is seperate from the deepseek r1 performance which doesn't always succeed to create the MCP server.


Important

Refactor MCP server example in create-mcp-server.ts to use new SDK features and add zod for validation.

  • Behavior:
    • Refactor create-mcp-server.ts to use new MCP SDK features, simplifying server setup and tool/resource management.
    • Adds zod for schema validation in get_forecast tool.
  • Dependencies:
    • Add zod and @modelcontextprotocol/sdk to dependencies in create-mcp-server.ts.
  • Misc:
    • Update example to reflect new SDK usage, removing old server class and handlers.

This description was created by Ellipsis for 5a76a17. You can customize this summary. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented May 17, 2025

⚠️ No Changeset found

Latest commit: 5a76a17

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels May 17, 2025
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap May 20, 2025
@hannesrudolph
Copy link
Collaborator

@nexon33 do you happen to have discord? If so can you reach out to me? hrudolph is my username and I work for Roo Code.

@hannesrudolph hannesrudolph moved this from PR [Needs Review] to TEMP in Roo Code Roadmap May 26, 2025
@daniel-lxs daniel-lxs moved this from TEMP to PR [Needs Review] in Roo Code Roadmap May 27, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Preliminary Review] to PR [Needs Review] in Roo Code Roadmap May 28, 2025
@daniel-lxs
Copy link
Member

This looks good to me, checked the example on here and everything looks correct, tested with Sonnet 4 and was able to create a working MCP without any issues.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 28, 2025
@mrubens mrubens merged commit 5d33d4c into RooCodeInc:main May 28, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap May 28, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 28, 2025
SmartManoj pushed a commit to SmartManoj/Raa-Code that referenced this pull request Jun 13, 2025
* migrate didShowAnnouncement

* changeset

* remove comment

* make variable public

---------

Co-authored-by: Elephant Lumps <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[bug] MCP example outdated

4 participants