Skip to main content

Connecting Baremetrics to AI Tools via MCP (Claude, Cursor, Codex)

How to connect Baremetrics to AI coding tools like Claude Desktop, Cursor, and Codex using the Baremetrics MCP server.

Written by Jacci Keefe

Overview

Baremetrics supports the Model Context Protocol (MCP), which allows you to connect your Baremetrics data directly to AI coding tools like Claude Desktop, Cursor, and Codex. Once connected, you can query your metrics, customers, and revenue data conversationally inside your AI tool of choice.

⚠️ Note: Web-based MCP clients (e.g. Claude.ai in the browser) are not yet supported — OAuth support is coming soon. Desktop clients are currently the only ones supported.


What You Need

  • A Baremetrics account (trial or paid)

  • Your Baremetrics API key — find it at Settings → API (starts with lk_)

  • A supported AI tool (Claude Desktop, Claude Code, Cursor, or Codex)


Claude Desktop & Claude Code

Option 1: One-command setup (Claude Code required)

If you have Claude Code installed, run this command in your terminal — it works for both Claude Desktop and Claude Code:

claude mcp add baremetrics https://app.baremetrics.com/mcp \  --transport http \  --scope user \  --header "Authorization: Bearer <BM_API_KEY>"

Replace <BM_API_KEY> with your live API key from Settings → API (e.g. lk_*******************).

Option 2: Manual setup

If you don't have Claude Code, you can add the entry manually to your .claude.json file:

  • macOS & Linux: ~/.claude.json

  • Windows: %USERPROFILE%\.claude.json

Add the following under mcpServers:

{  "mcpServers": {    "baremetrics": {      "type": "http",      "url": "https://app.baremetrics.com/mcp",      "headers": {        "Authorization": "Bearer <BM_API_KEY>"      }    }  }}

Cursor

Add the following to ~/.cursor/mcp.json:

{  "mcpServers": {    "baremetrics": {      "url": "https://app.baremetrics.com/mcp",      "headers": {        "Authorization": "Bearer <BM_API_KEY>"      }    }  }}

Codex

Add the following to ~/.codex/config.toml:

[mcp_servers.baremetrics]url = "https://app.baremetrics.com/mcp"bearer_token_env_var = "BM_API_KEY"

You'll also need to set the BM_API_KEY environment variable in your shell.


Other Clients (STDIO-based)

For AI tools that only support MCP over STDIO (not HTTP), you can use mcp-remote as a proxy.

⚠️ Security note: Using this method means trusting mcp-remote with your API key. It is an open-source project — review it at github.com/geelen/mcp-remote before proceeding.

Generic JSON config (requires Node.js):

{  "mcpServers": {    "baremetrics": {      "command": "npx",      "args": [        "mcp-remote",        "https://app.baremetrics.com/mcp",        "--header",        "Authorization: Bearer <BM_API_KEY>"      ]    }  }}

Consult your client's documentation for the exact file path and format.


FAQ

Does this work with ChatGPT?
No — MCP is not supported by ChatGPT. This integration works with Claude, Cursor, Codex, and other MCP-compatible clients.

Where do I find my API key?
Go to Settings → API in your Baremetrics dashboard. Your live key starts with lk_.

Does this work on a free trial?
Yes — a Baremetrics trial is all you need to get started.


⚠️ AI-generated reports: Reports and analysis generated via MCP are produced by an AI interpreting your Baremetrics data. Trends and directional insights should be reliable, but we recommend confirming specific numbers against your own exports before making major business decisions.

Did this answer your question?