Troystack

by kingleosgold

218 downloads
Not rated
GitHub

About

Live precious metals prices, COMEX vault data, market intelligence, and calculators.

Details

Author
kingleosgold
Downloads
218
Categories
Developer Tools, Finance, API

- Live spot prices for Au, Ag, Pt, Pd
- Historical price data and market news
- COMEX vault inventory monitoring
- Portfolio summary and cost basis analytics
- Authenticated holdings management (add/list)
- AI/LLM endpoint discovery via /llms.txt and OpenAPI spec
- MCP server manifest at /.well-known/mcp.json

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Troystack
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install dependencies with npm install, copy .env.example to .env, fill in Supabase credentials (SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY), then run npm run dev. For production, deploy to Railway by connecting a GitHub repo and setting the required environment variables. Run the SQL migration migrations/001_api_keys.sql in Supabase SQL editor to set up the database.

get_spot_prices

Returns current spot prices for gold, silver, platinum, and palladium with daily change percentages

get_price_history

Historical spot price data for a precious metal over a time range

get_stack_signal

Returns Stack Signal — TroyStack's curated precious metals market intelligence with Troy's commentary

get_vault_watch

Returns COMEX warehouse inventory: registered, eligible, combined ounces, daily changes, open interest, oversubscribed ratio

get_junk_silver

Calculates silver melt value for pre-1965 US coinage

get_speculation

Calculates price multipliers comparing current spot to hypothetical target prices

chat_with_troy

Ask Troy anything about precious metals, markets, your stack. Provide api_key for personalized portfolio-aware answers, or omit for general market analysis.

get_portfolio

Returns your precious metals portfolio: total value, cost basis, gain/loss, per-metal breakdown, and individual holdings

add_holding

Add a precious metals purchase to your portfolio

get_analytics

Cost basis, average cost per oz, break-even price, unrealized P/L per metal

scan_receipt

Extract precious metals purchase data from a receipt image using AI vision

get_daily_brief

Troy's daily market brief. Provide api_key for personalized brief, or omit for the latest Stack Signal market synthesis.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "troystack": {
            "troystack": {
                "url": "https://api.troystack.ai/mcp"
            }
        }
    }
}

McpServers

{
    "troystack": {
        "url": "https://api.troystack.ai/mcp"
    }
}

TroyStack API

REST API + MCP Server for TroyStack. Provides live precious metals data,
portfolio management, and AI/LLM integration.

Quick Start

npm install
cp .env.example .env  # fill in Supabase credentials
npm run dev

Deploy to Railway

1. Push to GitHub repo
2. Connect repo in Railway dashboard
3. Set environment variables:
- SUPABASE_URL
- SUPABASE_SERVICE_ROLE_KEY
- PORT (Railway sets automatically)
4. Deploy

Custom domain: api.troystack.ai

Database Setup

Run migrations/001_api_keys.sql in Supabase SQL editor.

Endpoints

Public (no auth)

| Method | Path | Description | |--------|------|-------------| | GET | /v1/prices | Live spot prices (Au, Ag, Pt, Pd) | | GET | /v1/prices/history | Historical prices | | GET | /v1/market-intel | News headlines | | GET | /v1/vault-watch | COMEX inventory | | GET | /v1/speculation | What-if projections |

Authenticated (Bearer token)

| Method | Path | Description | |--------|------|-------------| | GET | /v1/portfolio | Portfolio summary | | GET | /v1/analytics | Cost basis analysis | | GET | /v1/holdings | List holdings | | POST | /v1/holdings | Add purchase |

LLM / AI

| Path | Description | |------|-------------| | /llms.txt | LLM-readable description | | /openapi.json | OpenAPI 3.0 spec | | /.well-known/ai-plugin.json | AI plugin manifest | | /.well-known/mcp.json | MCP server manifest |

Architecture

User's iPhone → TroyStack app (local SQLite)
                          ↕ sync
                    Supabase (server-side storage)
                          ↕
                    TroyStack API (Railway)
                      ↕         ↕
                  AI Agents    X/Twitter Bot
                (Claude, GPT)  (auto-tweets)
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.