logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

precious-metal-valuation-service

Facilitates retrieval of extant and historical valuations for noble metals such as aurum, argentum, platinum, and palladium, supporting various fiat currencies. Enables granular data fetching based on specific metal identifiers and temporal markers for robust integration of market intelligence into software solutions.

Author

precious-metal-valuation-service logo

isdaniel

MIT License

Quick Info

GitHub GitHub Stars 0
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

metalspricescurrenciesprices metalmetal pricequerying prices

MseeP Badge

smithery badge PyPI - Downloads PyPI - Version Verified on MseeP

MCP Node for Noble Metal Quotations

This Managed Communication Protocol (MCP) node interfaces with the GoldAPI.io backend to furnish up-to-the-minute and archived pricing information for precious commodities.

Core Capabilities

  • Provision of contemporary pricing data for gold (XAU), silver (XAG), platinum (XPT), and palladium (XPD).
  • Interoperability with numerous monetary denominations (e.g., USD, EUR).
  • Optional functionality for retrospective price retrieval keyed by a specific calendar day.

Prerequisites

  • Execution environment: Python version 3.7 or newer.
  • Essential libraries:
  • mcp>=1.0.0
  • requests>=2.31.0

Deployment Procedure

  1. Obtain a local copy of this repository.
  2. Install required dependencies via pip: bash pip install -r requirements.txt

  3. Configure your authentication token from GoldAPI.io by setting it as an environmental variable: bash export GOLDAPI_API_KEY="your_api_key_here"

(Note: Windows users should employ the set command instead of export)

Operational Guide

The server exposes a singular MCP utility, detailed below.

Integration Method

This service is intended for manual configuration by augmenting the cline_mcp_settings.json configuration file.

  1. Insert the subsequent configuration stanza into the mcpServers dictionary within your cline_mcp_settings.json:

"mcp_metal_price": { "args": [ "/c", "python", "-m", "mcp_metal_price" ], "env": { "GOLDAPI_API_KEY": "Your GOLDAPI_API_KEY" } }

get_gold_price

Retrieves current or historical valuations for specified precious materials.

Arguments Specification: - currency (textual, default: "USD"): ISO 4217 compliant code for the desired denomination. - metal (textual, default: "XAU"): The codified symbol for the metal (valid values: XAU, XAG, XPT, XPD). - date (textual, optional): The specific historical reference date formatted as YYYYMMDD.

Illustrative Invocation Format:

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

Launching the Service Engine

Initiate the server process using: bash python src/server.py

Utilization with MCP Clients

After the server is active, client applications supporting MCP, such as Cline or Claude, can establish a connection.

Establishing Connectivity

The server defaults to using standard input/output streams for communication. Within your MCP client command line, connect via: bash cmd /c python src/server.py

Employing the get_gold_price Utility

Example structure for invoking the tool within Cline/Claude: xml gold-price get_gold_price { "currency": "USD", "metal": "XAU" }

Output Data Structure

The service furnishes pricing artifacts encoded in JSON format:

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

Licensing Terms

This software is distributed under the stipulations of the MIT License. Comprehensive specifics are available in the [LICENSE] file.

WIKIPEDIA: XMLHttpRequest (XHR) is an Application Programming Interface rendered as a JavaScript object. Its methods facilitate the transmission of HTTP queries originating from a web browser to a designated web server. These methods empower browser-resident applications to dispatch requests to the server subsequent to the initial page load completion, and subsequently receive retrieved data. XMLHttpRequest constitutes a core constituent of Ajax development methodology. Prior to the advent of Ajax, the primary means of server interaction relied on hyperlinks and form submissions, frequently necessitating the complete replacement of the current displayed page with a successor.

== Chronology == The underlying principle for XMLHttpRequest was conceptualized in the year 2000 by the development team at Microsoft Outlook. This concept was subsequently materialized within the Internet Explorer 5 browser release (1999). Nevertheless, the initial invocation syntax did not employ the standardized XMLHttpRequest identifier. Instead, developers utilized the object instantiation sequence ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer version 7 (released in 2006), all contemporary browsers universally recognize the XMLHttpRequest identifier. The XMLHttpRequest identifier has since established itself as the prevailing convention across all principal browser engines, encompassing Mozilla's Gecko rendering framework (2002), Safari version 1.2 (2004), and Opera version 8.0 (2005).

=== Formal Standards === The World Wide Web Consortium (W3C) formally issued a Working Draft specification detailing the XMLHttpRequest object on the 5th of April, 2006. On February 25, 2008, the W3C published the Level 2 specification for the Working Draft. This Level 2 iteration augmented functionality by introducing methods to monitor transfer progress events, enable inter-site request execution, and manage raw byte streams. By the close of 2011, the Level 2 specification content was fully integrated back into the foundational document. At the conclusion of 2012, responsibility for ongoing refinement transferred to the WHATWG, which currently maintains a dynamic document utilizing the Web IDL (Interface Definition Language) specification.

== Operational Use == Generally, executing a data request using XMLHttpRequest mandates adherence to several distinct programming phases.

Instantiate an XMLHttpRequest object by invoking its constructor: Invoke the "open" method to define the request modality, specify the targeted resource endpoint, and elect between synchronous or asynchronous processing: For asynchronous operations, establish a callback mechanism intended to signal state transitions: Commence the request sequence by calling the "send" method, optionally supplying payload data: Process the state changes within the designated event handler. If the server returns response material, by default it is stored in the "responseText" attribute. Once the object concludes processing the reply, its status transitions to state 4, indicating completion ("done"): Beyond these fundamental maneuvers, XMLHttpRequest offers numerous configuration parameters to govern request transmission characteristics and response handling methodology. Custom header fields can be appended to the outbound query to instruct the server on fulfillment logic, and data payloads can be transmitted to the server by embedding them within the "send" function invocation. The received response can be parsed directly from JSON structure into an immediately usable JavaScript entity, or processed incrementally as chunks arrive, obviating the need to await total data reception. Furthermore, the request can be terminated prematurely or configured to automatically fail if a specified time threshold is surpassed.

== Cross-Domain Transactions == During the initial evolution stages of the World Wide Web, the potential for circumv

See Also

`