Metal Price MCP Server

MIT License
  • Linux
  • Apple

金属価格MCPサーバー

GoldAPI.ioサービスを通じて金/貴金属の現在の価格と過去の価格を提供する MCP サーバー。

特徴

  • 金(XAU)、銀(XAG)、プラチナ(XPT)、パラジウム(XPD)の現在の価格を取得します
  • 複数の通貨(USD、EURなど)のサポート
  • 日付によるオプションの過去価格検索

要件

  • Python 3.7以上
  • パッケージ:
    • mcp>=1.0.0
    • requests>=2.31.0

設定

  1. このリポジトリをクローンする
  2. 依存関係をインストールします:
    pip install -r requirements.txt
  3. GoldAPI.io API キーを環境変数として設定します。
    export GOLDAPI_API_KEY="your_api_key_here"
    (Windows ユーザー: exportの代わりにsetを使用してください)

使用法

サーバーは 1 つの MCP ツールを提供します。

インストール

このサーバーは、 cline_mcp_settings.jsonファイルに構成を追加することで手動でインストールできるように設計されています。

  1. cline_mcp_settings.jsonファイルのmcpServersオブジェクトに次のエントリを追加します。
"mcp_metal_price": { "args": [ "/c", "python", "-m", "mcp_metal_price" ], "env": { "GOLDAPI_API_KEY": "Your GOLDAPI_API_KEY" } }

金価格を取得する

現在の金属価格または過去の金属価格を取得します。

パラメータ:

  • currency (文字列、デフォルト:"USD"):通貨コード(ISO 4217形式)
  • metal (文字列、デフォルト:"XAU"):金属記号(XAU、XAG、XPT、XPD)
  • date (文字列、オプション): YYYYMMDD形式の履歴日付

使用例:

{ "currency": "EUR", "metal": "XAU" }

サーバーの実行

次のコマンドでサーバーを起動します。

python src/server.py

MCPクライアントでの使用

サーバーが実行される場合は、Cline や Claude などの MCP クライアントからサーバーに接続できます。

サーバーへの接続

サーバーはデフォルトでstdioで動作します。MCPクライアントでは、以下のコマンドで接続できます。

cmd /c python src/server.py

get_gold_priceツールの使用

Cline/Claude でのツールの使用例:

<use_mcp_tool> <server_name>gold-price</server_name> <tool_name>get_gold_price</tool_name> <arguments> { "currency": "USD", "metal": "XAU" } </arguments> </use_mcp_tool>

応答フォーマット

サーバーは価格データを JSON 形式で返します。

{ "timestamp": 1713600000, "metal": "XAU", "currency": "USD", "price": 2345.67, "unit": "per troy ounce" }

ライセンス

このプロジェクトはMITライセンスの条件に基づいてライセンスされています。詳細はLICENSEファイルをご覧ください。

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

複数の通貨をサポートする GoldAPI.io サービスを介して、金/貴金属 (金、銀、プラチナ、パラジウム) の現在および過去の価格を提供する MCP サーバー。

  1. Features
    1. Requirements
      1. Setup
        1. Usage
          1. Installation
            1. get_gold_price
          2. Running the Server
            1. Using with MCP Clients
              1. Connecting to the Server
              2. Using the get_gold_price Tool
              3. Response Format
            2. License

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
                Last updated -
                3
                79
                23
                TypeScript
                MIT License
                • Apple
              • A
                security
                A
                license
                A
                quality
                An MCP server implementation that integrates with Hyperliquid exchange, providing access to crypto market data including mid prices, historical candles, and L2 order books.
                Last updated -
                3
                14
                5
                TypeScript
                MIT License
              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface. Updated to use Coin Cap API v3
                Last updated -
                3
                27
                TypeScript
                MIT License
                • Apple
              • -
                security
                A
                license
                -
                quality
                An MCP server providing a range of cryptocurrency technical analysis indicators and strategies.
                Last updated -
                64
                JavaScript
                MIT License

              View all related MCP servers

              ID: s8eo9090z8