Labsco
IQAIcom logo

BAMM

โ˜… 1

from IQAIcom

Interact with the Borrow Automated Market Maker (BAMM) protocol on the Fraxtal blockchain.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

BAMM MCP Server

npm version License: MIT

Overview

The BAMM MCP Server enables AI agents to interact with Borrow Automated Market Maker (BAMM) contracts on the Fraxtal blockchain. This server provides comprehensive access to BAMM positions, lending, borrowing, and collateral management operations.

By implementing the Model Context Protocol (MCP), this server allows Large Language Models (LLMs) to manage BAMM positions, borrow against LP tokens, and perform other operations related to the BAMM protocol directly through their context window.

Features

  • Position Management: View and manage your active BAMM positions across all pools.
  • Lending Operations: Lend Fraxswap LP tokens to BAMM contracts to earn yield.
  • Borrowing: Borrow tokens against your collateral from BAMM positions.
  • Collateral Management: Add or remove collateral from your BAMM positions.
  • Pool Analytics: Access statistics for all BAMM pools.

MCP Tools

<!-- AUTO-GENERATED TOOLS START -->

ADD_COLLATERAL

Add collateral to your BAMM position

ParameterTypeRequiredDescription
bammAddressstringYesThe address of the BAMM contract
amountstringYesThe amount of collateral to add
collateralTokenstringThe address of the collateral token
collateralTokenSymbolstringThe symbol of the collateral token (e.g., 'IQT')

BORROW

Borrow tokens from a BAMM position

ParameterTypeRequiredDescription
bammAddressstringYesThe address of the BAMM contract
amountstringYesThe amount to borrow
borrowTokenstringThe address of the token to borrow
borrowTokenSymbolstringThe symbol of the token to borrow (e.g., 'IQT')

LEND

Lend Fraxswap LP tokens to a BAMM contract

ParameterTypeRequiredDescription
bammAddressstringYesThe address of the BAMM contract
amountstringYesThe amount of LP tokens to lend

REMOVE_COLLATERAL

Remove collateral from your BAMM position

ParameterTypeRequiredDescription
bammAddressstringYesThe address of the BAMM contract
amountstringYesThe amount of collateral to remove
collateralTokenstringThe address of the collateral token
collateralTokenSymbolstringThe symbol of the collateral token (e.g., 'IQT')

REPAY

Repay borrowed tokens to a BAMM position

ParameterTypeRequiredDescription
bammAddressstringYesThe address of the BAMM contract
amountstringYesThe amount to repay
borrowTokenstringThe address of the token to repay
borrowTokenSymbolstringThe symbol of the token to repay (e.g., 'IQT')

WITHDRAW

Withdraw LP tokens from a BAMM contract by redeeming BAMM tokens

ParameterTypeRequiredDescription
bammAddressstringYesThe address of the BAMM contract
amountstringYesThe amount of BAMM tokens to withdraw
<!-- AUTO-GENERATED TOOLS END -->

Development

Build Project

pnpm run build

Development Mode (Watch)

pnpm run watch

Linting & Formatting

pnpm run lint
pnpm run format

Project Structure

  • src/tools/: Individual tool definitions
  • src/services/: API client and business logic
  • src/lib/: Shared utilities
  • src/index.ts: Server entry point

Resources

Disclaimer

This project interacts with blockchain smart contracts and handles cryptocurrency transactions. Users should exercise caution, verify all data independently, and understand the risks involved in DeFi operations.

License

MIT