# MCP server

> Connect an AI assistant or coding agent to the MCP server to check images by URL, read results and the account, and ask for a checkout link. Authenticates with an API key.

The MCP server lets an AI assistant or coding agent check images without writing HTTP calls. It uses the same API keys, permissions, spending caps and prices as the REST API.

| | |
| --- | --- |
| URL | `https://api.ringingbytes.com/mcp` |
| Transport | Streamable HTTP |
| Authentication | `Authorization: Bearer <API key>` |

## Authentication

The server accepts API keys only. It does not support OAuth sign-in, so assistants that can only connect through OAuth can't use it yet. Use a client that lets you set a header.

Get a key in the dashboard under **API keys**, or let your agent ask for one with the [device flow](https://ringingbytes.com/docs/agents#get-a-key). A request without a valid key gets HTTP 401.

## Connect a client

Most clients take a URL and headers. In a JSON config file (for example `.mcp.json` in Claude Code, or `.cursor/mcp.json` in Cursor):

```json
{
  "mcpServers": {
    "ringing-bytes": {
      "type": "http",
      "url": "https://api.ringingbytes.com/mcp",
      "headers": { "Authorization": "Bearer <your API key>" }
    }
  }
}
```

The key is a secret: keep this file out of version control, or use your client's syntax for environment variables.

With the Claude Code command line:

```sh
claude mcp add --transport http ringing-bytes https://api.ringingbytes.com/mcp \
  --header "Authorization: Bearer $RINGING_BYTES_API_KEY"
```

## Tools

| Tool | Arguments | What it does | Permission |
| --- | --- | --- | --- |
| `check_image` | `url`, optional `localize` | Checks the image at a public `http(s)` URL and returns the verdict, confidence and signals. One image check; with `localize: true` (edited-region analysis), 3. | `checks:create` |
| `get_check` | `id` | Returns an earlier check's usage entry (status, times, credits; no result) by its `det_…` id. Free. | `checks:create` |
| `get_account` | none | The plan, free and included image checks left, the billing period, and the caps and spending. Free. | `account:read` |
| `create_checkout_link` | `plan` | A hosted checkout link for an organization without a plan, also emailed to its owners. | `billing:checkout` |

Results have the same fields as the REST API (see [Understanding results](https://ringingbytes.com/docs/results)), as structured content, with a short text summary.

## Images must have a URL

`check_image` takes an image URL that our servers can download. It can't read a file on your computer. To check a local file, upload it with [`POST /v1/detect`](https://ringingbytes.com/docs/detect/images) instead, or put it somewhere reachable by URL first.

## Errors

A failed tool call returns `isError: true` with the same error body as the REST API as its structured content. A 402 carries `data.reason` and `data.next`: see [When a check returns 402](https://ringingbytes.com/docs/agents#when-a-check-returns-402). A missing permission returns 403 `INSUFFICIENT_SCOPE`.
