Skip to main content
The IFÁ Labs MCP Server exposes seven tools covering every aspect of the oracle infrastructure — from live price reads to asset discovery to network configuration. This page is the complete reference for all of them.

Tool Overview


get_asset_price

Fetches the current on-chain price for a single supported asset directly from the deployed oracle contract.

Inputs

Output

Usage Notes

  • price is the human-readable value after decimal scaling. Use this for display and LLM responses.
  • raw_price is the unscaled int256 value from the contract. Use this when passing the value to Solidity logic.
  • age_seconds is computed at the time of the tool call. It reflects how long ago the oracle was last updated, not how long ago you queried it.
  • If the asset is not supported, the tool returns an error with "error": "asset_not_supported".

Example Prompt

“What is the current USDT/USD price on Base Mainnet?”

get_multiple_prices

Fetches current on-chain prices for multiple assets in a single RPC call. More efficient than calling get_asset_price repeatedly when you need several feeds at once.

Inputs

Output

Usage Notes

  • Results are returned in the same order as the input assets array.
  • Each result includes an exists field. If false, that asset is not supported and its price fields will be zero.
  • Always check exists before using a price from a batch result.

Example Prompt

“Get the current prices for USDT, CNGN, and ZARP from IFÁ Labs.”

get_derived_pair

Computes a cross-asset price between two supported feeds using the oracle’s derived pair functions. For example: how much USDT is one CNGN worth, or how much CNGN is one USDT worth.

Inputs

Output

Usage Notes

  • "forward" direction means: how much of asset1 is one unit of asset0 worth?
  • "backward" direction means: how much of asset0 is one unit of asset1 worth?
  • The interpretation field is a plain-language summary of the derived price — useful for LLM responses and user-facing output.
  • Both underlying USD feeds must be fresh for the derived pair to return a valid result. If either feed is stale, the tool returns a staleness error.

Example Prompts

“How much USDT is one CNGN worth right now?”
“What is the ZARP to USDC exchange rate according to IFÁ Labs?”

get_supported_assets

Returns the complete list of all currently supported assets, including their symbol strings, bytes32 asset IDs, categories, and available networks.

Inputs

Output

Usage Notes

  • The category field distinguishes global stablecoins, emerging-market stablecoins, and reference assets like ETH.
  • This tool does not make an RPC call — asset metadata is resolved locally from the server’s configuration. It is the fastest tool call available.
  • Use this tool at the start of any workflow that needs to discover or validate which assets are available before querying prices.

Example Prompt

“Which stablecoins does IFÁ Labs currently support?”

get_asset_id

Resolves an asset symbol string to its bytes32 asset ID. Useful for developers who need to verify an ID before hardcoding it in a contract, or for AI workflows that need to translate a human-readable symbol into an on-chain identifier.

Inputs

Output

Usage Notes

  • The generation_method field shows exactly how the asset ID was derived — allowing independent verification.
  • verified: true confirms the asset ID exists as an active feed in the deployed contract. verified: false means the ID was generated correctly but no feed exists for it yet.
  • Symbol strings are case-sensitive. "usdt/usd" and "USDT-USD" will not match. Always use uppercase with a forward slash: "USDT/USD".

Example Prompt

“What is the IFÁ Labs asset ID for ZARP/USD?”

check_price_freshness

Checks the age of a price feed and evaluates whether it meets a given staleness threshold. Returns the raw age, a freshness verdict, and the time remaining before the feed would be considered stale.

Inputs

Output

Usage Notes

  • is_fresh is the primary signal. true means the feed is within the specified max_age_seconds threshold.
  • time_until_stale_seconds is only present when is_fresh is true. It tells you how long until the feed would breach your threshold at the current update time — useful for scheduling proactive checks.
  • Use this tool before executing any critical workflow that depends on a fresh price — a deployment, a settlement, a liquidation simulation.

Example Prompts

“Is the CNGN/USD price feed fresh enough to use for a liquidation check?”
“How long until the USDT/USD feed goes stale based on a 30-minute threshold?”

get_network_info

Returns contract addresses, RPC endpoints, chain IDs, and block explorer links for all networks supported by IFÁ Labs.

Inputs

Output

Usage Notes

  • Use this tool when building automated workflows that need to programmatically resolve contract addresses or RPC endpoints rather than hardcoding them.
  • The status field distinguishes production deployments from testnets.
  • RPC URLs returned are the public defaults. For production workflows, override with a dedicated provider using the --rpc-url server argument.

Example Prompt

“What is the IFÁ Labs oracle contract address on Base Mainnet?”

Error Reference

All tools return a consistent error format when something goes wrong:

Next Steps

Example Queries

Practical prompts and real workflows for every MCP client.

MCP Client Compatibility

Detailed compatibility notes for every supported MCP client.