> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superskope.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK and MCP

> Use the server SDK or a read-only MCP adapter on your infrastructure.

The server SDK is a dependency-free ESM client for Node 24+, with TypeScript declarations. The prepared package is `@superskope/sdk` version `0.1.0`. It is a private local release, not yet published to npm. Install the reviewed archive supplied by your operator:

```bash theme={null}
npm install /absolute/path/superskope-sdk-0.1.0.tgz
```

```js theme={null}
import { SuperSkope, SuperSkopeError } from '@superskope/sdk';
const client = new SuperSkope({
  origin: process.env.SUPERSKOPE_ORIGIN,
  apiKey: process.env.SUPERSKOPE_API_KEY,
});
const status = await client.status();
```

Your installation’s **Integrations** page also provides standalone JavaScript and stdio MCP downloads. Those downloads and the package are prepared from one canonical runtime. The SDK performs no automatic read or mutation retries. Read [errors and limits](https://docs.superskope.com/developers/errors-limits.md), [integration recipes](https://docs.superskope.com/developers/examples.md) and [versioning](https://docs.superskope.com/developers/versioning.md).

Keep the installation URL and customer key in your backend’s secret store. Use exact chats and explicit scopes. The SDK cannot grant extra phone, staff or WhatsApp authority.

## Replies, files and reactions

Use `replyText(chatId, messageId, text, {idempotencyKey})`, `sendAttachment(chatId, {type, data, filename, caption, replyTo}, {idempotencyKey})` or `react(chatId, messageId, emoji, {idempotencyKey})` for deliberate writes. Optional attachment fields may be omitted.

`downloadMedia(chatId, messageId, {range})` returns bounded bytes and response metadata (`status`, `contentType`, `contentRange`, `contentDisposition`). Respect private storage and the 32 MiB incoming limit.

## Connection lifecycle

`connection()` inspects the selected phone. `connectionQr()` fetches private, temporary QR data. Pair deliberately with `startConnection({idempotencyKey})` and `confirmConnection(accountId, {idempotencyKey})`. `disconnectConnection(accountId, expectedVersion, {idempotencyKey, confirm: true})` uses the latest integer connection version and explicit disconnection scope.

Keep QR data out of logs, caches, public screenshots and untrusted model prompts. The MCP QR tool is absent by default. A custom trusted host must supply `authorizeSensitiveRead`, and each read needs `confirm: true` plus a fresh callback result of `true`. It does not need `allowWrites` or an idempotency key because it is a GET. An explicitly authorised QR enters that host’s tool context, so use only a trusted host/model and private display.

Read [connection and lifecycle](https://docs.superskope.com/developers/connection.md) for phone binding and account checks.

## MCP authorisation

The bundled stdio MCP exposes read tools by default. Mutation tools are advertised only when a custom host supplies both `allowWrites` and an authorisation callback. Each mutation also requires `confirm=true` and a stable request key. A model decision alone is not user authorisation.

The API enforces scopes, chat identity, version checks and persistent uncertain locks even after host approval. Preserve [idempotency and unknown-result rules](https://docs.superskope.com/developers/reliability.md); never let the host retry an unresolved action as a new request.

The MCP media read tool returns base64 for at most 256 KiB per explicit requested range; it never automatically loops over a whole attachment. Host-authorised mutation tools cover quoted replies, attachments and reactions.

This customer adapter is separate from any documentation-search MCP supplied by a documentation platform. See the [quickstart](https://docs.superskope.com/developers/quickstart.md), [key guide](https://docs.superskope.com/developers/authentication.md) and [endpoint index](https://docs.superskope.com/developers/endpoints.md).

## Coverage

| SDK area | Methods |
| - | - |
| Status and conversations | `status`, `capabilities`, `chats`, `messages`, `message`, `access`, `downloadPicture`, `chatAction`, `updates`, `automation`, `setPaused` |
| Safe messages | `sendText`, `replyText`, `sendAttachment`, `downloadMedia`, `react`, `messageAction`, `requestState` |
| Connection | `connection`, `connectionQr`, `startConnection`, `confirmConnection`, `disconnectConnection` |
| Groups | `groups`, `group`, `createGroup`, `groupAction`, `leaveGroup` |
| Schedules | `schedules`, `schedule`, `createSchedule`, `updateSchedule`, `setScheduleEnabled`, `skipSchedule`, `removeSchedule` |
| Work | `workItems`, `workItem`, `saveWork`, `removeWork`, `chatWork`, `updateChatWork`, `library`, `reports` |
| Agents | `createAgent`, `updateAgent`, `setAgentChat`, `agents`, `agent`, `agentAccess`, `agentEvents`, `agentEvent`, `presence`; [separate scopes and resource authority](https://docs.superskope.com/developers/agents.md) required |
| Events and diagnostics | `events`, `logs`, `history`, `groupHistory` |

TypeScript declarations describe options and results. They do not validate an external response or expand your permissions. The installed API checks every action. The [endpoint reference](https://docs.superskope.com/developers/endpoints.md) is the authoritative route list for this source release.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.