Airi

MCP

Connect your AI assistant to your account: upload a video, encode it, encrypt it and publish a player without leaving the conversation. One command to install, nothing to maintain.

What it is #

MCP is the protocol an AI assistant uses to reach external tools. @airi.live/mcp is ours: it exposes your account as 32 tools that Claude, Cursor or any compatible client can call — upload a file, quote an encode, start it, wait for it, create a player and hand you the embed.

It runs on your machine, not ours. Your credential never leaves it, and an upload's bytes go from disk straight to the bucket — through neither our server nor the assistant.

Not a separate product

These are the same routes this dashboard uses and the same ones you would call with curl. What it adds is shape: descriptions a model can act on, and three tools that make several calls in a row because chaining those by hand is where things break.

Installing it #

First mint a credential in Developers, ticking the permissions you want the assistant to have. Then one command:

Claude Code
claude mcp add airi --env AIRI_KMS_TOKEN=kms_live_... -- npx -y @airi.live/mcp

For Claude Desktop, Cursor, Windsurf and anything else configured with JSON:

example
{
  "mcpServers": {
    "airi": {
      "command": "npx",
      "args": ["-y", "@airi.live/mcp"],
      "env": { "AIRI_KMS_TOKEN": "kms_live_..." }
    }
  }
}

Node 20 or newer. Nothing to install — npx fetches it on first run and keeps it current.

OptionVariableDefault
--tokenAIRI_KMS_TOKEN— (required)
--namespaceAIRI_KMS_NAMESPACEyour credential's
--urlAIRI_KMS_URLhttps://kms.airi.live
--allow-adminAIRI_MCP_ALLOW_ADMIN=trueoff
--timeoutAIRI_KMS_TIMEOUT_MS60000

Both forms work and the flag wins over the variable, but the token belongs in the env block: an argument shows up in your machine's process list and an environment variable does not. npx @airi.live/mcp --help lists everything.

Using it #

From there you just ask. For example: *"upload ~/Videos/keynote.mp4, encode it at 1080p and 720p with DRM, and give me an embed to paste into our site"*.

What it runs underneath
airi_storage_upload   path=~/Videos/keynote.mp4file id
airi_encoding_quote   heights=[1080,720] duration=600 → $0.16
airi_encoding_start   package=hls+dash drm=truejob id
airi_encoding_job     wait=truecompleted
airi_player_create    name="Site"player id
airi_player_embed     file=<id>                       → signed URL + <iframe>
GroupTools
Storageupload, list, get, sign URL, delete, usage
Encodingquote, renditions, start, check, list, cancel, package
Playerscreate, list, update, delete, embed
DRM keyscreate, get, list, rotate, periods
Policiesset, list, resolve, delete
Usagebalance, licences, stats
Everything elsediscover endpoints, call the API

Three of them make more than one call, because the API is built for browsers and an assistant is not one. airi_storage_upload takes a path and returns a sealed file — declare, multipart upload, ETag collection and complete, all inside the tool. airi_encoding_job with wait blocks until the job finishes, so an encode is one step rather than a poll loop. And airi_player_embed returns the ready <iframe> alongside the resolved player.

The last two are an escape hatch: they read the API reference live and run whatever they find. A new endpoint is available the day it ships, without waiting for us to update the package.

What it will not do #

You are giving a language model access to your account. Two things the server refuses to do even if asked, and they are worth knowing before you install it.

Everything else is reachable, because it is the job. Deletes and encodes carry the protocol's destructiveHint, so your client can ask before running them, and the descriptions say plainly what cannot be undone: a contentId is permanent at the DRM provider, a deleted file has no undo, and cancelling an encode stops the billing rather than the encoder.

Give it only what it needs #

The credential is the real boundary: the server cannot grant what your token does not have. Mint one for the assistant rather than reusing your own, ticking only the permissions the work needs.

PermissionWhat it enables
Storageupload, list, sign and delete files
Encodingquote, start and cancel jobs
Playerscreate and edit players and their embeds
Keys and policiesDRM, licence policies, balance and usage

A read-only assistant is a credential minted without write access: it can look at everything and change nothing. Revoking it from Developers cuts it off on the next call, not a minute later.

The spending is still yours

Encoding and creating keys cost money, and the assistant spends your balance doing them. Encoding holds the amount before it starts, so an outsized request stops against your balance rather than your card. Even so, only grant encoding if you expect it to encode.

If something goes wrong #

What you seeWhat it means
UNAUTHORIZEDThe token is wrong or was revoked. Mint another in Developers
FORBIDDENThe credential lacks that permission. Mint it again with the right box ticked
INSUFFICIENT_FUNDSNo balance left. Reads still work; uploads, encodes and new keys do not
"needs a concrete namespace"Your token is not pinned to one — add --namespace
The server will not startnpx @airi.live/mcp --help from a terminal tells you what is missing

Errors reach the assistant with their code and a hint about what to do, so it usually corrects itself and tells you. If not, your MCP client's logs carry whatever the server wrote.