get_asset_pricesLABSCO SUMMARY
A price history you own, with a retirement model attached.
Most metals and crypto servers proxy a live quote; this one accumulates a daily record in your own DynamoDB, which is what makes range questions answerable at all — at the cost of deploying the Lambda and table into your AWS account first and letting them collect. The projection tool is a separate idea bolted on: a quick withdrawal-rate scenario with optional random returns, not a Monte Carlo simulation.
What it is
An MCP server over a price history you host yourself. A scheduled Lambda pulls gold, silver, palladium, copper, bitcoin and ether prices from a public API each weekday evening and writes them to DynamoDB under a date index; the server reads that history back, so "what did copper do last month" is a date-range query rather than a single live quote. A second tool is unrelated to metals: it projects a starting principal over thirty years at a growth rate you set, withdrawing a percentage each year, optionally with random annual returns and with withdrawals skipped after a losing year.
What you get
- Prices for gold, silver, palladium, copper, bitcoin or ether by name, for a date range or for the most recent record
- A history that accumulates from the day you deploy, indexed by date rather than by timestamp
- A thirty-year projection table: starting balance, withdrawal, balance after withdrawal, growth rate, growth amount and ending balance for each year
- Random annual growth as an option, so the projection reads as a scenario rather than a straight line
- Withdrawals skipped in the year following a negative one, when you ask for that rule
Requirements
The server is the front end; the data lives in AWS resources you deploy yourself. That means an AWS account, the AWS and SAM command-line tools, and a deploy of the included template — two Lambda functions, a DynamoDB table, and an EventBridge rule that runs on weekdays at 22:00 UTC. Until that stack exists and has run at least once, the price tool has nothing to read. Python 3.10 or newer runs the server, and there is no key of the project's own to obtain.
Setup effort
Build from source — git clone https://github.com/jcaple/qgold.git
USE CASES
Seeing where a metal has been, not just where it is
Read the daily record for gold, silver, palladium or copper across a date range you name.
Checking several assets on the same day
Ask for each asset by name for one date and get the prices back together, metals and crypto in the same answer.
Testing a withdrawal rate against a nest egg
Project a starting principal over thirty years at a growth rate and withdrawal rate you choose, year by year.
Seeing how a bad run changes the plan
Run the same projection with random annual growth and withdrawals skipped after a losing year, so the down years are visible rather than averaged away.
2 tools
Listed in project docs. Your client may show a different list.
model_financial_projectionsBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- An AWS account, with the AWS CLI installed and configured
- AWS SAM CLI
- Amazon Q Developer CLI, logged in
- Python 3.10 or later (as python3)
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
git clone https://github.com/jcaple/qgold.git
cd qgold
sam build
sam deploy --guided --capabilities CAPABILITY_NAMED_IAM
make test-quote-retrieval — loads a first set of prices into the DynamoDB table; otherwise it stays empty until the weekday 22:00 UTC schedule runs
pip install -r mcp_server/requirements.txt
cd mcp_server
q mcp add --name qgold --command python3Make .amazonq/mcp.json match the Amazon Q block below, then run q login
MCP Clients
Amazon Q
{
"mcpServers": {
"qgold": {
"command": "python3",
"args": [
"server.py"
]
}
}
}This is .amazonq/mcp.json inside the mcp_server folder, and server.py is found relative to it, so start Q from that folder: q chat --trust-tools=qgold___get_asset_prices,qgold___model_financial_projections