# Mflo Documentation > Mflo is the data kernel for AI agents — a pay-per-query dataset marketplace built on the x402 HTTP standard and EIP-3009 meta-transactions. It provides instant, structured data access for AI agents, bots, and LLMs without requiring API keys or subscriptions. Key features: - x402 Payment Required HTTP responses for micro-payments - Model Context Protocol (MCP) integration for AI agents - EIP-3009 meta-transactions for gasless payments - Wallet-based authentication (no API keys required) - Pay-per-query pricing model with stablecoins - Structured datasets across multiple categories The platform consists of: - x402_DMP (Dataset Marketplace) - Web UI for browsing datasets - x402_API - Resource server handling payments and data serving - Smart Contracts - EIP-3009 compatible mUSDC on Monad Network - MCP Server - Model Context Protocol integration for AI agents ## Overview - [FAQs](pages/overview/faqs.mdx) - [Getting started](pages/overview/getting-started.mdx) - [What is Mflo?](pages/overview/index.mdx) ### FAQs # Frequently Asked Questions ## General Questions ### What is Mflo? Mflo is a pay-per-query dataset marketplace built on the x402 HTTP standard and EIP-3009 meta-transactions. It enables AI agents to access structured data without API keys or subscriptions. ### How is this different from traditional APIs? Traditional APIs require API keys, monthly subscriptions, and complex authentication. Mflo uses wallet-based authentication and micro-payments — you only pay for what you query. ## Technical Questions ### What wallets are supported? Currently, MetaMask is supported for the web interface. The MCP server supports any wallet that can provide a private key. ### What tokens are accepted? The demo uses mUSDC, a custom ERC20 token with 6 decimals. In production, this could be USDT, USDC or other stablecoins. ### How much do queries cost? Dataset price: - 0.50 mUSDC ### Can I use this in production? The current implementation is a proof-of-concept for demonstration purposes. The smart contracts include warnings about production use and recommend audited alternatives. ## Setup Questions ### How do I get test tokens? 1. **Visit [Faucet](https://mflo.ai/faucet)** 2. **Connect your wallet** 3. **Add the Monad Testnet Network and Token** to your wallet 4. **Mint mUSDC (Testnet Stable Token)** for testing transactions ### Can I run this without the web interface? Yes! The MCP server allows AI agents to access datasets directly without the web UI. ## MCP Integration ### What is MCP? Model Context Protocol (MCP) is a standard that allows AI agents to access external tools and data sources securely. ### Which AI agents support MCP? - VS Code with Cline extension - Cursor IDE (built-in) - Claude Desktop - Custom agent frameworks ### Do I need to clone repositories? No! The MCP server installs via `npx @mfloai/x402-mcp@demo` — no repository cloning required. ## Payment Questions ### Do users pay gas fees? No! EIP-3009 meta-transactions allow the facilitator (server) to pay gas fees while users only sign messages. ### What happens if a payment fails? Common failures include: - Insufficient token balance - Expired authorization (time bounds) - Already-used nonce (replay protection) - Invalid signature ### Can I get refunds? Payments are final once processed on-chain. However, failed payments are not executed, so no tokens are transferred. ### How are payments verified? The x402_API server verifies EIP-712 signatures and executes the `transferWithAuthorization` function on the smart contract. ## Security Questions ### Is my private key safe? Private keys are only used locally by the MCP server process. Use dedicated keys with minimal permissions and rotate them regularly. ### How are replay attacks prevented? Each payment authorization includes a unique nonce. Once used, the nonce cannot be reused, preventing replay attacks. ### What about time-based attacks? Authorizations include `validAfter` and `validBefore` timestamps, creating time-bound validity windows. ## Troubleshooting ### Wallet not connecting? - Ensure Wallet is installed and unlocked - Check that you're on the correct network (Monad Testnet) - Try refreshing the page or restarting the browser ### Payment signatures failing? - Verify your wallet has sufficient mUSDC balance - Check that the contract address is correct in your environment - Ensure you're on the right network ### MCP server not starting? - Verify Node.js ≥ 20 is installed - Check that your `PRIVATE_KEY` is properly formatted (starts with `0x`) - Try running the server manually first: `npx -y @mfloai/x402-mcp@demo` ### 402 errors in production? - Ensure the x402_API server is running and accessible - Verify payment requirements are being returned correctly - Check server logs for payment verification errors ## Still Have Questions? **Ask us on X (Twitter)** - Follow [@mfloai](https://twitter.com/mfloai) for updates and support. ### Getting started # Getting Started Welcome to Mflo! This guide will help you start accessing datasets through our x402 payment system. Choose the method that best fits your needs: ## Quick Access to Dataset The easiest way to try Mflo is through our web interface using your crypto wallet - no complicated MCP setup required. ### What You'll Need - A crypto wallet like **MetaMask** or any EVM-compatible wallet - Some tokens for dataset payments (small amounts needed for most queries) ### Step-by-Step Instructions 1. **Visit the Mflo Website** - Navigate to [Mflo.ai](https://mflo.ai) in your browser - Browse available datasets without needing to sign in 2. **Connect Your Wallet** - Click "Connect Wallet" when you're ready to access paid data - Choose your wallet (MetaMask or any EVM-compatible wallet) - Approve the connection in your wallet 3. **Access Dataset** - Find a dataset you want to query - Click "Query" or "Access Data" - Your wallet will prompt you to sign the x402 payment - Approve the transaction to access the data 4. **View Your Data** - Once payment is confirmed, the dataset will load - Data is delivered instantly through the x402 standard **Note**: This method requires tokens for payments, but it's the quickest way to explore Mflo's capabilities with just a wallet connection. ## For Developers & AI Agents: MCP Client Access Advanced users can also integrate Mflo into AI agents and development workflows using the **Model Context Protocol (MCP)**. With MCP integration, your AI agents running inside IDEs or frameworks (MCP clients) can connect to the **x402 MCP Server** and access datasets directly — with payments handled automatically in the background. 👉 See [MCP Integration](/agents/mcp-integration) for setup instructions 👉 See [MCP Clients](/agents/mcp-clients) for details on supported environments ### Benefits of MCP Integration - **Seamless AI workflows**: Your agents can access live data without manual intervention - **Automatic payments**: No need to manually approve each transaction - **Real-time data**: Get the latest information directly in your AI conversations - **Developer-friendly**: Integrate into any MCP-compatible system ## What's Next? Once you're set up with either method: - **Explore datasets**: Browse our [available datasets](/datasets) - **Learn about payments**: Understand [x402 payment concepts](/x402/concepts) - **Advanced integrations**: Check out [MCP integration](/agents/mcp-integration) for custom setups - **Get support**: Visit our [FAQ section](/overview/faqs) for common questions ## For AI Developers ### 🤖 **Integrate Mflo Knowledge into Your AI** Want to give your AI agents comprehensive knowledge about Mflo? Download our LLM.txt file: **[📥 llm.txt](/llm.txt)** — Complete documentation in AI-friendly format Perfect for: - Training custom AI agents about Mflo - Providing context to LLMs for accurate responses - Building AI-powered integrations with comprehensive knowledge - Reducing hallucination with up-to-date documentation Simply download and include in your AI system's context or training data. ## Need Help? - **Quick questions**: Check our [FAQ section](/overview/faqs) - **Technical issues**: Review our troubleshooting guides in each integration section - **Custom integrations**: Contact our team for enterprise solutions Start with the method that matches your technical comfort level - you can always upgrade to MCP integration later for more advanced use cases! ### What is Mflo? # What is Mflo? Mflo is the data kernel for AI agents — a pay-per-query dataset marketplace built on the x402 HTTP standard and EIP-3009 meta-transactions. It provides instant, structured data access for AI agents, bots, and LLMs without requiring API keys or subscriptions. Powered by the Model Context Protocol (MCP) and x402, Mflo enables on-demand access across any dataset. MCP ensures seamless interoperability with AI agents and LLM ecosystems, while x402 standardizes payments and transport. Together, they make Mflo the foundation for universally accessible data in the age of intelligent agents. ## Core Concept Traditional data APIs require: - 🔑 **API Keys** - Complex authentication setup - 💳 **Subscriptions** - Monthly commitments regardless of usage - 🏗️ **Integration overhead** - Custom SDKs and rate limiting Mflo uses **x402 Payment Required** HTTP responses to enable: - ⚡ **Instant access** - Pay only for what you query - 🤖 **Agent-native** - MCP (Model Context Protocol) integration - 🔐 **Wallet-based auth** - Wallet signing, no API keys - 💰 **Micro-payments** - Pay per dataset query with stablecoins ## How It Works 1. **AI agent requests data** → x402_API server returns `402 Payment Required` 2. **Payment prompt** → User signs EIP-712 message via Wallet like Metamask 3. **Payment settlement** → EIP-3009 meta-transaction processes payment 4. **Data delivery** → Protected dataset served instantly ## Architecture The Mflo ecosystem consists of: - **x402_DMP** (Dataset Marketplace) - Web UI for browsing and testing datasets - **x402_API** - Resource server handling payment verification and data serving - **Smart Contracts** - EIP-3009 compatible mUSDC testnet stablecoin on Monad Network for payments - **MCP Server** - Model Context Protocol integration for AI agents ## Key Features ### 🔗 **MCP-Native Integration** Built-in Model Context Protocol server allows AI agents to query datasets directly through natural language. ### 💸 **x402 Pay-Per-Query** HTTP 402 "Payment Required" standard enables micro-payments for individual data requests. ### 🏦 **EIP-3009 Meta-Transactions** Off-chain signed payments settled on-chain without gas fees for users. ### 📊 **Structured Data** All datasets provide schema definitions and sample data for easy agent integration. ### 🚀 **Instant Access** No registration, no API keys — just connect your wallet and start querying. ## Use Cases - **AI Agent Data Access** — Real-time market data, weather, news feeds - **Research & Analysis** — Historical datasets for training and backtesting - **Micro-payment Testing** — Demonstrating x402 and EIP-3009 standards - **Decentralized Data Markets** — Proof-of-concept for trustless data exchange ## For AI Developers ### 📄 **LLM.txt Documentation** Access our complete documentation in LLM-friendly format: **[📥 Download llm.txt](/llm.txt)** — Complete Mflo documentation optimized for AI systems This file contains all our documentation in the [LLM.txt standard format](https://llmstxt.org/), making it easy to: - Feed into your AI agents and LLMs - Get accurate, up-to-date information about Mflo - Integrate Mflo knowledge into your AI applications - Reduce hallucination with comprehensive context **File Stats:** ~48KB • 1,266 lines • 6,713 words • Auto-updated ## x402 Payment - [Concepts](pages/x402/concepts.mdx) - [Supported Wallets](pages/x402/supported-wallets.mdx) - [Testing x402](pages/x402/testing-x402.mdx) - [Testnet Tokens](pages/x402/testnet-tokens.mdx) ### Concepts # x402 Payment Concepts The Mflo platform implements the **x402 HTTP Payment Required** standard combined with **EIP-3009 meta-transactions** to enable seamless micro-payments for data access. ## Glossary - **[x402](https://x402.org/)** is an HTTP standard based on the 402 "Payment Required" status code. The 402 code was reserved in the HTTP specification but not defined. x402 uses it to create a clear protocol for pay-per-request web services: when you request a protected resource, the server shows the payment required, and after payment, you get access to the data or service. - **[EIP-3009](https://eips.ethereum.org/EIPS/eip-3009)** defines a method for **off-chain authorization of ERC-20 token transfers**. Instead of sending on-chain approval transactions, users sign messages that authorize token transfers. These signed messages can be executed by third parties, allowing seamless transfers while eliminating gas fees for the end user. ### How It Works 1. **Client makes request** to protected resource 2. **Server responds with 402** including payment requirements 3. **Client processes payment** using the specified method 4. **Client retries request** with payment proof 5. **Server validates payment** and serves the resource ### Payment Requirements Format When a resource requires payment, the server responds with: ```json { "error": "Payment required", "paymentRequired": { "paymentRequirements": [ { "scheme": "exact", "network": "localhost", "payTo": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "maxAmountRequired": "50000000" } ] } } ``` ## EIP-3009 Meta-Transactions EIP-3009 enables **off-chain authorization** of token transfers that can be executed by third parties. ### Key Benefits - **No gas fees for users** — Facilitator pays transaction costs - **Offline signing** — Users sign messages, not transactions - **Replay protection** — Nonces prevent duplicate authorizations - **Time bounds** — Authorizations can have validity windows ### Authorization Flow ```mermaid sequenceDiagram participant User participant Web Client participant x402 API participant Blockchain User->>Web Client: Request dataset Web Client->>x402 API: GET /api/datasets/id x402 API->>Web Client: 402 Payment Required Web Client->>User: Request payment signature User->>Web Client: Sign EIP-712 message Web Client->>x402 API: POST with X-Payment header x402 API->>Blockchain: Execute transferWithAuthorization Blockchain->>x402 API: Transfer confirmed x402 API->>Web Client: Resource data ``` ## Security Considerations ### Nonce Management - Each authorization uses a unique nonce - Prevents replay attacks - Tracked on-chain in `authorizationState` mapping ### Time Bounds - `validAfter` - Authorization not valid before this timestamp - `validBefore` - Authorization expires after this timestamp - Prevents indefinite authorization reuse ### Signature Verification - EIP-712 structured data signing - Domain separation prevents cross-contract attacks - Cryptographic proof of user intent ## Error Handling Common payment errors and their meanings: - **"not yet valid"** — Current time < validAfter - **"authorization expired"** — Current time > validBefore - **"authorization used"** — Nonce already consumed - **"invalid signature"** — Signature verification failed - **"insufficient funds"** — User balance too low ### Supported Wallets # Supported Wallets ## Summary The x402 payment system supports any cryptocurrency wallet that implements standard signing methods, particularly EIP-712 structured data signing. This includes the vast majority of EVM-compatible wallets, making x402 accessible to users across the Ethereum ecosystem and compatible networks. ## General Requirements Any wallet that supports the following standards is compatible with x402: - **EIP-712 Structured Data Signing** — Required for creating payment authorizations - **EVM Compatibility** — Must work with Ethereum and EVM-compatible networks - **Standard JSON-RPC Methods** — Support for `eth_signTypedData_v4` or similar signing methods This broad compatibility means that most modern cryptocurrency wallets work seamlessly with the x402 payment protocol without requiring special integrations or modifications. ## Supported Wallet Categories | Wallet Category | Description | |-----------------|-------------| | **EVM-Compatible Wallets** | Any wallet supporting EIP-712 signing on Ethereum and EVM networks. Includes popular options like MetaMask, Trust Wallet, Coinbase Wallet, Rainbow, and many others. These wallets provide the standard signing interface required for x402 payments. | | **CDP Wallet** | Coinbase Developer Platform wallet, specifically recommended in the documentation for its robust developer tooling and seamless integration with x402 payment flows. Offers excellent support for structured data signing and meta-transactions. | | **AgentKit** | Developer-focused wallet solution designed for AI agent integrations. Provides programmatic access to signing capabilities, making it ideal for automated systems and AI agents that need to execute x402 payments without manual user intervention. | ## Key Features ### **Universal Compatibility** The x402 standard leverages existing wallet infrastructure, meaning no special wallet modifications or plugins are required. If your wallet can sign EIP-712 messages, it can process x402 payments. ### **No Additional Setup** Users don't need to install special extensions or configure additional settings. The payment flow works through standard wallet signing interfaces that users are already familiar with. ## Developer Integration ### **Web Applications** ```javascript // Works with any EIP-712 compatible wallet const signature = await window.ethereum.request({ method: 'eth_signTypedData_v4', params: [userAddress, typedData] }); ``` ### **Mobile Applications** Mobile wallets that support WalletConnect or similar protocols can integrate with x402-enabled applications through standard connection methods. ### **Programmatic Access** For AI agents and automated systems, wallets like AgentKit provide programmatic signing capabilities: ```javascript // Example with AgentKit or similar programmatic wallet const wallet = new ProgrammaticWallet(privateKey); const signature = await wallet.signTypedData(domain, types, message); ``` ## Testing and Development ### **Local Development** For testing x402 integrations, any wallet that can connect to local networks (like Hardhat's localhost:8545) will work. MetaMask is commonly used for local development due to its easy network configuration. ### **Testnet Support** All supported wallets can be configured to work with testnets, allowing developers to test x402 payment flows without using real funds. ## Security Considerations ### **Private Key Management** - Use dedicated wallets for x402 payments when possible - Implement spending limits through wallet settings - Regularly rotate keys for programmatic wallets - Monitor transaction history for unusual activity ### **Network Security** - Verify you're connected to the correct network before signing - Double-check payment amounts and recipients - Use hardware wallets for high-value operations when supported ## Getting Started 1. **Choose any EVM-compatible wallet** from the categories above 2. **Configure for your target network** (mainnet, testnet, or local) 3. **Ensure sufficient token balance** for payments 4. **Connect to x402-enabled applications** using standard wallet connection methods The x402 protocol's wallet-agnostic design ensures that users can leverage their existing wallet preferences while accessing pay-per-query datasets and services. ### Testing x402 # Testing x402 ## Testing x402 Payments ### Prerequisites Before testing x402 payments, ensure you have: - **Monad Testnet** added to your wallet - **MON tokens** for gas fees - **mUSDC tokens** for payment testing - **Wallet connected** to Mflo webpage ### Basic Testing Flow 1. **Connect your wallet** to Mflo webpage 2. **Select a dataset** or service requiring payment 3. **Approve the x402 payment** in your wallet 4. **Sign the payment authorization** using EIP-712 5. **Verify the transaction** on the [Monad block explorer](https://testnet.monadexplorer.com/) 6. **Check the data** to ensure you received the correct dataset or service response ### Example Payment Transaction ```javascript // Example x402 payment structure const paymentData = { recipient: "0x...", // Service provider address amount: "1000000", // 1 mUSDC (6 decimals) token: "0x72c0839d3CAcb2FB77569c221EDB3A547C6a242d", // mUSDC contract nonce: 12345, deadline: 1234567890 }; ``` ## Troubleshooting ### Common Issues | Issue | Solution | |-------|----------| | **Network not found** | Manually add Monad Testnet using the configuration above | | **No MON for gas** | Request MON tokens from the faucet | | **mUSDC not showing** | Import the token contract manually in your wallet | | **Transaction failing** | Ensure sufficient MON balance for gas fees | | **Payment not processing** | Verify mUSDC balance and allowance | ### Getting Help - **Community Support**: Follow [@Mflo](https://x.com/MfloAI) X account - **Block Explorer**: Use `https://testnet.monadexplorer.com/` to verify transactions ## Security Notes - **Testnet only**: These tokens have no real value - **Private keys**: Keep your testnet private keys secure but separate from mainnet - **Reset wallets**: Consider using dedicated testnet wallets - **Regular updates**: Network parameters may change during testnet phases ### Testnet Tokens # Testnet Tokens ## Overview Testnet tokens allow developers and users to test Mflo functionality without using real cryptocurrency. These tokens are specifically designed for testing and development purposes. ## Monad Testnet The primary testnet for Mflo development and testing is the [Monad](https://monad.xyz/) Testnet. Monad is a high-performance EVM-compatible blockchain optimized for decentralized applications. ### Network Configuration | Parameter | Value | |-----------|-------| | **Network Name** | Monad Testnet | | **Default RPC URL** | `https://testnet-rpc.monad.xyz/` | | **Chain ID** | `10143` | | **Currency Symbol** | MON | | **Block Explorer URL** | `https://testnet.monadexplorer.com/` | ### Adding Monad Testnet to Your Wallet **Easy Method:** Click the "Add Monad Testnet to Wallet" button to automatically configure your wallet. **Manual Method:** If the button doesn't work or you prefer manual setup: 1. **Open your wallet** and navigate to network settings 2. **Select "Add Network"** or "Custom RPC" 3. **Enter the network details**: - Network Name: `Monad Testnet` - RPC URL: `https://testnet-rpc.monad.xyz/` - Chain ID: `10143` - Currency Symbol: `MON` - Block Explorer URL: `https://testnet.monadexplorer.com/` 4. **Save** and switch to the Monad Testnet ## Test Stable Token ### mUSDC (Mflo USDC) mUSDC is a test stablecoin designed for testing stable payment functionality on Monad Testnet by Mflo. It mimics the behavior of USD stablecoins but has no real-world value, making it perfect for development and testing x402 payment flows without financial risk. **Token Details:** ``` Token Contract: 0x72c0839d3CAcb2FB77569c221EDB3A547C6a242d Token Symbol: mUSDC Decimals: 6 ``` ### Adding mUSDC to Your Wallet **Easy Method:** - Click the "Add mUSDC to Wallet" button to automatically add the token to your wallet **Manual Method:** If the buttons don't work or you prefer manual setup: 1. **Switch to Monad Testnet** in your wallet 2. **Import custom token** using the contract address 3. **Enter token details**: - Contract Address: `0x72c0839d3CAcb2FB77569c221EDB3A547C6a242d` - Token Symbol: `mUSDC` - Decimals: `6` 4. **Add token** to see your mUSDC balance ## Getting Testnet Tokens There are two ways to get testnet MON tokens: ### Option 1: Mflo Faucet Use the Mflo faucet to get both MON and mUSDC tokens in one place: - **MON tokens**: For gas fees on Monad Testnet - **mUSDC tokens**: For testing x402 payments Simply connect your wallet to the Mflo faucet and request tokens. ### Option 2: Monad Official Faucet Visit the [Monad Faucet](https://faucet.monad.xyz/) and follow their steps to get MON tokens for gas fees. Note that this option only provides MON tokens - you'll still need to get mUSDC separately through the Mflo faucet or other methods. ## Build for Agents - [MCP Clients](pages/agents/mcp-clients.mdx) - [MCP integration](pages/agents/mcp-integration.mdx) ### MCP Clients # MCP Client Setup This page shows you how to set up different AI tools to work with the Mflo x402 MCP server. > **Prerequisites**: First get your MCP server configuration from [x402 MCP Server Integration](/agents/mcp-integration). ## Supported Clients Choose your AI tool: - [Visual Studio Code (with Cline)](#visual-studio-code-with-cline) - [Cursor IDE](#cursor-ide) - [Claude Desktop](#claude-desktop) ## Setup Instructions ### Visual Studio Code (with Cline) 1. **Install Cline extension** - Go to Extensions in VS Code - Search for "Cline" and install it 2. **Add MCP server** - Open Settings → search "MCP Servers" - Paste your JSON configuration from the integration page - Set your `PRIVATE_KEY` 3. **Restart VS Code** - Command Palette → "Developer: Reload Window" 4. **Test it** - Open Cline panel - Ask: "list datasets" - The AI will connect to the MCP server and show results ### Cursor IDE 1. **Open Cursor settings** - Go to Cursor → Settings - Search for "MCP" 2. **Add MCP server** - Paste your JSON configuration - Set your `PRIVATE_KEY` 3. **Restart Cursor** 4. **Test it** - In Chat/Composer, ask: "list datasets" - Cursor will connect and return data ### Claude Desktop 1. **Find config file** - Location: `~/Library/Application Support/Claude/claude_desktop_config.json` 2. **Add configuration** ```json { "mcpServers": { "@mfloai/x402-mcp": { "command": "npx", "args": [ "-y", "-p", "@mfloai/x402-mcp@demo", "x402-mcp" ], "env": { "PRIVATE_KEY": "EVM_PRIVATE_KEY" } } } } ``` 3. **Restart Claude Desktop** 4. **Test it** - Ask Claude: "list available datasets" - Claude will use the MCP server automatically ## What You Can Do Once set up, your AI can: - **Browse datasets**: "What datasets are available?" - **Get data details**: "Show me details for the Bitcoin dataset" - **Query data**: "Get me the latest Bitcoin price" - **Download datasets**: "Download the crypto trading data" The AI handles all payments automatically using your private key. ## Additional Integrations ### Continue.dev (VS Code Extension) Continue.dev provides AI coding assistance with MCP tool support. **Setup**: 1. Install Continue extension in VS Code 2. Configure MCP server in Continue settings 3. Enable tool usage in your Continue configuration **Use Cases**: - Data-driven code generation - Real-time market data for trading algorithms - Research assistance with live datasets ### Cody by Sourcegraph Cody can integrate with MCP servers for enhanced context. **Integration**: - Configure MCP server in Cody settings - Use datasets for code analysis and suggestions - Access real-time data during development ### Custom Agent Frameworks #### LangChain Integration ```python from langchain.tools import Tool from mcp_client import MCPClient # Connect to Mflo MCP server mcp = MCPClient("npx @mfloai/x402-mcp@demo") # Create LangChain tools dataset_tool = Tool( name="get_crypto_data", description="Get cryptocurrency price data", func=mcp.call_tool ) ``` #### AutoGen Integration ```python from mcp_integration import MfloMCPTool # Add Mflo tools to AutoGen AI agent agent = autogen.AssistantAgent( name="data_analyst", tools=[MfloMCPTool()] ) ``` #### CrewAI Integration ```python from crewai import Agent, Tool from mflo_mcp import MfloDataTool agent = Agent( role='Data Analyst', tools=[MfloDataTool()] ) ``` ## Enterprise Integrations ### Jupyter Notebooks Use the MCP server in data science workflows: ```python # Call MCP server directly result = subprocess.run([ "npx", "@mfloai/x402-mcp@demo", "--tool", "get_dataset", "--args", "{\"id\": \"crypto-prices\"}" ], capture_output=True, text=True) data = json.loads(result.stdout) ``` ### API Gateway Integration Proxy MCP tools through your existing API infrastructure: ```javascript // Express.js middleware app.post('/api/mcp/:tool', async (req, res) => { const { tool } = req.params; const result = await mcpClient.callTool(tool, req.body); res.json(result); }); ``` ### Slack/Discord Bots Integrate dataset access into chat platforms: ```javascript // Discord.js bot with MCP bot.on('messageCreate', async (message) => { if (message.content.startsWith('!crypto')) { const data = await mcpClient.callTool('get_crypto_data'); message.reply('Current BTC price: ' + data.price); } }); ``` ## Development Frameworks ### Next.js Applications Server-side dataset fetching with MCP: ```javascript // pages/api/data.js const mcp = new MCPClient(); const data = await mcp.getDataset(req.query.id); res.json(data); } ``` ### React Components Client-side MCP integration: ```jsx function DatasetViewer({ datasetId }) { const { data, loading, error } = useMCP('get_dataset', { id: datasetId }); if (loading) return