Skip to content
VS Code

BagOS for VS Code

io.github.edycutjong/bagos

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

client:VS Code transport:stdio runtime:npm

Install BagOS in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "bags-api-key",
      "description": "BAGS_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "bags-network",
      "description": "BAGS_NETWORK",
      "password": true
    },
    {
      "type": "promptString",
      "id": "solana-rpc-url",
      "description": "SOLANA_RPC_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "bags-keypair-path",
      "description": "BAGS_KEYPAIR_PATH",
      "password": true
    },
    {
      "type": "promptString",
      "id": "bags-max-sol-per-tx",
      "description": "BAGS_MAX_SOL_PER_TX",
      "password": true
    },
    {
      "type": "promptString",
      "id": "bags-max-sol-per-session",
      "description": "BAGS_MAX_SOL_PER_SESSION",
      "password": true
    },
    {
      "type": "promptString",
      "id": "bags-allow-unconfirmed",
      "description": "BAGS_ALLOW_UNCONFIRMED",
      "password": true
    },
    {
      "type": "promptString",
      "id": "bos-token-mint",
      "description": "BOS_TOKEN_MINT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "bos-required-balance",
      "description": "BOS_REQUIRED_BALANCE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "bags-allow-uncapped-token-swaps",
      "description": "BAGS_ALLOW_UNCAPPED_TOKEN_SWAPS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "use-mock-data",
      "description": "USE_MOCK_DATA",
      "password": true
    }
  ],
  "servers": {
    "bagos": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "bagos-mcp-server"
      ],
      "env": {
        "BAGS_API_KEY": "${input:bags-api-key}",
        "BAGS_NETWORK": "${input:bags-network}",
        "SOLANA_RPC_URL": "${input:solana-rpc-url}",
        "BAGS_KEYPAIR_PATH": "${input:bags-keypair-path}",
        "BAGS_MAX_SOL_PER_TX": "${input:bags-max-sol-per-tx}",
        "BAGS_MAX_SOL_PER_SESSION": "${input:bags-max-sol-per-session}",
        "BAGS_ALLOW_UNCONFIRMED": "${input:bags-allow-unconfirmed}",
        "BOS_TOKEN_MINT": "${input:bos-token-mint}",
        "BOS_REQUIRED_BALANCE": "${input:bos-required-balance}",
        "BAGS_ALLOW_UNCAPPED_TOKEN_SWAPS": "${input:bags-allow-uncapped-token-swaps}",
        "USE_MOCK_DATA": "${input:use-mock-data}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

BagOS in other clients