Skip to content
MCP server

BagOS

MCP server for Bags on Solana: token analytics, trade quotes, and gated write operations.

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
3.0.7
Listing updated
5 days ago

About BagOS

BagOS is an open-source MCP server. It runs locally on your machine and is started by your AI client.

Install

Run in a terminal

claude mcp add bagos --env BAGS_API_KEY='<BAGS_API_KEY>' --env SOLANA_RPC_URL='<SOLANA_RPC_URL>' -- npx -y bagos-mcp-server

Add to claude_desktop_config.json

{
  "mcpServers": {
    "bagos": {
      "command": "npx",
      "args": [
        "-y",
        "bagos-mcp-server"
      ],
      "env": {
        "BAGS_API_KEY": "<BAGS_API_KEY>",
        "SOLANA_RPC_URL": "<SOLANA_RPC_URL>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "bagos": {
      "command": "npx",
      "args": [
        "-y",
        "bagos-mcp-server"
      ],
      "env": {
        "BAGS_API_KEY": "<BAGS_API_KEY>",
        "SOLANA_RPC_URL": "<SOLANA_RPC_URL>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "bagos": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "bagos-mcp-server"
      ],
      "env": {
        "BAGS_API_KEY": "<BAGS_API_KEY>",
        "SOLANA_RPC_URL": "<SOLANA_RPC_URL>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "bagos": {
      "command": "npx",
      "args": [
        "-y",
        "bagos-mcp-server"
      ],
      "env": {
        "BAGS_API_KEY": "<BAGS_API_KEY>",
        "SOLANA_RPC_URL": "<SOLANA_RPC_URL>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "bagos": {
      "command": "npx",
      "args": [
        "-y",
        "bagos-mcp-server"
      ],
      "env": {
        "BAGS_API_KEY": "<BAGS_API_KEY>",
        "SOLANA_RPC_URL": "<SOLANA_RPC_URL>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • BAGS_API_KEYBags API key from dev.bags.fm. Required for all tools.Required
  • BAGS_NETWORKSolana cluster: devnet (default) or mainnet. Writes on mainnet move real funds.
  • SOLANA_RPC_URLCustom Solana RPC endpoint. Defaults to the public RPC for BAGS_NETWORK.
  • BAGS_KEYPAIR_PATHPath to a Solana keypair JSON file. Only required for write tools.
  • BAGS_MAX_SOL_PER_TXHard cap on SOL spent by any single transaction. Default 0.1.
  • BAGS_MAX_SOL_PER_SESSIONHard cap on total SOL spent across one server session. Default 1.0.
  • BAGS_ALLOW_UNCONFIRMEDSet true to skip the two-step confirmation on writes. Default false.
  • BOS_TOKEN_MINTMint address of the BOS token used for gating write tools.
  • BOS_REQUIRED_BALANCEMinimum BOS balance required to call write tools. Default 10000.
  • BAGS_ALLOW_UNCAPPED_TOKEN_SWAPSPermit non-SOL-input swaps, which the SOL-denominated caps cannot limit.
  • USE_MOCK_DATAMakes bags_get_claimable_fees return fabricated data instead of calling the API. Default false.

Pricing

Open source

BagOS FAQ

Is BagOS free?

Yes. BagOS is open source, so you can use and self-host it for free.

How do I add BagOS to Claude Code?

Run this command in your terminal: claude mcp add bagos --env BAGS_API_KEY='<BAGS_API_KEY>' --env SOLANA_RPC_URL='<SOLANA_RPC_URL>' -- npx -y bagos-mcp-server

Where this comes from

  • Description: from the official MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers