Skip to main content
Glama

Fermat

Server Details

OpenAI-compatible LLM gateway: pay per request with an API key, signed receipt for each call.

If you are the author of this connector, you can claim ownership by verifying the domain or GitHub account it belongs to. Claimed connector authors can inspect health checks, view analytics, and manage their listing.
Status
Healthy
Last Tested
Transport
Streamable HTTP · MCP 2025-11-25
URL

TDQS

Score is being calculated.

Available Tools

11 tools
chatInspect

Run a chat completion on the Fermat gateway, paid from the Phase API key or the wallet this server uses (free models cost nothing). Returns the answer, actual price, task id for the receipt and usage.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYesmodel id from list_models, or a class: auto | eco | premium | agentic
promptNosingle user message (use messages for multi-turn)
systemNooptional system prompt
sessionNosaved session id (from the session tool or a /s/<id> link): the gateway prepends its history and appends this turn
messagesNofull conversation; overrides prompt/system
max_tokensNooutput cap; also bounds the price ceiling
temperatureNosampling temperature 0–2 (Claude ignores it)

Output Schema

ParametersJSON Schema
NameRequiredDescription
textYes
batchNopayment batch this call was charged to (settled with one transaction later)
levelNo
modelYes
usageYes
paymentYes
sessionNo
task_idYes
tx_hashNo
providerYes
price_usdYes
elapsed_msYes
ceiling_usdNo
receipt_urlNo
session_urlNo
routed_modelNo
compareInspect

Run one prompt on 2 to 4 Fermat models or classes at once and compare answer, price, tokens and speed; returns the cheapest, the most expensive and how many times more the expensive one cost. Spends credit for each model. Default models: the cheapest paid chat model, auto, and the most expensive open chat model.

ParametersJSON Schema
NameRequiredDescriptionDefault
modelsNo2 to 4 model ids or classes; default: the cheapest paid chat model, auto, and the most expensive open chat model
promptNosingle user message (use messages for multi-turn)
systemNooptional system prompt
messagesNofull conversation; overrides prompt/system
max_tokensNooutput cap for every model (default: none)

Output Schema

ParametersJSON Schema
NameRequiredDescription
ratioNomost expensive price divided by the cheapest, one decimal
resultsYes
cheapestNomodel with the lowest price among the answers
most_expensiveNomodel with the highest price among the answers
docs
Read-only
Inspect

Fermat documentation in short: connect, pricing (with the live price table), savings, mcp, byok, data, receipts, limits.

ParametersJSON Schema
NameRequiredDescriptionDefault
topicYeswhat to explain

Output Schema

ParametersJSON Schema
NameRequiredDescription
textYes
topicYes
embedInspect

Compute embeddings on the Fermat gateway (paid from the Phase API key or the wallet).

ParametersJSON Schema
NameRequiredDescriptionDefault
inputYes
modelYesembeddings model id

Output Schema

ParametersJSON Schema
NameRequiredDescription
paymentYes
vectorsYes
price_usdYes
key
Read-only
Inspect

Balance, daily cap and spend of the Phase API key this server pays with (key mode).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
keyNo
list_models
Read-only
Inspect

List models of the Fermat gateway with prices (USD per 1M tokens, fee per call) and layer (flagship | open | class | free).

ParametersJSON Schema
NameRequiredDescriptionDefault
layerNooptional filter: flagship | open | class | free

Output Schema

ParametersJSON Schema
NameRequiredDescription
modelsYes
walletNo
gatewayYes
quote
Read-only
Inspect

Get the price ceiling for a chat request without paying (the gateway's 402 quote).

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYesmodel id from list_models, or a class: auto | eco | premium | agentic
promptNosingle user message (use messages for multi-turn)
systemNooptional system prompt
sessionNosaved session id (from the session tool or a /s/<id> link): the gateway prepends its history and appends this turn
messagesNofull conversation; overrides prompt/system
max_tokensNooutput cap; also bounds the price ceiling
temperatureNosampling temperature 0–2 (Claude ignores it)

Output Schema

ParametersJSON Schema
NameRequiredDescription
freeYes
modelYes
networkYes
ceiling_usdYes
paid_by_keyNotrue when a Phase API key pays: its balance and daily cap apply, max_usd_per_call does not
per_call_usdYes
wallet_can_payYes
input_usd_per_1mYes
max_usd_per_callNolargest quote the wallet will sign (wallet mode only)
output_usd_per_1mYes
input_tokens_estimateYes
max_output_tokens_pricedYes
receipt
Read-only
Inspect

Fetch the public receipt of a paid request by task id (model, provider, tokens, price, settlement tx, request/response hashes, signatures) and its Merkle proof once the weekly epoch is closed.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYestask id from chat / embed (0x…)

Output Schema

ParametersJSON Schema
NameRequiredDescription
urlYes
proofNo
receiptYes
epoch_stateYes
route_explain
Read-only
Inspect

Explain one Fermat request from its public receipt: the model or class it named, the complexity level, the model and provider that served it, the price, the price of the class baseline model and the saving in percent, and the providers tried.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYestask id from chat / embed (0x…)

Output Schema

ParametersJSON Schema
NameRequiredDescription
levelNocomplexity level the classifier gave the request
task_idYes
attemptsNoproviders tried, the one that served included
is_classYes
providerYes
price_usdYes
requestedYesmodel or class the request named
saved_usdNo
explanationYes
receipt_urlYes
baseline_usdNoprice of the same usage on the class baseline model
routed_modelYes
saving_percentNo
failed_attemptsNo
session
Destructive
Inspect

Saved chat sessions on the Fermat gateway: create one (returns an id and a shareable /s/ link), read its thread, list the wallet's sessions (wallet mode only: signed with the wallet key, no transaction), or delete one. Pass the id as session to chat and the gateway carries the context between turns and visits.

ParametersJSON Schema
NameRequiredDescriptionDefault
idNosession id (get, delete)
modelNocreate: model the session starts with (informational; each chat names its own)
titleNocreate: title (defaults to the first message)
actionYescreate | get | list | delete
systemNocreate: system prompt kept for every turn

Output Schema

ParametersJSON Schema
NameRequiredDescription
idYes
urlYes
modelNo
titleNo
systemNo
deletedNo
messagesYes
requestsYes
sessionsNo
spent_usdYes
expires_atYes
usage
Read-only
Inspect

Spend and savings of the Fermat API key over the last N days (1 to 90, default 7): totals, per day and per model when the gateway has the history (source usage), otherwise the key's totals (source key). Key mode only.

ParametersJSON Schema
NameRequiredDescriptionDefault
daysNoperiod in days, 1 to 90 (default 7)

Output Schema

ParametersJSON Schema
NameRequiredDescription
daysYes
sourceYesusage: per-day history from /v1/key/usage; key: totals only from /v1/key
per_dayNo
requestsYes
per_modelNo
saved_usdNo
spent_usdYes
available_usdNo
daily_cap_usdNo
spent_today_usdNo

Tool Schema Changelog

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

  1. 4 tool updates
    • Addedcompare
    • Addeddocs
    • Addedroute_explain
    • Addedusage
  2. 7 tool updates
    • First observedchat
    • First observedembed
    • First observedkey
    • First observedlist_models
    • First observedquote
    • First observedreceipt
    • First observedsession

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Crypto-native LLM gateway with OpenAI-compatible API and per-token USDC payments on Solana via the x402 protocol.
    4,113 npm
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Keyless, pay-per-call AI gateway: 248 LLMs plus image/video/voice/music generation and live crypto, DeFi, markets, web-search and research tools through one MCP server. Pay per call in USDC via x402 on Base/Solana — no API key, no signup, free tier.
    -
  • A
    license
    A
    quality
    F
    maintenance
    MCP server for ProxyLLM, the OpenAI-compatible LLM gateway, enabling live model catalogs, plan-savings calculations, routing key management, and autonomous account signup.
    9
    40 npm
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables any agent to purchase Claude and Grok inference metered per token, settled in BSV, via the hosted gateway without holding keys or running models locally.
    4
    69 npm
    MIT
Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources