Skip to content
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

Add Asset Price Information tool for cryptocurrency price data #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KcPele
Copy link

@KcPele KcPele commented Mar 21, 2025

Description

This PR adds a new Asset Price Information tool to the Base MCP server, allowing users to retrieve current cryptocurrency prices and market metadata. The tool fetches real-time price data from multiple sources (Binance API as primary, with CoinGecko API as fallback) and returns formatted results.

This feature enhances the Base MCP server by providing users with up-to-date cryptocurrency market information directly through Claude or other AI assistants, without needing to leave the conversation to check prices elsewhere.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

The Asset Price Information tool has been tested through:

  1. Manual testing with various cryptocurrency symbols (ETH, BTC, USDC, BONK)
  2. Testing with different currency options (USD, EUR)
  3. Testing with and without metadata to ensure both simple and detailed responses work
  4. Verifying fallback mechanism works when a primary data source fails
  5. Confirming error handling works properly for invalid inputs
  6. Testing with symbols that require different ID mappings

To test this feature:

  1. Start the Base MCP server
  2. Connect Claude Desktop or another MCP client
  3. Ask for cryptocurrency prices, e.g., "What is the current price of ETH and BTC?"
  4. Verify the response includes the requested price data

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if appropriate):

Screenshot from 2025-03-21 13-38-49

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.

1 participant