Flario

io.github.dziuba0x由 GitHub 帳號 dziuba0x 發布v1.6.0更新於 Oct 24, 2026

Flare for agents: FTSO prices with locally verified Merkle proofs, FDC, FAssets, x402 pay.

概覽

AI 產生的概覽

Flario 讓助理讀取 Flare 網路資料:附本地驗證 Merkle 證明的 FTSO 價格、FDC 證明與 FAssets 狀態,並可選擇提交鏈上交易。

可以做什麼
Flario 透過 stdio 提供 24 個工具,涵蓋 Flare 的原生協定:FTSO 價格饋送(含帶證明的錨定價格饋送)、FDC 跨鏈證明請求與本地驗證的證明、FAssets 代理與系統狀態、FLR 餘額與質押組合,以及 Songbird 機密運算註冊表掃描。證明在本地對照鏈上 Relay 根進行驗證,而非直接信任 API 回傳。兩個進階工具(清算掃描器與批次證明包)在營運者開啟後可按次透過 x402 付費使用。
適用情境
當助理需要 Flare 或 Songbird 的即時資料時使用:代幣價格、FAssets 抵押與清算風險、質押與委託,或 FDC 證明,而且你希望結果可驗證而非僅憑信任。它是 Flare 官方文件檢索 MCP 伺服器的補充,而非替代。
執行需求
需要 Node.js 執行 npm 套件,可透過 npx 在本機執行或作為 HTTP hub 執行。讀取操作使用公開 Flare RPC,不需要帳號或金鑰。選用環境變數:FLARE_RPC、FLARE_RPC_TESTNET、FLARE_PRIVATE_KEY(僅用於鏈上提交)、X402_ENABLED,以及用於 RPC 覆寫、驗證器與 DA API 金鑰和 x402 收款設定的變數。
安裝前請注意
FLARE_PRIVATE_KEY 是簽章金鑰:設定後伺服器可提交證明交易並消耗 gas,在 hub 模式下營運者金鑰還可能用於結算 x402 付款。除非設定 FLARIO_HUB_ALLOW_SUBMIT,hub 模式會拒絕鏈上提交。啟用 X402_ENABLED 會使兩個工具變為付費,需要 X402_PAY_TO 與支付代幣。有效的 FDC 證明只能說明資料來自證明中的 URL,並不代表該 URL 可信,因此來源綁定很重要。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Flario,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Flario

[CI] [npm version] [License: MIT] [Node] [Model Context Protocol]

An MCP server for Flare Network. Flario gives an AI agent (in Claude, Cursor, VS Code, or any Model Context Protocol client) plain-language access to Flare's enshrined protocols: FTSO price feeds, FDC cross-chain attestations, and FAssets. It also gives the agent a wallet. Premium tools are paid per call with x402 settled on Flare, and every payment comes back with a receipt the chain itself can prove.

Install it with npx flario, or run it as an HTTP hub. It works against the public Flare RPCs out of the box, needs no account or key for reads, and never holds or forwards funds.

Flario covers the whole enshrined stack: FTSO prices (including proof-carrying anchor feeds), FDC attestation workflows with local Merkle-proof verification, deep FAssets state (per-agent collateral, liquidation risk, system totals, the redemption queue), a Flare portfolio read (delegation, vote power, claimable rewards), Songbird and Coston support, and a watcher for Flare Confidential Compute contracts. Reads are trust-minimized: FDC and FTSO proofs are checked locally against the on-chain Relay root, never taken from an API on faith. The one write, fdc_request_attestation, only submits a transaction if you set FLARE_PRIVATE_KEY; otherwise it hands you a prepared request to sign yourself.

This is complementary to Flare's official MCP server, not a replacement. Their server (dev.flare.network/mcp) does documentation search, so it gives an agent knowledge. Flario gives an agent hands and a wallet: it calls the enshrined protocols and lets the agent pay for computed results, with receipts the chain can verify. Use both.

Where this sits in the x402 ecosystem

Flario speaks the standard x402 wire format, so it is not a private dialect. Payment requirements come back in the usual shape, the payment payload travels base64-encoded in the X-Payment header on the HTTP hub, and the settlement summary comes back in X-Payment-Response. An existing x402 client can pay a Flario endpoint without knowing anything about MCP, and an MCP agent can pay without knowing anything about HTTP.

What Flario adds on top is a proof layer. In a typical x402 deployment, the client learns that a payment settled because the facilitator says so and points at a transaction. Because Flare has a data connector enshrined in the chain, Flario can go further: fdc_verify_settlement obtains an FDC attestation over the settlement transaction, verifies the Merkle proof locally against the on-chain Relay root, and binds it to the actual ERC-20 transfer, so the receipt stands on its own without trusting the facilitator. That step depends on a protocol built into the chain, which is why it is hard to port elsewhere.


DELICTI: mandate before act

flario is the first effector that speaks DELICTI. A paying agent may add mandate_id (and optionally mandate_registry) to its x402 payload; the server binds it into the receipt (flario-receipt/2, field mandate_ref) so any third party can check the deed against an on-chain mandate and, with Flare's FDC as second witness, prove a receipt false or a budget exceeded.

Optional brake — set on the server:

DELICTI_REGISTRY=0x…        # MandateRegistry address on X402_NETWORKDELICTI_REQUIRE_MANDATE=1   # refuse payments that carry no mandate_id

With DELICTI_REGISTRY set, a payment whose mandate is not live, or whose payer is not the mandated agent, is refused before any funds move. Nothing here touches the EIP-712 authorization; a wrong mandate can never move funds, only get the deed refused or later proven false.

Why Flario

  • It goes deep on the protocols that are built into Flare. FTSO, FDC, and FAssets are enshrined in the chain, and so are Flario's 24 tools. A generic multi-chain MCP server can't reach any of this, and the depth doesn't port to another chain.
  • Answers carry a proof, so you don't have to take my word for it. Prices and cross-chain facts come with a Merkle proof that Flario checks locally against the on-chain root. An agent, or even a smart contract, can rely on the answer without trusting any API.
  • Agents can pay, and they get a receipt. Premium tools settle per call over x402 on Flare, and each payment returns a portable receipt that Flare's own FDC can prove, not just the facilitator's word for it. No other chain in the x402 ecosystem can do that today.
  • Self-hostable, no custody. It runs on public RPCs, asks for no account or key to read data, and never touches your funds.

Examples

Once Flario is in your MCP client (see Install), you just ask in plain language:

Ask your agentFlario runs
"What's the FLR/USD price on Flare, with a proof I can check?"get_ftso_anchor_feed
"Which FXRP agents are closest to liquidation right now?"fassets_liquidation_scanner
"Show the FLR portfolio for 0x...: balance, delegation, claimable rewards."get_flr_stake_info
"Who runs FXRP agent 0x...?"fassets_agent_details
"Prove this settlement actually happened, using Flare's FDC."fdc_verify_settlement
"Put this API's data on-chain with a proof, and only accept it from the host I trust."fdc_web2json_request then fdc_verify_web2json

A proof-carrying price comes back with the value and a proof the agent can verify on its own (trimmed):

json
{  "verified": true,  "verification": "Local: keccak256(abi.encode(feed body)) folded through the Merkle proof equals Relay.merkleRoots(100, round) read on-chain.",  "name": "FLR/USD",  "price": 0.006786,  "voting_round_id": 1402671,  "merkle_root": "0x...",  "proof": ["0x...", "0x..."]}

Install

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows) and add:

json
{  "mcpServers": {    "flario": {      "command": "npx",      "args": ["-y", "flario"],      "env": {        "FLARE_RPC": "https://flare-api.flare.network/ext/C/rpc",        "FLARE_RPC_TESTNET": "https://coston2-api.flare.network/ext/C/rpc"      }    }  }}

Restart Claude Desktop, then ask something like "What's the FLR/USD price on Flare?" or "How much FXRP is minted right now?".

Cursor

Edit ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project) and add:

json
{  "mcpServers": {    "flario": {      "command": "npx",      "args": ["-y", "flario"]    }  }}

The same block works in any MCP client with stdio support (VS Code, Windsurf, Zed, and so on). The env block is optional, since the public Flare RPCs are used by default.

Check it works (no client, ~10 s)

bash
# List all 24 tools straight from the published package:npx -y @modelcontextprotocol/inspector --cli npx -y flario --method tools/list
# Or call one, a proof-carrying FLR/USD price on mainnet:npx -y @modelcontextprotocol/inspector --cli npx -y flario \  --method tools/call --tool-name get_ftso_anchor_feed \  --tool-arg feed_id=FLR/USD --tool-arg network=mainnet

Start here: seven prompts, no Flare knowledge required

Tools answer questions. Prompts tell you what to ask in the first place. Flario ships seven, and they show up in your MCP client's prompt list once it is connected — in Claude Desktop, the + menu in the message box.

PromptWhat it does
Show me what Flare can doA guided tour through live calls: a price, the same price carrying a proof you verify locally, FAssets state. Start here if Flare is new to you.
Verify a price without trusting anyoneReads one feed twice, plain and proof-carrying, then walks through exactly what earned the verified: true — which leaf, which fold, which contract the root came from.
Turn a web API into a provable factWeb2Json end to end, including the trap: a valid proof only proves the data came from the URL inside it, not that the URL deserves your trust.
Check FAssets system healthA real risk read on live agent collateral against live prices, not a description of how FAssets works.
Prove what an agent acted onBundles the facts behind a decision, then attacks the bundle so you can watch the verification catch a forged one.
Watch Flare 2.0 roll outReads the confidential-compute deployment off the chain — which networks have it, what it can do — while the rollout is still happening.
Why Flare, for someone building agentsThe case for and against, grounded in calls rather than the marketing site, including where the ecosystem is weak.

Every prompt instructs the model to run the calls for real against the live network and then explain what happened, so you end up with actual numbers and a mental model at the same time. They are deliberately written to admit when something is not live yet rather than talk around it.

Watch Flare 2.0 arrive

Flare's confidential compute is being deployed right now, one network at a time, and Flare has not published an ABI for it — FlareTeeManager is absent from the periphery artifacts, alpha releases included. fcc_deployment_status reads it anyway, because the interesting facts do not need an ABI.

As of 1 September 2026 it reports:

Confidential compute is registered on: coston.Not yet on: mainnet, songbird, coston2.
coston: FlareTeeManager @ 0xc4885998f5D792ed88C5Af7a3AaCBe333f017658  ERC-2535 diamond, 18 facets, 198 selectors, 0 unrecognised  live state: 11 governance signers, machine allowlist revised 4 times  fdc2Hub()          -> 0x064C7B68B0e2BC87e7bE34e89741485Fcb48FA2F  (has code)  fdc2Verification() -> 0x21D3842E39A3b62ba15CD8A5D2ED5cEDea931502  (has code)

The capabilities come out of the selectors: Protocol Managed Wallets, remote attestation of TEE machines and their code hashes, multi-signature governance over the machine allowlist, randomness generated inside the enclave, and FDC V2 wiring.

Why selectors instead of function calls

A tool built on guessed function signatures breaks the moment Flare finalises the interface. Selectors are the routing table inside the diamond — they are facts on-chain, and a rename does not move them. So the tool reports what is exact (facets, selectors, addresses, wiring, governance state) and flags what is inferred: human-readable names come from a public signature database, and the report says so every time it prints one. All 198 resolved and are thematically coherent, which makes the mapping almost certainly right, but "almost certainly" is what gets printed rather than something firmer.

This is a testnet deployment of an unfinished system and anything in it can change. That is the point of a monitor rather than an integration.

Prove what an agent acted on

Every other tool here verifies a fact at the moment you ask, and then that verification evaporates — it survives as a sentence in a tool response nobody can re-check later. Evidence bundles close that gap.

evidence_bundle collects proof-carrying facts into one portable object. evidence_verify is the receiving end: it rebuilds every leaf from its own body, folds it through its Merkle proof, and compares the result against Relay.merkleRoots(protocol, round) read on-chain right then. The person verifying does not have to trust the agent that produced the bundle, this server, the data-availability layer, or any API. They need an RPC endpoint and nothing else.

Facts are verified before they go into a bundle. A fact that fails is refused, not flagged, because a bundle whose contents might be false is worse than no bundle at all. A Web2Json fact without expect_source is refused for the same reason — an unbound proof attests to whatever URL sits inside it.

The hash is not the security boundary

bundle_hash is tamper-evidence. It catches accidental corruption and casual edits, and an attacker who edits a bundle on purpose can simply recompute it. That is fine, because the hash was never what held. Here is the interesting case, run for real on mainnet:

podmieniona wartosc 7116 -> 21348, hash przeliczony na nowoverified: false | bundle_hash_intact: true | facts_failed: 1reason: the proof does not fold to the on-chain FTSO Scaling root

The attacker tripled a price and recomputed the hash so the integrity check passes. Verification still fails, because producing a Merkle proof that folds to a root Flare's validators already signed is not something you can do by editing a JSON file.

What a bundle does not prove

It does not prove the agent was honest about its reasoning, that these were the only facts it looked at, or that its conclusion follows from them. It proves that these specific facts were true, in these voting rounds. That is a narrower claim than "audit trail", and the narrowness is deliberate.

It is also a different claim from the one most verifiable-tool-call work makes. Attesting that a server executed correctly — via TEE, ZK over execution, or a server signature — still asks you to trust the operator or their hardware. This attests to the fact itself, against consensus, which needs a chain where the oracle is part of the protocol rather than a contract someone deployed.

Tools

Every tool validates its input with zod and returns a clear error instead of crashing when an RPC call or data source is down. Twenty-two tools are free. The two premium tools settle via x402 on Flare when the operator turns it on, and are free otherwise.

ToolNetworksTierWhat it does
get_flr_balancemainnet, coston2, songbird, costonFreeNative FLR plus wrapped WFLR (WNat) balance for an address
get_flr_stake_infomainnet, coston2, songbird, costonFreePortfolio: FLR and WFLR, vote power, delegation, claimable rewards by source, FlareDrops
get_ftso_feedmainnet, coston2, songbird, costonFreeLatest price for one FTSO feed ("FLR/USD" or a bytes21 id)
get_ftso_feeds_allmainnet, coston2, songbird, costonFreeLatest price for every bundled feed
get_ftso_providersmainnet, coston2 (see note)FreeActive FTSO data providers
get_ftso_anchor_feedmainnet, coston2, songbird, costonFreeProof-carrying FTSO Scaling price plus a Merkle proof, checked locally against the on-chain Relay root
get_ftso_historymainnet, coston2, songbird, costonFreeRecent FTSO Scaling anchor-feed history from the public DA layer, each point Merkle-verified
get_fassets_statusmainnet, coston2FreeFAssets minted total and agent count (short summary; see fassets_system_state)
get_fdc_proof_statusmainnet, coston2, songbird, costonFreeFDC Merkle root and finalization for a round
get_smart_account_infomainnet, coston2 (see note)FreeResolve the Flare address of an XRPL account
fdc_request_attestationmainnet, coston2, songbird, costonFreePrepare, and optionally submit, an FDC attestation request. Returns tx hash and voting round id
fdc_get_attestation_proofmainnet, coston2, songbird, costonFreeFetch a proof from the DA layer and verify it locally against the on-chain Relay root
fassets_agent_statusmainnet, coston2, songbirdFreePer-agent collateral ratios, minting capacity, liquidation status (riskiest first)
fassets_system_statemainnet, coston2, songbirdFreeTotal minted, lot size, minting cap and pause, aggregate collateral, redemption queue
fassets_agent_detailsmainnet, coston2, songbirdFreeAgent name, description, logo, terms of use, whitelist status (AgentOwnerRegistry)
songbird_fcc_registrysongbird (default), allFreeScan the live contract registry for Flare Confidential Compute (PMW, TEE) deployments
fdc_verify_settlementmainnet, coston2, songbird, costonFreeProve an x402 settlement via enshrined FDC (EVMTransaction attestation) and bind it to the payment
fdc_web2json_requestmainnet, coston2, songbird, costonFreeTurn any public web API into a verifiable fact: URL plus jq filter plus ABI signature, prepared through a Flare verifier
fdc_verify_web2jsonmainnet, coston2, songbird, costonFreeVerify a Web2Json proof locally AND bind it to the source you expected, then decode the payload
fassets_liquidation_scannermainnet, coston2, songbirdPremium (x402)FAssets agents joined with live FTSO prices: per-agent liquidation price and how far away it is
fdc_bulk_proof_bundlemainnet, coston2, songbird, costonPremium (x402)Batch fetch and local verification of up to 20 FDC proofs

Notes on a few tools:

  • Premium tools run free unless the operator sets X402_ENABLED=true. See How payments work.
  • get_ftso_providers needs an external indexer endpoint (set with an env var below). Aggregating providers on-chain isn't practical for a read-only stdio server.
  • get_smart_account_info is best-effort. The MasterAccountController ABI isn't published in the periphery artifacts yet, so it returns a has_account: false notice when it can't resolve.

The FDC attestation flow

text
1. fdc_request_attestation  (type: Payment | AddressValidity | EVMTransaction,                             source_chain: xrp | btc | doge | eth | flr | sgb)     -> verifier prepareRequest -> fee quote -> FdcHub.requestAttestation     -> { tx_hash, voting_round_id, abi_encoded_request }2. wait ~90 to 180 s for the voting round to finalize3. fdc_get_attestation_proof (voting_round_id, abi_encoded_request)     -> DA-layer proof -> local keccak256 Merkle fold -> must equal        Relay.merkleRoots(200, round) read on-chain -> verified response

Without FLARE_PRIVATE_KEY, step 1 returns mode: "prepared_only" with the encoded request, the fee, and the FdcHub address, so you can submit it with your own signer. When the key is set, it only ever signs locally.


How payments work (x402)

Flario implements the x402 payment protocol over MCP. As far as I know it's the first MCP server whose paid tools settle on the same chain they serve. HTTP's 402 status and X-Payment header map onto tool results and a tool argument:

text
1. call a paid tool                -> result: { x402_payment_required: true,                                                accepts: [requirements] }2. sign an EIP-3009 TransferWithAuthorization off-chain (gasless for the payer)3. retry the SAME call with         -> x402_payment: base64(JSON payload)4. the server checks the EIP-712 signature locally, checks the nonce on-chain,   settles transferWithAuthorization on Flare, runs the tool   -> result includes x402_payment_receipt (settlement summary) and      x402_receipt (a portable, ZK-ready receipt; see RECEIPT_SPEC.md)

The built-in facilitator never holds funds. transferWithAuthorization moves the tokens straight from payer to payee, and the operator key only pays gas to broadcast the authorization the client already signed. Replay is blocked twice over: EIP-3009 nonces are consumed on-chain, and settled nonces are also cached in the process.

Every paid call returns a portable x402_receipt. It's a fixed-schema, self-describing record where the payer shows up only as a Poseidon commitment, never in plaintext, with a keccak256 receipt_hash any holder can recompute to check for tampering. A payer can blind the commitment with an optional commitment_salt in the payment payload. Full spec: RECEIPT_SPEC.md.


Prove any web fact (Web2Json)

FDC's Web2Json type fetches JSON from a URL, runs a jq filter over it, and returns ABI-encoded data. That means any public API can become a fact a smart contract is able to check. Flario wraps the whole loop for an agent:

text
1. fdc_web2json_request  (url + post_process_jq + abi_signature)     -> a Flare verifier validates it and quotes the fee     -> submit to FdcHub (your key), get a voting round id2. wait ~90 to 180 s for the round to finalize3. fdc_verify_web2json  (voting_round_id + abi_encoded_request + expect_source)     -> Merkle proof checked locally against Relay.merkleRoots(200, round)     -> attested URL bound to the source you expected     -> payload decoded with the request's own ABI signature

Why expect_source matters

Flare's own guide is blunt about the trap (URL parsing security):

A valid FDC proof only guarantees the data came from the URL in the proof. It does not guarantee the URL is trustworthy.

So a proof that passes Merkle verification is only half the story. An attacker can stand up their own endpoint, get a completely valid attestation for it, and hand you that proof. fdc_verify_web2json therefore does both jobs: it verifies the proof, and it binds the proof to the source you actually meant to use.

json
{  "expect_source": {    "hosts": ["api.coingecko.com"],    "path_prefix": "/api/v3/simple/price",    "require_https": true,    "http_method": "GET"  }}

If the attested URL does not match, the call fails loudly even though the cryptography is fine. Leave expect_source out and you still get the proof, but the response is marked source_bound: false with a warning, because that is the path an attacker can walk through.

Binding uses a real URL parser instead of string prefix matching, which closes three bypasses that naive checks miss:

AttackLooks likeWhy prefix matching fails
Userinfohttps://[email protected]/priceStarts with the trusted string, but the host is evil.com
Homographhttps://аpi.coingecko.com/price (Cyrillic а)Visually identical, different host
Path injectionhttps://api.coingecko.com/evil/api/v3/simple/priceContains the expected path, does not start with it

Each of these has a test in test/web2json.test.ts.

Here is a real verified response from Coston2, using the same API Flare's own Web2Json guide uses (trimmed):

json
{  "verified": true,  "source_bound": true,  "verification": "Two checks passed. The Merkle proof folds to Relay.merkleRoots(200, round) read on-chain, and the attested request matches the source you expected (protocol, host, path, method).",  "voting_round_id": 1409295,  "source": {    "url": "https://swapi.info/api/people/3",    "http_method": "GET",    "parsed": { "protocol": "https", "host": "swapi.info", "path": "/api/people/3" }  },  "data": { "name": "R2-D2", "height": "96", "mass": "32" }}

Ask for the same proof while expecting a different host and the call fails on purpose, even though the cryptography is perfectly valid:

text
The FDC proof is VALID (Merkle-verified against the on-chain Relay root) but itdoes NOT come from the source you expected: attested host "swapi.info" is not inthe expected list (api.coingecko.com). Treat this data as untrusted.

FDC-verified settlement (the part I'm proudest of)

A receipt claims a payment settled. Flare can prove it did, using the chain's own enshrined data connector. fdc_verify_settlement takes a settlement tx, gets an FDC EVMTransaction attestation over it, verifies the Merkle proof locally against the on-chain Relay root, and then binds the attestation to the payment: it confirms the attested transaction really contains an ERC-20 Transfer of the asset to the payee for at least the amount. The result is a receipt whose fdc_attestation_ref makes the settlement provable without trusting the facilitator. No other chain in the x402 ecosystem produces a protocol-level receipt like this. The tool never submits a transaction itself (the attestation request is permissionless, so the holder submits it), which means a hosted hub can't be tricked into burning gas.

Operator setup:

bash
X402_ENABLED=trueX402_NETWORK=coston2            # mainnet also needs X402_ALLOW_MAINNET=trueX402_PAY_TO=0xYourPayeeAddressFLARE_PRIVATE_KEY=0x...         # operator gas key for settlements# optional: X402_TOKEN_ADDRESS, X402_PRICE_DEFAULT=0.001,#           X402_PRICE_FASSETS_LIQUIDATION_SCANNER=0.005 (whole-token units)

Payment tokens (EIP-3009, checked on-chain in July 2026): Coston2 defaults to 0xce13911D4896200b543a61E4ae8E829E661Dd8EB (a test USDT0), and mainnet defaults to the official USD₮0 at 0xe7cd86e13AC4309349F30B3435a9d337750fC82D. You can walk the whole agent flow with npx tsx scripts/x402-demo-client.ts.


Run it as a hub

You can run Flario as a network service instead of a local stdio process:

bash
npx flario --http 8402         # or FLARIO_HTTP_PORT=8402# to expose it beyond localhost:FLARIO_HTTP_HOST=0.0.0.0 npx flario --http 8402
EndpointWhat it serves
POST /mcpThe full MCP server over Streamable HTTP (stateless), all 24 tools, x402 in-band
GET /api/premium/liquidation-scanner?asset=FXRP&network=mainnetHTTP x402: 402 plus accepts[], retry with the X-Payment header, get the result plus X-Payment-Response
POST /api/premium/proof-bundleSame x402 flow. Body: {"requests":[{"voting_round_id":N,"abi_encoded_request":"0x..."}],"network":"..."}
GET /Discovery: endpoints, x402 config, pricing
GET /healthzLiveness

The REST endpoints use the standard x402 wire format (base64 JSON in X-Payment), so non-MCP agents and existing x402 clients can pay too. There's a Dockerfile in the repo:

bash
docker build -t flario-hub . && docker run -p 8402:8402 \  -e X402_ENABLED=true -e X402_PAY_TO=0xYou -e FLARE_PRIVATE_KEY=0x... flario-hub

Networks

NetworkChain IDDefault RPCOverride env var
Flare Mainnet14https://flare-api.flare.network/ext/C/rpcFLARE_RPC
Coston2 Testnet114https://coston2-api.flare.network/ext/C/rpcFLARE_RPC_TESTNET
Songbird Canary19https://songbird-api.flare.network/ext/C/rpcFLARE_RPC_SONGBIRD
Coston Testnet16https://coston-api.flare.network/ext/C/rpcFLARE_RPC_COSTON

Contract addresses are never hardcoded. They're resolved at runtime through the Flare ContractRegistry at 0xaD67FE66660Fb8dFE9d6b1b4240d8650e30F6019 (same address on all four networks). The FDC verifier and Data Availability endpoints default to the Flare-hosted public services listed at dev.flare.network/network/overview.

Configuration

Everything here is optional. The server runs against the public RPCs and Flare-hosted FDC services with no config at all.

VariableUsed byPurpose
FLARE_RPCall mainnet callsOverride the mainnet RPC endpoint.
FLARE_RPC_TESTNETall Coston2 callsOverride the Coston2 RPC endpoint.
FLARE_RPC_SONGBIRDall Songbird callsOverride the Songbird RPC endpoint.
FLARE_RPC_COSTONall Coston callsOverride the Coston RPC endpoint.
FLARE_PRIVATE_KEYfdc_request_attestation, fdc_web2json_requestLocal signing key for submitting attestation requests. Never logged, never leaves the process except as a signed tx. Leave it out for prepared-only mode.
FLARIO_HUB_ALLOW_SUBMIThub modeAllow on-chain attestation submission in hub mode. Off by default so an anonymous caller cannot spend the operator's gas. See Security posture.
FDC_VERIFIER_API_KEYfdc_request_attestationVerifier API key. Defaults to the public key 00000000-0000-0000-0000-000000000000.
FLARE_DA_API_KEYfdc_get_attestation_proofDA-layer API key. Defaults to the public key.
FLARE_DA_URLfdc_get_attestation_proofOverride the DA-layer base URL (for example a self-hosted instance).
X402_ENABLEDpremium toolstrue turns on the x402 paywall for premium tools. Off by default, so premium tools are free.
X402_NETWORKx402Settlement network (default coston2; mainnet also needs X402_ALLOW_MAINNET=true).
X402_PAY_TOx402Payee address that receives payments (required when enabled).
X402_TOKEN_ADDRESSx402EIP-3009 payment token override (defaults: Coston2 test USDT0, mainnet USD₮0).
X402_PRICE_DEFAULT / X402_PRICE_<TOOL>x402Prices in whole-token units (default 0.001).
FLARE_PROVIDERS_APIget_ftso_providersAn indexer endpoint that returns a JSON array of providers (or { "providers": [...] }).
FLARE_METRICS_APIget_fassets_statusOptional fallback metrics API, used only if the on-chain read fails.

See .env.example for a copy-paste template.


Security posture

This thing touches money, so the defaults lean paranoid.

  • No custody, anywhere. Flario never holds or forwards funds. x402 settlement moves tokens straight from payer to payee inside transferWithAuthorization; the operator key only pays gas to broadcast an authorization the client already signed.
  • Verify, then bind. Every proof-consuming tool does two things, not one. A Merkle proof that checks out is necessary but not sufficient, so fdc_verify_settlement binds the attestation to the actual ERC-20 Transfer, and fdc_verify_web2json binds it to the source you expected. A valid proof for the wrong thing is rejected with a precise reason.
  • Submission is off by default in hub mode. In stdio mode you are the only caller, so spending your own gas on an attestation request is what you asked for. In hub mode anyone who reaches the port is a caller, and the operator key exists to settle x402 payments, so letting a stranger trigger paid on-chain requests would drain it. Hub mode therefore refuses on-chain submission and returns the prepared request instead, unless the operator sets FLARIO_HUB_ALLOW_SUBMIT=true.
  • Keys stay local. FLARE_PRIVATE_KEY is read from the environment, used to sign in-process, and never logged or transmitted anywhere except as an already-signed transaction to the RPC you configured.
  • Replay protection is doubled. EIP-3009 nonces are consumed on-chain, and settled nonces are also cached in-process to close the window between broadcast and on-chain visibility.
  • No per-user data is collected or stored. There is no analytics, no database, no transaction-graph logging. Receipts belong to whoever holds them.
  • Contract addresses are never hardcoded. They resolve at runtime through the Flare ContractRegistry, and every protocol constant in the source cites the Flare doc it came from.

Found something? Open an issue, or reach me privately if it's sensitive.


Development

bash
git clone https://github.com/dziuba0x/flario.gitcd flarionpm install
npm run dev      # watch mode via tsx, no build stepnpm run build    # type-check and compile to dist/npm test         # offline test suite, recorded fixtures, no networknpm start        # run the compiled servernpm run inspect  # open the MCP Inspector against the built server
npx tsx scripts/live-check.ts   # live checks against public RPCs (mainnet, Coston2, Songbird)

Stack: TypeScript (ESM, Node 18+), @modelcontextprotocol/sdk, viem, zod, and @flarenetwork/flare-periphery-contract-artifacts.

The build emits an executable dist/index.js (with a #!/usr/bin/env node shebang) wired to the flario bin. You can test a single tool without a client using the Inspector CLI:

bash
npx @modelcontextprotocol/inspector --cli node dist/index.js \  --method tools/call --tool-name get_ftso_feed \  --tool-arg feed_id=FLR/USD --tool-arg network=mainnet

License

MIT, Dziuba Technology / Alan Dziuba.

Built on Flare Network. Issues and contributions welcome.

來源:README.md,提交 7a9e6a9

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.6.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分