Onchain Stocks MCP README

The full upstream README, mirrored for reference. Install config, tool schemas, adoption signals and our own overview live on the Onchain Stocks MCP listing page.

onchain-stocks-mcp

MCP server for tokenized stocks on Solana: which token is cheapest, what size costs you, and how a buy compares to the real share.

Read-only. It never trades, holds keys or gives advice.

Demo: tokenized Tesla from three issuers vs the real share price

The demo runs with a key, which adds the comparison to the real share. Without one, the tokens are compared with each other.

Install

No API key needed. Claude Code:

Terminal
claude mcp add onchain-stocks -- npx -y onchain-stocks-mcp

Other clients (Claude Desktop, Cursor):

config.json
{
  "mcpServers": {
    "onchain-stocks": {
      "command": "npx",
      "args": ["-y", "onchain-stocks-mcp"]
    }
  }
}

Then ask: "Which tokenized Tesla is cheapest to buy for $1,000?"

Needs Node 22+.

Tools

Without a key:

ToolReturns
list_tokensEvery token covered (about 130 across 85 stocks): issuer, redeemability, mint
compare_issuersThe same buy quoted for every issuer's token of one stock (xStock, Ondo, Backpack...), ranked by price per token. With a key, also vs the real share price
quote_sizesOne token quoted at up to 5 sizes, and how much more each size pays per token than the smallest (slippage)

With a tokens.xyz key (TOKENS_API_KEY), three more:

ToolReturns
search_stocksEvery token of a stock, plus the real share price and its age
quote_buyThe all-in cost of a buy against the real share price
risk_scoreMarket risk score 0 to 100, grade A/B/C

Add the key with -e TOKENS_API_KEY=your_key before -- in the Claude Code command, or as "env" in the JSON config.

Read the numbers right

  • Quotes are Jupiter routes, not fills, and not the issuer's own mint or redeem price. A token far above the others usually means a thin route.
  • Tokens of one stock can differ in what they represent (redeemability, dividends). Check redeemable.
  • Share prices are frozen outside US trading hours. Check sharePriceAgeMinutes.

Limits

LimitDetail
Jupiter rate limitThe free quote API allows a short burst, then about one quote every 2 s per IP (measured 2026-11-01, scripts/probe-jupiter.ts). Each user runs the server locally, so limits are per user. Tools retry with backoff and cache identical quotes for 15 s
Real share priceNeeds a tokens.xyz key. No free source exists: Pyth, the usual oracle, requires an API key since August 2026
Token listBuilt in, refreshed weekly by a pull request. Tokens launched since the last release are missing until then
ChainsSolana only

Data sources

DataSource
Buy quotesJupiter lite API (free, rate-limited: errors are returned, never guessed)
Built-in token listapi.tokens.xyz, refreshed weekly by a pull request (npm run catalog by hand)
Share prices, search, riskapi.tokens.xyz (key required)

Development

Code
git clone https://github.com/stephanet88/onchain-stocks-mcp
cd onchain-stocks-mcp
npm install   # also builds dist/
npm test
npm run lint
npm run typecheck

Not investment advice.