A modern UI interface for interacting with Mantle Network's DeFi protocols through an MPC (Multi-Party Computation) server. This project provides real-time data and analytics for various DeFi protocols on Mantle Network.
This third-party MPC Server serves as a bridge between AI workspaces and Mantle Network's DeFi ecosystem. It enables users to query real-time data about token prices, total value locked (TVL), and protocol-specific metrics directly from their AI workspaces like Cursor, Claude, and T3Chat.
With a sleek glassmorphic UI design, the server provides an intuitive interface for visualizing and interacting with onchain data, making it easier to analyze DeFi trends and make informed decisions.
- Real-time Token Data: Get live price updates for any token on Mantle Network using contract addresses
- Comprehensive TVL Analytics: View total value locked metrics across the network and for specific tokens
- Protocol Insights: Deep analytics for major protocols like Merchant Moe and Treehouse
- Interactive UI: Modern glassmorphic design with responsive layouts and animations
- AI Workspace Integration: Seamless connection with AI tools like Cursor, Claude, and T3Chat
- Live Data Streaming: Real-time updates through server-sent events (SSE)
- Type-safe Implementation: Built with TypeScript for robust code quality
- Treehouse Protocol: Leading lending platform on Mantle
- Merchant Moe: Innovative DEX on Mantle Network
mantle-mcp/
βββ api/ # API endpoints for the MPC server
βββ lib/ # Core libraries and utility functions
βββ public/ # Static assets and UI
β βββ index.html # Main UI interface
β βββ mantle.png # Project image assets
βββ scripts/ # Utility scripts
β βββ test-client.mjs # Test client for MPC server
βββ .gitignore # Git ignore file
βββ package.json # Project dependencies
βββ README.md # Project documentation
βββ tsconfig.json # TypeScript configuration
βββ vercel.json # Vercel deployment configuration
The MPC server provides the following tools for interacting with Mantle Network:
{
name: 'get-token-price',
description: 'Get the price of a token in mantle network',
parameters: {
contract_address: 'string'
}
}{
name: 'get-ltv',
description: 'Get the total value locked of mantle network'
}
{
name: 'get-USDT-tvl',
description: 'Get the total value locked of USDT on Mantle'
}
{
name: 'get-USDC-tvl',
description: 'Get the total value locked of USDC on Mantle'
}{
name: 'get-protocol-merchant-moe-summary',
description: 'Get key metrics for the Merchant Moe protocol on Mantle'
}
{
name: 'get-protocol-treehouse-protocol-summary',
description: 'Get key metrics for a Tree House on Mantle'
}- Node.js 16.x or higher
- npm or yarn
- Basic understanding of DeFi and Mantle Network
- Clone the repository:
git clone https://github.com/OkeyAmy/mantle-mcp.git
cd mantle-mcp- Install dependencies:
npm install
# or with yarn
yarn install- Test the MPC server connection:
node scripts/test-client.mjs- Start the UI server:
npx serve public
# The UI will be available at http://localhost:3000The project is configured for easy deployment on Vercel:
# Install Vercel CLI
npm install -g vercel
# Deploy
vercelTo integrate with your AI workspace, add the following configuration to your MCP config:
{
"mcpServers": {
"onchain-context": {
"type": "remote",
"url": "https://mantle-mcp.vercel.app/sse",
"supportsStreaming": true
}
}
}- Configure your workspace with the MCP config
- Ask questions like:
What's the current TVL of Mantle Network?What's the price of MNT token at contract address 0x1234...?
Follow similar configuration steps as above, then use the interface to query data directly through your chat interface.
Here are some example prompts you can try with each tool:
- "What is the current price of USDT on Mantle? Please use the contract address 0x123..."
- "Can you track the price movement of MNT token over the last hour using its contract address?"
- "What is the total value locked in the entire Mantle Network right now?"
- "Compare the TVL between USDT and USDC on Mantle Network and show me the difference."
- "Show me the key performance metrics for Merchant Moe, including trading volume and liquidity."
- "What are the current lending rates and total deposits in the Treehouse Protocol?"
- "Give me a comprehensive overview of Mantle's DeFi ecosystem, including TVL, top protocols, and stablecoin metrics."
- "Analyze the relationship between MNT token price and Treehouse Protocol's TVL."
The interface uses a modern glassmorphic design with:
- Smooth transitions and hover states
- Dynamic background blur effects
- Responsive layout for mobile and desktop
- Animated components for better user engagement
- High contrast for accessibility
You can customize the UI by modifying the styles in public/index.html.
- Navbar: Fixed top navigation with quick access links
- Hero Section: Introduces the MPC server with animation
- GitHub Integration: Links to the repository with tech details
- Protocol Cards: Information about supported protocols
- Feature Highlights: Showcases key features with icons
- Integration Guide: Code snippet for connecting to AI tools
- Tools Documentation: Details about available API tools
- Mantle Network RPC: Direct blockchain data access
- DeFiLlama API: Aggregated TVL and protocol metrics
- Protocol-specific APIs:
- Merchant Moe for DEX-related data
- Treehouse for lending platform statistics
Contributions are welcome and appreciated! Here's how you can contribute:
- Fork the repository
- Create a branch for your feature (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please ensure your code follows the project's coding style and includes appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions, suggestions, or collaboration opportunities, please open an issue on GitHub or reach out through the repository contacts.
An independent project for the Mantle ecosystem