Skip to content

Claude Code and Cursor read business numbers over MCP

Connect Claude Code and Cursor to business numbers over MCP: create a read-only token, configure the client, keep the token out of the repo, and sample prompts.

By The DataxLand team· · 6 min read

The technical person in a small business usually doubles as the one who "gets the numbers": writing scripts to export reports, answering the boss's question about last week's revenue, checking whether a new feature hurt orders. If you already use Claude Code or Cursor to write code, the natural question is: why not let that same agent read the business numbers?

The safe way to do this is MCP (Model Context Protocol), an open standard for AI agents to call external tools. This post shows how to connect Claude Code and Cursor to DataxLand's approved metrics over MCP, explains why an agent should read metrics rather than hold a database password, and gives sample prompts for everyday work. If you are new to MCP, read MCP for AI agents reading business data first.

Why not hand the agent a database connection string

The quickest way is to paste a Postgres connection string into the agent and let it write SQL. That has three problems:

  1. Definitions get rewritten every time. The agent doesn't know whether your company's "revenue" is GMV or net revenue, whether refunds are subtracted, whether unpaid orders count. Every question is a new query, and two identical questions can give two different numbers.
  2. Permissions are too broad. A database account can read every table, including buyers' phone numbers and addresses.
  3. Hard to revoke and hard to audit. Database passwords are often shared across several systems; changing one is a project.

DataxLand's MCP does the opposite: the agent uses the same tools as Si — list metrics, describe a metric, query a metric by dimension, filter, period and comparison. DataxLand builds the query from approved definitions, so the numbers the agent reads match the dashboards. By default there is no free-form SQL tool, and no tool returns buyers' personal data.

Database connection stringDataxLand MCP token
What the agent seesEvery table, every columnApproved metrics, dimensions and filters
Number definitionsRewritten by the agent each timeOne versioned definition
Buyers' personal dataReadableNever returned
RevokingChange a shared passwordClick Revoke, effective immediately
LoggingDepends on database configurationEvery call logged with its token and tool

Step 1: create a read-only token

MCP is available on the Small Business plan and above, and the person creating the token needs the Admin role or above.

  1. In the workspace, go to Settings → Integrations, section MCP tokens.
  2. Under Create token, enter a Label you will recognise later, e.g. "Claude Code – Alex's laptop".
  3. Permissions: choose metrics:read. Add ops:read only if the agent needs to see build status (it never returns data values).
  4. Expires after (days): keep it short for a personal machine, e.g. 30 days. The default is 90, the maximum 365.
  5. Click Create token, then Copy right away: the token (prefix dxp_) is shown only once. DataxLand stores only its hash.

One token per person, per machine. When someone leaves the project, revoke exactly their token without affecting anyone else.

Step 2a: configure Claude Code

Claude Code adds a remote MCP server with claude mcp add, using the HTTP transport and an authentication header, per the Claude Code MCP documentation (read 16 Nov 2026):

claude mcp add --transport http dataxland https://app.dataxland.com/mcp \
  --header "Authorization: Bearer <MCP token>"

The thing to watch is the configuration scope. According to the same documentation, Claude Code has three scopes: local (the default, current project only, stored in your personal config file ~/.claude.json), project (stored in .mcp.json at the project root to share through git) and user (all your projects). For an MCP token, don't use the project scope: .mcp.json is committed with the repo, which means the token travels with the repo. Use the default scope or user.

Check it with claude mcp list in the terminal, or type /mcp in a Claude Code session to see the server's status.

Step 2b: configure Cursor

Cursor reads MCP configuration from ~/.cursor/mcp.json (for all projects) or .cursor/mcp.json in a project, and supports remote servers declared with url and headers (Cursor MCP documentation, read 16 Nov 2026):

{
  "mcpServers": {
    "dataxland": {
      "url": "https://app.dataxland.com/mcp",
      "headers": { "Authorization": "Bearer <MCP token>" }
    }
  }
}

As with Claude Code, put the token in the global file in your home directory. If the project really must have a .cursor/mcp.json, add that file to .gitignore before pasting the token.

Step 3: try it with two prompts

In your session, ask the agent:

  1. "Using DataxLand, list the workspace metrics." — the agent calls list_metrics and you see metric names and descriptions.
  2. "Profit after fees last month by channel, compared with the month before." — the agent calls query_metric or query_semantic and returns numbers by channel.

If the second answer matches the corresponding tile on the dashboard, the connection is working.

Everyday work an agent does better when it can read the numbers

TaskSample prompt for the agent
Check the impact of a release"Website orders by day for the last 14 days; how did the 12th compare with last week's average?"
Write an internal report script"Write a Python script that pulls weekly net revenue and exports CSV; use the exact metric names in DataxLand."
Answer the boss's question"Why did profit after fees drop this month? Break it down by channel and product." (the agent calls explain_change)
Write docs or specs"Describe the contribution margin metric we use and its version." (the agent calls describe_metric)
Cross-check numbers while fixing a data bug"What is the TikTok Shop return rate over the last 30 days, and how is it defined?"

One thing to remember: the agent reads published numbers, not raw tables. If a question needs a calculation that isn't in the metric handbook yet, the durable fix is to define it as a workspace metric (see Workspace metrics), not to give the agent broader SQL access.

Staying safe day to day

  • Don't paste the token into chats, issues, shared documents or screenshots.
  • Short expiry, revoke when done. The Created tokens list shows each token as Active, Expired or Revoked.
  • One token per machine so the log tells you where a call came from.
  • Rate limits: at most 60 calls per minute per token; looping scripts should batch questions instead of calling one day at a time.
  • Multi-workspace tokens (Enterprise plan) make the agent name the workspace in every call; the server checks the token is allowed for that workspace.

How DataxLand does it

DataxLand's MCP server speaks Streamable HTTP at /mcp and authenticates with an Authorization: Bearer header. External agents and Si — in the app, Telegram or Slack — call the same set of tools, so the numbers match everywhere. Full configuration for Claude Code, Cursor and Claude Desktop is in MCP server; if you'd like the agent to read the docs and configure itself for you, use the sample prompt in Set up with an AI agent. The feature overview is on the MCP page.

FAQ

Can the agent write or change data over MCP?

No. The metrics:read scope only reads metrics; ops:read only shows build status, with no data values. No tool changes business data, configuration or the warehouse.

Do I need to install anything extra for Claude Code or Cursor?

No bridge needed: both connect directly to a remote MCP server over HTTP with a header. Claude Desktop alone uses the mcp-remote bridge (requires Node.js); instructions are on the MCP server page.

Does the agent see customer information?

No. Buyers' personal data is hashed in the warehouse and no MCP tool returns it. The agent sees aggregated numbers by dimensions such as channel, product and date.

What if I accidentally commit the token to the repo?

Revoke that token right away under MCP tokens, create a new one with a short expiry, then remove the token from the repo history following your team's process. Revocation takes effect from the next call.

Read next: MCP for AI agents reading business data · What is a semantic layer · Si for Shopee data

Related posts

Verified dashboards from your own data, this afternoon

Free plan with no time limit · No card required · Sample workspace ready in minutes