Planners About

API Keys

You do not need a key to use the server: every calculator tool works with no key at all, on the anonymous allowance. A key gives you an allowance of your own, counted against the key rather than your IP address, and rate-limit headers on every answer. A paid key also unlocks PDF reports. This page covers getting a key, sending it, storing it, replacing it, and how each kind of client uses one.

Do you need a key?

The three ways to call the server and what each one gives you
AccessHow you get itWhat it adds
No keyNothing to do: send no Authorization headerEvery tool except generate_report, on the anonymous allowance
Free key (dc_pub_)One click on the pricing page, or one POST (below)A larger allowance of your own and rate-limit headers on every answer
Paid key (dc_bearer_)A Developer or Business subscriptionA larger allowance by plan, generate_report and report branding

The answers are the same with or without a key: a key changes your allowance, never a figure. The allowances themselves are listed once, on the pricing page.

Get a key

A free key

The quickest way is the Create a free key button on the pricing page. No signup, email or card. From a terminal, one unauthenticated POST does the same and answers HTTP 201:

bash
curl -X POST https://api.digitalcalculator.info/v1/keys/public
json
{
  "key": "dc_pub_…",
  "tier": "free",
  "dailyLimit": 1000,
  "windowLimit": 60,
  "windowSeconds": 300,
  "expiresAt": "…",
  "claimed": false,
  "claimToken": "dc_claim_…"
}

The answer is trimmed here; it also repeats how to send the key and that it is shown only once. A free key is valid for one year from creation (expiresAt). You can create up to 5 keys from one IP address per UTC day.

The claim token. Keep claimToken private and separate from the key. It is the only proof the key is yours if you later want to attach an email address to it: POST https://api.digitalcalculator.info/v1/keys/claim with Content-Type: application/json and the body {"key": "dc_pub_…", "email": "…", "claimToken": "dc_claim_…"}. The same token lets you change that email later. A key created before claim tokens existed cannot be claimed: create a new one, or email us.

Developer and Business are monthly or annual subscriptions for customers in the United States; the prices and allowances are on the rate card. When a subscription starts, its key is created automatically and shown on the confirmation page, which can show it again for 24 hours after checkout if you close the tab. Card checkout is not switched on yet: until it is, email admin@markcolabs.com with the plan you want and we set the key up by hand at the published price (details). Enterprise allowances and terms are agreed by email (Enterprise).

Try the math on the anonymous allowance before you pay: it runs the same calculations, and a key never changes an answer.

Send it

Send the key as a standard bearer credential on every request, to the same endpoints you already call:

text
Authorization: Bearer dc_pub_YOUR_KEY
  • Both transports. The header works on the MCP endpoint (https://mcp.digitalcalculator.info/mcp) and on the REST routes (https://api.digitalcalculator.info/v1/tools/{alias}/calculate). One key is counted on one meter across both.
  • A bad key is refused, not ignored. A malformed, unknown, revoked or expired key is HTTP 401; the server never quietly falls back to the anonymous allowance. If you want the anonymous allowance, send no header at all. See Troubleshooting.
  • Headers on every keyed answer. X-RateLimit-Limit, -Remaining and -Reset describe your 5-minute window; X-Quota-Daily-Limit, X-Quota-Daily-Remaining and X-Quota-Reset describe your day (all headers).
  • From a server, not a web page. Keys are for servers, command-line tools and MCP clients. A browser page on another site cannot call the API: a request whose Origin is not https://www.digitalcalculator.info is refused with HTTP 403.

Store it

A key is shown once

We store only a SHA-256 hash of each key, so a key cannot be recovered, re-sent or emailed, and there is no account or key list to look it up in. A paid key can be shown again on the confirmation page for 24 hours after checkout; after that, and for a free key straight away, the key you saved is the only copy.

  • Put it in a secrets manager or your CI vault, not in a config file you commit.
  • Treat a paid key as a secret. A dc_bearer_ key carries paid capabilities, so keep it server-side and out of any public repository.
  • A free key is lower risk. A dc_pub_ key carries only the free allowance and cannot unlock generate_report, so exposing one costs you its allowance, nothing more. Its claim token is the part to keep private.

Replace or rotate it

  • A free key: create another one, switch your client to it, and stop using the old one. A free key expires one year after it was created; create a new one before then.
  • A paid key: email admin@markcolabs.com from the address you subscribed with. We revoke the old key and issue a new one; your subscription is unaffected, but your integration needs the new value. A paid key stays valid while its subscription is paid up and renews with it.
  • Changing plan keeps the same key: only its allowance changes, so nothing in your integration needs redeploying.
  • Cancelling: the key keeps working until the end of the period you have already paid for, then stops (refund and cancellation policy).
  • A lost or exposed key: replace it as above. There is no self-serve rotation screen yet.

Use it in your client

Whether a client can use a key depends on one thing: whether it lets you add an Authorization header to its requests. The server reads only Authorization: Bearer; it has no OAuth sign-in. Connection steps for each client, without a key, are in the quickstart.

claude.ai and Claude Desktop connectors

In claude.ai, and in Claude Desktop’s Settings → Connectors, add the server as a custom connector with no authentication, and use the free anonymous allowance. A custom connector cannot send this server’s key: do not paste a key into the connector’s authentication fields. Calls through Claude’s connectors share an allowance of their own, separate from the per-address one. If you need a key, use a client that can send an Authorization header, such as Claude Code below.

The npm package (@markcolabs/mcp)

The @markcolabs/mcp package is a small local bridge for clients that only start MCP servers as a local command, such as Claude Desktop’s config file. It sends no Authorization header, so every call through it uses the anonymous allowance, whatever key you have. To use a key, connect to the endpoint over HTTP with one of the options below instead.

Claude Code

Add the server over HTTP with the header on the same command:

bash
claude mcp add --transport http digitalcalculator https://mcp.digitalcalculator.info/mcp \
  --header "Authorization: Bearer $DC_API_KEY"

See Claude Code’s MCP documentation for scopes and for keeping the key in an environment variable rather than on the command line.

Other clients that send headers

Many clients that connect to a remote MCP server from a JSON config accept a headers object beside the server URL, in this shape:

json
{
  "mcpServers": {
    "digitalcalculator": {
      "url": "https://mcp.digitalcalculator.info/mcp",
      "headers": {
        "Authorization": "Bearer dc_pub_YOUR_KEY"
      }
    }
  }
}

Field names differ between clients (VS Code uses a top-level servers key; Windsurf names the URL serverUrl), so check your client’s documentation for where headers go. In MCP Inspector, choose the Streamable HTTP transport and add the bearer token in its authentication settings before connecting.

curl and your own code

These examples read the key from an environment variable, DC_API_KEY, so it stays out of your shell history and source files. Over MCP, a JSON-RPC tools/call with the header:

bash
curl -X POST https://mcp.digitalcalculator.info/mcp \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $DC_API_KEY" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"mortgage_monthly_payment","arguments":{"principal":300000,"annual_rate_percent":6.5,"term_years":30}}}'

Plain REST

The REST companion takes the same header, with the tool’s arguments as the body. The mortgage alias keeps its older camelCase body:

bash
curl -X POST https://api.digitalcalculator.info/v1/tools/mortgage/calculate \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $DC_API_KEY" \
  -d '{"principal":300000,"annualRatePercent":6.5,"termYears":30}'

Every alias and its body are in the API reference.