justweight
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
justweight
Live: https://xbtmelchizedek.github.io/justweight/ · For agents: skill.md · MCP: node src/mcp.mjs
Quote one inference job (model, input tokens, output tokens) across FLOP, Pearl Research Labs, Venice, Bittensor (Chutes, subnet 64), every OpenRouter provider and your own machine, and see the cheapest route with every price linked to its source.
"A false balance is abomination to the LORD: but a just weight is his delight." Proverbs 11:1
It is read-only. It never signs, never pays, never claims from a faucet and holds no key. Unaffiliated with Flop Labs, Pearl Research Labs, Venice, Chutes or OpenRouter.
Quickstart
npx github:xbtMelchizedek/justweight tiers # one command, no install: cheapest venue per tier, liveOr as a library (npm i github:xbtMelchizedek/justweight, npm package name justweight):
import { fetchAll, quote, iuTable } from 'justweight';
const snap = await fetchAll();
console.log(quote(snap.offers, { model: 'qwen/qwen3.8-27b', inputTokens: 100_000, outputTokens: 20_000 }, snap.rates));Changelog · Contributing · Security · Good first issues
Related MCP server: volthq-mcp-server
Why
Agents that pay for their own inference need one question answered before every job: where is this model cheapest right now, and how do I know? Each network prices differently: FLOP in FLOP per G_n, Chutes in USD and TAO per 1M tokens, Pearl in USD per 1M, OpenRouter in USD per token. justweight puts them on one scale for the same model and refuses to make up the parts nobody publishes.
Use
node src/cli.mjs quote --model qwen/qwen3.8-27b --in 100000 --out 20000 # live
node src/cli.mjs quote --model qwen3-14b --in 1000 --out 1000 --snapshot web/data/snapshot.json
node src/cli.mjs models
node src/cli.mjs tiers # 1 IU per tier and venue, list and effective
node src/cli.mjs sources
npm testNode 22+, no dependencies. Exit codes: 0 ok, 1 no provider lists the model, 2 bad input or no data. Bad input is rejected before any network call.
MCP (stdio, read-only tools justweight_quote, justweight_models, justweight_tiers, justweight_sources; reads the published snapshot unless live: true):
{ "mcpServers": { "justweight": { "command": "node", "args": ["/path/to/justweight/src/mcp.mjs"] } } }The page has "Open in your agent" buttons (Cursor, Grok Bot, Claude, Claude Code, ChatGPT, Codex, T3 Code) that open a draft prompt telling the agent how to use justweight. They come from agent-deeplinks by Shaw (MIT, vendored unmodified in web/vendor/agent-deeplinks/). Links only prefill; nothing auto-sends.
infer: route one call, with caps and a receipt
infer(tier | model, prompt, budget, max_usd, privacy, mode) is an MCP tool on the same server.
Routes to the cheapest venue for the tier's model that meets
privacy(any,no-retention,tee,local) and both caps. Ties go to lower p50 latency, then direct over resold. Unknown privacy policy fails closed.Caps:
max_usdper call, hard ceiling $0.50; a daily cap, default $1 (JUSTWEIGHT_DAILY_CAP_USD, hard ceiling $5). Callers can lower caps, never raise them. Input tokens are estimated at 3 bytes each, which over-counts, so caps err high.Modes:
quote(default) spends nothing and calls nothing but the price snapshot.liveruns only a local model on 127.0.0.1/localhost (JUSTWEIGHT_LOCAL_URL, default Ollama'shttp://127.0.0.1:11434/v1;JUSTWEIGHT_LOCAL_MODEL= your local tag). Paid venues are never called: justweight holds no API keys and never will.Receipt: every call, including refusals, appends a receipt to
~/.justweight/receipts.jsonl(mode 600): request (prompt as sha256 only), chosen route with its source URL, quote, charged amount, caps, snapshot time, output sha256, andprev/hashlinks.verifyReceipts()finds the first altered or missing receipt. FLOP venues will return a Flop settlement receipt instead, once testnet has models.
{ "name": "infer", "arguments": { "tier": "mid", "prompt": "…", "budget": 800, "max_usd": "0.01", "privacy": "no-retention" } }Sources
id | URL | unit | notes |
flop-gateway | FLOP |
| |
flop-price-index | https://explorer.devnet.flop.network/api/price-index/v1/preview | FLOP/G_n | realized net miner revenue over the last complete hour from settled channels. Genesis pinned. Used only when its own floors pass. |
flop-testnet | status | testnet registry and gateway. Empty on 2026-11-24 (no models, no gateway yet). | |
chutes-bittensor | USD (+TAO) | Chutes list price per 1M | |
pearl-labs | USD | public pricing page, parsed; zero rows is an error | |
openrouter | USD | list price per token, scaled to 1M; | |
flop-testnet-price-index | FLOP/G_n | testnet realized price from settled channels, testnet genesis pinned. Feeds the FLOP IU column once testnet lists models and an hour clears its floors. | |
venice | USD (=DIEM) | list price; Venice ids mapped to OpenRouter ids by a hand-checked alias table ( | |
openrouter-providers:<model> | USD | one row per OpenRouter provider (Pearl Research included) for each tier model: list price, OpenRouter's published effective price and cache-hit rate, p50 latency and throughput (last 30 min), zero-data-retention flag. Parsed from the model page payload, not a stable API: it fails loudly if the shape changes. | |
local | (none) | LOCAL | Inkling 2 Mini on your own hardware. API cost 0; electricity and hardware not counted; unit LOCAL so it never wins a USD ranking. |
coingecko | rates | TAO and PRL in USD. FLOP has no market price and is never converted. |
Standard unit (IU) by tier
1 IU = 750k input + 250k output tokens (a 3:1 mix) of a tier's reference model, priced at the cheapest offer per venue. A venue joins a tier only when it lists that exact model. On a price tie, buying direct beats the same price through a reseller.
tier | reference model | why |
mini | thinkingmachines/inkling-2-mini | smallest open model that runs locally (Apache-2.0) |
mid | qwen/qwen3.8-27b | listed by Pearl, Chutes, Venice and OpenRouter |
flash | deepseek/deepseek-v4.1-flash-1017 | most of Pearl's OpenRouter volume |
The FLOP column only fills from receipt-priced rows (flop-realized, from settled channels), never from list prices. On 2026-11-24 the FLOP testnet has 0 models, so the column shows why it is empty.
Testnet watcher
The FLOP column fills itself. Every 2-hourly rebuild, the watcher (flopWatch in src/sources/flop.mjs) walks the same steps and records where things stand in snapshot.flop.watch, the page's FLOP panel and the Actions run summary (scripts/flop-watch.mjs):
stage | meaning |
| testnet.flopscan.io did not answer |
| the testnet registry lists 0 models |
| models are listed, but the explorer advertises no Flop-hosted gateway (only https on |
| the gateway's |
| miners price models, but no complete hour of settled testnet receipts exists yet |
| a receipt hour exists, but it fails the index floors (trades, buyers, sellers), so it is not used |
| testnet receipts price at least one model, and the tier cell shows it in FLOP |
Once filled, a cell is the receipt price (FLOP per G_n, from the testnet price index) times each model's G_n per token, and it stays in FLOP. Since a listed testnet model's exact JSON isn't published yet, the tests use hand-made synthetic_* fixtures. Each one is labeled as synthetic inside the file.
On 2026-11-24 at 3:22 PM ET the stage was explorer-down (testnet.flopscan.io answered 503 "Era-T reader unavailable"). Earlier that day it was no-models.
Rules it follows
Missing data is an error, never zero. A dead source is reported in
sourcesand the rest still quote.Exact decimal math (BigInt, 1e-24) so per-token prices do not drift.
Units are never mixed without a cited rate. FLOP stays in FLOP.
Variants (TEE, FP8, batch) are kept visible: they match the model for comparison but are not the same artifact.
Part of the agent inference kit
Small tools that each do one job and work together. Use any one on its own.
justweight (this repo): one price table for every inference venue (Flop, Pearl, Venice, Chutes, each OpenRouter provider, local) in one unit, with each price linked to its source.
justweight
infer: an MCP tool that routes one call to the cheapest venue meeting your privacy floor, under hard spend caps, and returns chained receipts.agent-price-feed: alerts by JSON Feed, RSS, CLI and MCP when those prices move, a cheaper route appears, or Flop lists a model.
agent-spendcap: a budget policy for agents: holds before each call, settlement from real usage, a hash-chained ledger, and a drop-in fetch for OpenAI-compatible APIs.
flop-receipt-root: proves a Flop compute settlement to an EVM contract without a bridge, and checks one receipt offline.
flop-spend: has an address spent on Flop inference yet? Settled spend per address, re-read on chain, as a CLI, MCP tool and dashboard.
License
MIT. Vendored: agent-deeplinks (MIT, Shaw) and Arc UI foundation tokens (MIT, see web/arc/LICENSE).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Agent FinOps Spend Guard, Deterministic Budget Passport, LLM Token Cost Router & VIP Discounts.
AI inference pricing for agents: live and historical model prices, provider comparison.
Marketplace where AI agents hire other agents, paid per call in USDC. Plus LLM inference.
Agent routing, safety preflight, execution receipts, best execution and verified outcomes.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceProvides cost intelligence and a reputation scoring system to help AI agents optimize spending through smart model selection and local-to-cloud routing. It enables real-time cost tracking and rewards agents for making efficient, high-credibility decisions across various LLM providers.Apache 2.0- AlicenseNot gradedqualityDmaintenanceCompare AI inference pricing across 9 providers in real time. Routing recommendations, spend tracking, and budget alerts for AI agents.MIT
- AlicenseNot gradedqualityDmaintenanceOpenAI-compatible inference broker that routes AI requests to the cheapest qualifying model and settles payments per token in USDC on Base L2 via x402 micropayments.MIT
- AlicenseAqualityDmaintenanceEnables AI agents to discover, compare, and select the best AI models across multiple providers based on pricing, performance, and capabilities, with real-time cost estimation and benchmarking.91,281 npm1MIT