API/Connect an AI assistant

Connect an AI assistant

Ask claude.ai, ChatGPT, Claude Code, Cursor, VS Code or Claude Desktop about your royalties, ad spend and net profit: it reads the same figures as the app.

An AI assistant can read your figures and answer in plain language: "What did I earn net last month?", "Which book costs me the most in ads?".

It can only read. The assistant sees what the TrueRoyalties API sees — royalties, ad spend, net profit, books, series, Kindle Unlimited — and changes nothing in your account.

What the assistant can see

  • Everything the API sees, and nothing else: royalties, ad spend, net profit, books, series, Kindle Unlimited pages, free downloads.
  • Nothing it can change: no sync, no setting, no book, no billing.
  • Your figures do leave TrueRoyalties. Only connect an assistant you trust with your sales history: once it has read your figures, disconnecting stops any further reading, but it cannot take back what it already read.

The address, and what each assistant needs

One address, the same for every assistant:

https://author.trueroyalties.com/api/mcp
AssistantWhat it needs
claude.ai, Claude DesktopYou sign in and click Allow. No key to copy.
ChatGPTThe same sign-in, but in developer mode, on a paid plan.
Claude Code, Cursor, VS CodeOne of your API keys, from Settings → API.

Any other tool that supports custom MCP servers can use the same address.

Everything is on one page in the app — Settings → API: the address, the ready-made commands, and your keys. Each block has a Copy button.

The Connect an AI assistant card in Settings → API, with the server address, the Claude Code command and the Cursor configuration, each with a Copy button

claude.ai

  1. In claude.ai, open Customize in the left menu.

claude.ai's left menu, with Customize highlighted under New, Projects, Artifacts and Scheduled

  1. Open the Connectors tab.

The Customize page in claude.ai, with the Skills, Connectors and Plugins tabs

  1. Click Add, then Add custom connector.

The Connectors tab selected in claude.ai, with the Add button on the right

  1. Name it TrueRoyalties, paste https://author.trueroyalties.com/api/mcp, then click Continue.

claude.ai's Add custom connector dialog, with the name TrueRoyalties, the server address, and the Cancel and Continue buttons

  1. Change nothing on the next page: claude.ai has detected that TrueRoyalties signs you in and publishes its own identity. Click Add.

The second page of the dialog: Authentication on Sign in now and OAuth client on Use Claude's published identity, both marked Detected, with the Back and Add buttons

  1. Click Connect.

The TrueRoyalties connector page in claude.ai: the server address, the line saying you are not connected yet, and the Connect button

  1. Sign in to TrueRoyalties if you are asked to.
  2. Check the app that is asking, then click Allow.

The TrueRoyalties consent page: Claude asks to read the account, verified as coming from claude.ai, with what it can and cannot do, the account you are signed in with, and the Deny and Allow buttons

  1. You are sent back to claude.ai. On the connector page, under Tool permissions, choose Always allow: Claude then reads your figures without asking every time, and this connector can do nothing else.

The TrueRoyalties connector page in claude.ai, with its ten read-only tools and the permissions menu open on Always allow

In a conversation, turn the connector on if the app asks you to, then ask your question.

Ask Haiku. It is the fastest and the least expensive Claude model, and reading your figures asks nothing more of it. Pick it in the model menu of your conversation.

A free Claude account can add one custom connector.

To disconnect it, open Settings → API → Connected apps in TrueRoyalties and choose Disconnect. It stops reading your figures immediately.

The Connected apps card in Settings → API, with Claude from claude.ai, the date it was connected, its last use and its menu

Claude Desktop

Claude Desktop uses the same connectors as claude.ai, so there is nothing else to install: add the connector from either one, sign in, and click Allow. It then works in both.

ChatGPT

ChatGPT does not connect like Claude: its custom servers live behind developer mode, which is only offered on ChatGPT's paid plans. Here is the whole path.

  1. In ChatGPT's settings, turn on developer mode.
  2. Open Plugins, then New plugin.
  3. Name: type TrueRoyalties. The icon and the description are optional.
  4. Connection: keep Server URL and paste https://author.trueroyalties.com/api/mcp.
  5. Authentication: choose OAuth. There is nothing to fill in below it — TrueRoyalties publishes its settings at that address, and ChatGPT reads them.
  6. Tick I understand and want to continue — ChatGPT shows that warning for every custom server, ours included — then click Create.

ChatGPT's New Plugin dialog, with the name TrueRoyalties, the server URL of the TrueRoyalties MCP server, OAuth as the authentication, and the checkbox to confirm before creating

  1. ChatGPT opens TrueRoyalties: sign in if you are asked to, check that the app requesting access is ChatGPT, then click Allow.
  2. In a conversation, switch the plugin on before asking your first question.
  3. Choose how much ChatGPT may do on its own, in Settings → Plugins → TrueRoyalties → Permissions. Allow read actions is enough: this connector can only read. Allow all actions is marked elevated risk and buys you nothing here.

ChatGPT's permissions for the TrueRoyalties plugin: always ask, allow read actions, allow low-risk actions, or allow all actions

To disconnect it, open Settings → API → Connected apps in TrueRoyalties and choose Disconnect, exactly as for claude.ai.

Claude Code

Create a key in Settings → API → Create a key, name it "Claude Code", and copy it. It is shown only once.

The API tab of Settings, with one key, the start of the key, its creation date and its last use

Then run this in a terminal, with your key in place of YOUR_API_KEY:

claude mcp add --transport http trueroyalties https://author.trueroyalties.com/api/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"
  • Check it with claude mcp list, or /mcp inside Claude Code.
  • The server is added to the current project. Add --scope user to use it everywhere.
  • To remove it: claude mcp remove trueroyalties.

Cursor

Put your key in the TRUEROYALTIES_API_KEY environment variable, then paste this into ~/.cursor/mcp.json (all your projects) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "trueroyalties": {
      "url": "https://author.trueroyalties.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${env:TRUEROYALTIES_API_KEY}"
      }
    }
  }
}

Cursor reads the key from that variable, so the file never contains it. Set the variable before you open Cursor.

VS Code

Open MCP: Open User Configuration from the Command Palette (all your projects), or create .vscode/mcp.json in a project, and add:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "trueroyalties-api-key",
      "description": "TrueRoyalties API key",
      "password": true
    }
  ],
  "servers": {
    "trueroyalties": {
      "type": "http",
      "url": "https://author.trueroyalties.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${input:trueroyalties-api-key}"
      }
    }
  }
}

VS Code asks for the key the first time the server starts and remembers it, so the file never contains it.

What you can ask

The assistant picks the right tool for your question. Each tool reads one part of the API.

ToolReadsExample question
get_accountYour account: currency, subscription, connected platforms"Are my platforms up to date?"
list_booksYour catalogue"Which books do I have?"
list_seriesYour series and their books"What are my series?"
get_summaryThe totals of a period"What did I earn net last month?"
get_timelineThe same figures over time"How has my profit moved since January?"
get_books_reportOne line per book"Which book costs me the most in ads?"
get_marketplaces_reportOne line per marketplace"Where do I sell best?"
get_kenpKindle Unlimited pages read"How many KU pages were read this month, and how many thanks to ads?"
get_free_unitsFree downloads"How many free downloads did my promotion bring?"
get_series_read_throughThe read-through of one series"How many readers of book 1 go on to book 3?"

Good to know

  • The same figures as the app. Each answer says which period and currency it used, and says so when a figure is incomplete.
  • A key reads your whole account. Keep it out of shared files, and revoke it in Settings → API the day you stop using the assistant.
  • Shared limits with the API: 60 requests per minute and 10,000 per day for your account. One question can cost several requests. See Limits and errors.
  • Try it without an account in a developer tool: the public demo key on the API reference works here too, and reads the demo account's synthetic figures.