Logo: BAMM (Fraxtal DeFi)

BAMM (Fraxtal DeFi)

Organisatioun
BrainDAO

Model Context Protocol Server for Borrow Automated Market Maker

EditeurBrainDAO
Repositorymcp-bamm
SproochTypeScript
Forks
1
Stären
1
Disponibel Tools
7
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    BAMM (Fraxtal DeFi) bitt MCP-Funktiounen un, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • Disponibel Tools: 7

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an deem MCP-Client ze konfiguréieren, deen Dir am léifste benotzt.

  • Interessi vun der Communautéit um Open-Source-Projet

    Zuele vum verlinkte Repository – Stären: 1, Forks: 1.

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.

Installation

Using npx (Recommended)

To use this server without installing it globally:

bash
npx @iqai/mcp-bamm

Build from Source

bash
git clone https://github.com/IQAIcom/mcp-bamm.git
cd mcp-bamm
pnpm install
pnpm run build

Running with an MCP Client

Add the following configuration to your MCP client settings (e.g., claude_desktop_config.json).

Minimal Configuration

json
{
  "mcpServers": {
    "bamm": {
      "command": "npx",
      "args": ["-y", "@iqai/mcp-bamm"],
      "env": {
        "WALLET_PRIVATE_KEY": "your_wallet_private_key_here"
      }
    }
  }
}

Advanced Configuration (Local Build)

json
{
  "mcpServers": {
    "bamm": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-bamm/dist/index.js"],
      "env": {
        "WALLET_PRIVATE_KEY": "your_wallet_private_key_here"
      }
    }
  }
}

Configuration (Environment Variables)

VariableRequiredDescriptionDefault
WALLET_PRIVATE_KEYYesPrivate key of the wallet for signing transactions-

Security Note: Handle your private key with extreme care. Ensure it is stored securely and only provided to trusted MCP client configurations.

Usage Examples

Position Management

  • "What are my current BAMM positions?"
  • "Show me the stats for all BAMM pools."

Lending & Borrowing

  • "Lend 100 LP tokens to the BAMM at address 0x..."
  • "Borrow 50 FRAX from my BAMM position."
  • "Repay 25 FRAX to my BAMM position."

Collateral Operations

  • "Add 100 FRAX as collateral to my BAMM position."
  • "Remove 50 USDC collateral from my position."
  • "Withdraw my LP tokens from the BAMM."

MCP Tools

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

Development

Build Project

bash
pnpm run build

Development Mode (Watch)

bash
pnpm run watch

Linting & Formatting

bash
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

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "bamm-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-bamm"
      ],
      "env": {
        "WALLET_PRIVATE_KEY": "your_wallet_private_key_here"
      }
    }
  }
}

Disponibel Tools

  • ADD_COLLATERAL

    Add collateral to your BAMM position

  • BORROW

    Borrow tokens from a BAMM position

  • GET_POSITIONS

    Get all your active BAMM positions

  • LEND

    Lend Fraxswap LP tokens to a BAMM contract

  • POOL_STATS

    Get statistics for all BAMM pools

  • REMOVE_COLLATERAL

    Remove collateral from your BAMM position

  • REPAY

    Repay borrowed tokens to a BAMM position

BAMM (Fraxtal DeFi) MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal BAMM (Fraxtal DeFi) verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung, fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector: D'Optioun „Dësen Apparat“ ass ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Setzt de kopéierte Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

BAMM (Fraxtal DeFi) als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a setzt d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Setzt d'MCP-Serverkonfiguratioun fir BAMM (Fraxtal DeFi) an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert d'Säit, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "bamm-fraxtal-defi": {
      "command": "npx",
      "args": [
        "-y",
        "@iqai/mcp-bamm"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vun der Integratioun BAMM (Fraxtal DeFi). Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vun der Integratioun BAMM (Fraxtal DeFi).
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierten MCP-Tools an engem ausgewielte KI-Modell
Kënnt Dir mir mat BAMM (Fraxtal DeFi) bei dëser Aufgab hëllefen?
BAMM (Fraxtal DeFi)
Jo. Ech hunn et gelies.
Dat hunn ech mat BAMM (Fraxtal DeFi) fonnt.

Heefeg gestallte Froen

Fir wat gëtt den MCP-Server BAMM (Fraxtal DeFi) benotzt?

BAMM (Fraxtal DeFi) ass en MCP-Server, deen et kompatibele KI-Clienten erlaabt, op extern Tools a Kontextinformatioune zouzegräifen. An TypingMind kënnt Dir dësen MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech BAMM (Fraxtal DeFi) MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir BAMM (Fraxtal DeFi) mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni den MCP-Server fir all Modell separat anzeriichten.

Firwat BAMM (Fraxtal DeFi) MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann BAMM (Fraxtal DeFi) verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Ären Aarbechtsoflaf beim Chatten an TypingMind organiséieren.

Wéi verbannen ech BAMM (Fraxtal DeFi) MCP mat TypingMind?

BAMM (Fraxtal DeFi) leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann den MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt BAMM (Fraxtal DeFi) MCP an TypingMind zur Verfügung?

BAMM (Fraxtal DeFi) stellt 7 MCP-Tools zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agente zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir BAMM (Fraxtal DeFi) MCP ze benotzen?

Nee. TypingMind ass nom Local-first-Prinzip opgebaut a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann BAMM (Fraxtal DeFi) eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir deen MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇