Skip to main content
Glama
TroyStack API

TroyStack API

by kingleosgold

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

Related MCP server: The Gold Barometer MCP Server

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)

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides access to a comprehensive financial intelligence platform featuring real-time market data, quantitative models, and alternative data sources. It enables users to perform advanced financial analysis including options analytics, portfolio modeling, and SEC filing research.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI clients to pull live Indian and global market data and run research workflows, including multi-agent stock debate, sentiment and insider-activity detection, options and Greeks analytics, and portfolio risk scanning. It also covers institutional flows, mutual fund overlap, pledge alerts, and macro indicators so users can go from a single question to a ranked, reasoned trade or risk assessment.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to access and analyze financial data, stock information, company fundamentals, market insights, and 250+ tools across asset classes. Supports flexible hosted or self-hosted deployment with dynamic toolset management.
      558 npm
      Apache 2.0