Skip to content

Conversation

CharlVS
Copy link
Member

@CharlVS CharlVS commented Aug 10, 2025

Add a new komodo_mcp_server package to expose Komodo DeFi SDK functionality via a stdio MCP JSON-RPC server.


Open in Cursor Open in Web

Copy link

cursor bot commented Aug 10, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Copy link

coderabbitai bot commented Aug 10, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/build-mcp-server-for-sdk-functionality-2f71

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

github-actions bot commented Aug 10, 2025

Visit the preview URL for this PR (updated for commit 04dde59):

https://komodo-defi-sdk--pr182-cursor-build-mcp-ser-ptwzgk66.web.app

(expires Mon, 18 Aug 2025 17:22:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 7f9f5ac39928f333b6e8fcefb7138575e24ed347

Co-authored-by: charl <charl@vanstaden.info>
@CharlVS CharlVS marked this pull request as ready for review August 10, 2025 17:58
@Copilot Copilot AI review requested due to automatic review settings August 10, 2025 17:58
Copy link
Contributor

@Copilot Copilot AI left a 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 PR adds a new MCP (Model Context Protocol) server package that exposes Komodo DeFi SDK functionality through a stdio JSON-RPC interface, enabling integration with MCP-compatible clients.

Key changes:

  • Creates a new komodo_mcp_server package with proper Dart configuration
  • Provides MCP server functionality with tools for SDK interaction and version retrieval
  • Includes documentation for setup and client configuration

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/komodo_mcp_server/pubspec.yaml Package configuration with dependencies on Komodo SDK packages
packages/komodo_mcp_server/analysis_options.yaml Dart linting configuration allowing print statements
packages/komodo_mcp_server/README.md Documentation for running the server and configuring MCP clients

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@CharlVS CharlVS changed the title Build MCP server for SDK functionality feat(sdk): MCP server for SDK functionality Aug 10, 2025
@CharlVS
Copy link
Member Author

CharlVS commented Aug 11, 2025

@cursoragent fix all reported issues.

Copy link

cursor bot commented Aug 11, 2025

I enhanced the komodo_mcp_server by adding a command-line option to control stdio transport, improving the wallet.get_public_keys API response format, and making the application's dispose lifecycle more robust to prevent errors. These changes improve server flexibility and stability.

  • I modified packages/komodo_mcp_server/bin/komodo_mcp_server.dart to allow disabling the stdio transport via a new --stdio command-line argument, providing more control over server startup behavior.
  • In packages/komodo_mcp_server/bin/komodo_mcp_server.dart, I updated the wallet.get_public_keys tool call handler to return a JSON array of objects, each containing asset and keys, instead of a single map. This provides a more structured and iterable API response.
  • I refactored the dispose() method in packages/komodo_mcp_server/lib/app.dart to ensure asynchronous resource cleanup and prevent setState calls on a disposed widget, enhancing application stability.
  • I updated the executables entry in packages/komodo_mcp_server/pubspec.yaml to point directly to komodo_mcp_server, reflecting a change in how the executable is referenced or built.

Open in Cursor Open in Web

Learn more about Cursor Agents

cursoragent and others added 2 commits August 11, 2025 14:40
Co-authored-by: charl <charl@vanstaden.info>
Co-authored-by: charl <charl@vanstaden.info>
@CharlVS
Copy link
Member Author

CharlVS commented Aug 11, 2025

@cursoragent Which comments can be marked as resolved? If possible, mark them as resolved yourself.

Copy link

cursor bot commented Aug 11, 2025

I updated the pubspec.yaml configuration for the komodo_mcp_server package to correctly specify the main executable file. This ensures the server can be run directly using dart run or similar commands, improving project setup and execution.

  • I modified the packages/komodo_mcp_server/pubspec.yaml file.
  • I updated the executables entry for komodo_mcp_server to explicitly point to its Dart entry file, changing it from komodo_mcp_server to bin/komodo_mcp_server.dart. This aligns with standard Dart project structure for executables.

Open in Cursor Open in Web

Learn more about Cursor Agents

Co-authored-by: charl <charl@vanstaden.info>
@CharlVS
Copy link
Member Author

CharlVS commented Aug 11, 2025

@cursoragent please review and make any necessary fixes

Copy link

cursor bot commented Aug 11, 2025

I refactored the komodo_mcp_server package by removing an unused dependency and updating an asynchronous call to ensure proper resource management. These changes streamline the codebase and improve the reliability of the application's lifecycle management.

  • I removed the import 'package:decimal/decimal.dart'; statement from packages/komodo_mcp_server/bin/komodo_mcp_server.dart, as the Decimal package was no longer directly utilized in this entry point.
  • I modified packages/komodo_mcp_server/lib/app.dart to await _sdk?.dispose(); within the _KomodoMcpAppState class. This ensures that the asynchronous dispose() method of the KomodoDefiSdk instance completes before further operations, preventing potential resource leaks or race conditions during SDK reinitialization.

Open in Cursor Open in Web

Learn more about Cursor Agents

Co-authored-by: charl <charl@vanstaden.info>
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.

2 participants