Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ifalabs.com/llms.txt

Use this file to discover all available pages before exploring further.

This page walks through installing the IFÁ Labs MCP Server and connecting it to every major MCP-compatible client. The server runs locally on your machine and communicates with IFÁ Labs’ deployed oracle contracts on your behalf.

Prerequisites

Before installing, confirm you have the following:
  • Node.js v18 or higher — the MCP server is a Node.js process. Check your version with node --version.
  • npm or yarn — for installation.
  • An MCP-compatible client — Claude Desktop, Cursor, Windsurf, TRAE, or any other listed in Supported MCP Clients.
No wallet, private key, or gas is required to run the IFÁ Labs MCP Server. All oracle reads are view calls — free, read-only, and require no on-chain signing.

Step 1: Install the MCP Server

    npm install -g @ifalabs/mcp-server
Verify the installation:
ifa-mcp --version

Step 2: Configure Your Client

Select your MCP client below and follow the configuration steps.
Claude Desktop supports MCP servers via a JSON configuration file.
1

Locate the config file

Open or create the Claude Desktop MCP configuration file:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
2

Add the IFÁ Labs server

Add the following to your mcpServers block:
        {
          "mcpServers": {
            "ifalabs": {
              "command": "ifa-mcp",
              "args": ["--network", "base-mainnet"]
            }
          }
        }
3

Restart Claude Desktop

Fully quit and relaunch Claude Desktop. The IFÁ Labs tools will appear in the tools panel on the next launch.
4

Verify the connection

In a new Claude conversation, ask:
“What is the current USDT/USD price from IFÁ Labs?”
Claude should call the get_asset_price tool and return a live on-chain value.

Configuration Options

The IFÁ Labs MCP Server accepts the following arguments:
ArgumentValuesDefaultDescription
--networkbase-mainnet, base-sepolia, assetchain-testnetbase-mainnetThe network to read oracle data from
--rpc-urlAny valid RPC URLNetwork defaultOverride the default RPC endpoint
--max-price-ageInteger (seconds)3600Default staleness threshold for freshness checks
--portInteger3000Port for SSE transport mode (if applicable)
--log-levelsilent, error, info, debugerrorLogging verbosity
Example — connect to Base Sepolia for development:
ifa-mcp --network base-sepolia --log-level info
Example — use a custom RPC provider:
ifa-mcp --network base-mainnet --rpc-url https://base-mainnet.g.alchemy.com/v2/YOUR_API_KEY
For production workflows, use a dedicated RPC provider — Alchemy, QuickNode, or Infura — rather than the public Base RPC endpoint. Public endpoints are rate-limited and not suitable for high-frequency tool calls.

Connecting to Testnet

For development and testing against live testnet oracle data, point the server at Base Sepolia:
{
  "mcpServers": {
    "ifalabs": {
      "command": "ifa-mcp",
      "args": ["--network", "base-sepolia"]
    }
  }
}
All supported assets are available on Base Sepolia with the same asset IDs as mainnet. Prices reflect testnet oracle state and may differ from mainnet values.

Using with Custom Agents and Frameworks

For LangChain, CrewAI, AutoGen, or any custom MCP-compatible agent framework, the server can be connected programmatically:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

const transport = new StdioClientTransport({
  command: "ifa-mcp",
  args: ["--network", "base-mainnet"],
});

const client = new Client(
  { name: "my-agent", version: "1.0.0" },
  { capabilities: {} }
);

await client.connect(transport);

// List available tools
const tools = await client.listTools();
console.log(tools);

// Call a tool
const result = await client.callTool({
  name: "get_asset_price",
  arguments: { asset: "USDT/USD", network: "base-mainnet" },
});

console.log(result);
Windows users running programmatic integrations should use the node command with the full path to dist/index.js in the StdioClientTransport config, or use npx with -y @ifalabs/mcp-server.

Verifying the Connection

Once configured, verify the server is connected and returning live data with these test prompts in your client:
Test PromptExpected Behaviour
”List all supported IFÁ Labs assets”Returns all asset symbols and IDs via get_supported_assets
”What is the current USDT/USD price from IFÁ Labs?”Returns live price via get_asset_price
”Is the CNGN/USD feed fresh?”Returns age and freshness status via check_price_freshness
”Get the ZARP/USD asset ID”Returns 0x12373a3b1c4827c84bf6d7b11df100442695d0abfdb7a20d30a41d67d58e75a8 via get_asset_id
If any of these fail, work through the troubleshooting steps below.

Troubleshooting

ifa-mcp: command not found The global install did not complete successfully or the npm global bin directory is not in your PATH. Run npm list -g @ifalabs/mcp-server to confirm installation, then check your PATH configuration. On Windows, use the node or npx format instead. Connection closed immediately on Windows Cursor and some other clients on Windows cannot resolve the ifa-mcp binary. Switch to the node format with the full path to dist/index.js, or use npx -y @ifalabs/mcp-server. See the Cursor tab above for exact config blocks. Server appears in client but tools return errors Confirm the --network argument matches a supported network. Check --log-level info output for RPC connection errors. Prices return stale or unexpected values on testnet Testnet oracle state is independent of mainnet. Prices on Base Sepolia reflect testnet relayer activity and may be less fresh than mainnet feeds during low-activity periods. Client doesn’t recognise the server after config change Most MCP clients require a full restart — not just a settings save — to pick up configuration changes. Fully quit and relaunch your client. Rate limit errors on the default RPC Switch to a dedicated RPC provider using --rpc-url. See the Configuration Options table above.

Next Steps

Available Tools

Full reference for every tool the IFÁ Labs MCP Server exposes.

Example Queries

Practical prompts and workflows for using IFÁ Labs via MCP clients.