# Remote MCP

Connect an AI assistant to your team's projects through the Model Context Protocol.

The Remote MCP server lets an AI assistant read your team's projects and, when you allow it,
deploy them and change their settings. It provides the operations of the
[Public API](/docs/api/overview) as MCP tools and includes the public documentation in English
and Japanese.

**Server URL:** `https://api.arkor.dev/mcp`

## Connect with your Arkor account [#connect-with-your-arkor-account]

1. Add a remote MCP server in your assistant, using the URL above and **Streamable HTTP**.
2. Choose to connect or authenticate. Your assistant opens Arkor in your browser.
3. Sign in, choose the team, and review the client and permissions on the consent screen.
4. Choose the projects and [permissions](/docs/api/tokens#permissions) the assistant may use, then
   allow access and return to your assistant.

Owners and admins can approve a connection. Each connection belongs to the team you selected;
changing the active team in the dashboard does not change the connection. Approving the same OAuth
client again for the same team replaces your earlier connection from that client; connections from
other clients or to other teams remain.

The consent screen starts from every permission at the level the client asked for, for every
project; narrow it to what the assistant needs. A permission at **Read** lets the assistant list and
inspect; at **Read and write** it can also make the changes that permission covers, such as
deploying. A client that asked only for `read` cannot be given **Read and write**. The assistant
sees only the tools its permissions and projects allow. Review the tools and your assistant's
proposed changes before granting write access.

OAuth uses these scopes:

| Scope            | Permission                                                                                                                      |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `read`           | Read what the chosen permissions allow. This is the default when the client requests no scopes.                                 |
| `write`          | Make the changes the chosen permissions allow; `write` includes `read`. Granted only with a permission at **Read and write**.   |
| `offline_access` | Keep the connection usable through token refresh. It grants no project permission by itself and requires your explicit consent. |

You can allow a subset of the permissions the client requested. OAuth access tokens last at
most one hour. Without `offline_access`, the connection's API token also expires after one hour
and no refresh token is issued. With `offline_access`, the refresh token and the connection's
API token last at most 30 days from consent; refreshing does not extend that connection beyond
30 days. Revocation or a change in the issuer's team membership can end access sooner.

## Connect with an API token [#connect-with-an-api-token]

If your MCP client lets you set an authorization header, you can use an existing
[API token](/docs/api/tokens):

```text
Authorization: Bearer ark_…
```

Set the header in the client's secret configuration. The token's
[permissions](/docs/api/tokens#permissions), projects and allowed addresses apply to every tool, and
the assistant sees only the tools they allow. A token is never a tool argument, and there is no
need to paste it into a prompt.

## What you can ask for [#what-you-can-ask-for]

For example, ask your assistant to list the team's projects, read the latest deployment's build
log, or check a project's Git configuration. With write access, you can ask it to deploy a
particular branch or commit and follow the resulting deployment.

Tool arguments use the Public API's project IDs, which the list-projects tool returns. A project
outside the connected team is unavailable through the connection. MCP does not give the
assistant access to operations absent from the Public API, such as billing or team membership.

The server exposes the organization API tools and two read-only documentation tools. Every tool is discoverable through your MCP client; changing tools require write
permission.

| Area                 | Read tools                                                                                                     | Write tools                                                                                                                        |
| -------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Projects             | `listProjects`, `getProject`                                                                                   | `setCacheInspector`, `setPosthogCapturePaths`                                                                                      |
| Deployments          | `listDeployments`, `getDeployment`, `getDeploymentLog`                                                         | `createDeployment`, `uploadBlob`, `finalizeDeployment`                                                                             |
| Services             | `listProjectServices`                                                                                          | `createProjectService`, `updateProjectService`, `deleteProjectService`, `setDefaultProjectService`, `setServiceDurableObjectOwner` |
| Service environments | `getProjectServiceEnv`                                                                                         | `putProjectServiceEnv`                                                                                                             |
| Releases             | `listProjectReleases`, `getProjectRelease`                                                                     | `createProjectRelease`, `rollbackProjectRelease`                                                                                   |
| Runs                 | `getRun`                                                                                                       | `startRun`                                                                                                                         |
| Environment          | `getEnv`                                                                                                       | `putEnv`                                                                                                                           |
| Git source           | `getSource`                                                                                                    | `putSource`, `deleteSource`, `deployFromSource`                                                                                    |
| Hostnames            | `listCustomHostnames`                                                                                          | `removeCustomHostname`, `recheckCustomHostname`                                                                                    |
| Delivery             | —                                                                                                              | `setCspNonce`, `setCacheApi`, `setCspReporting`                                                                                    |
| GitHub               | `listGithubInstallations`, `listInstallationRepositories`                                                      | —                                                                                                                                  |
| Storage bindings     | `listBindingEnvironments`, `listBindings`, `getDefaultBindings`, `getImagesCapability`                         | `createBinding`, `updateBinding`, `removeBinding`, `putDefaultBindings`                                                            |
| Logs and errors      | `listProjectLogs`, `getProjectLogConsole`, `listLogArchiveRequests`, `getLogArchiveRecord`, `getRequestIssues` | —                                                                                                                                  |
| Diagnostics          | `getRequestDiagnostics`                                                                                        | —                                                                                                                                  |
| Observability drains | `listDrains`, `getDrain`                                                                                       | `createDrain`, `updateDrain`, `deleteDrain`, `testDrain`                                                                           |
| Access protection    | `getAccess`, `listAccessCredentials`                                                                           | `putAccess`, `revokeAccessSessions`, `createAccessCredential`, `revokeAccessCredential`, `rotateAccessBypass`, `clearAccessBypass` |
| OIDC                 | `getProjectOidc`                                                                                               | `putProjectOidc`, `issueOidcDevelopmentToken`                                                                                      |
| Mail administration  | `listMailDomains`, `getProjectMail`, `listMailKeys`, `listProjectMailMessages`, `getProjectMailMessage`        | `createMailDomain`, `reconcileMailDomain`, `removeMailDomain`, `putProjectMail`, `createMailKey`, `revokeMailKey`                  |
| Documentation        | `searchDocumentation`, `getDocumentation`                                                                      | —                                                                                                                                  |

Mail administration is included. The three operations authenticated with a mail sending key,
`sendMailMessage`, `listOwnMailMessages` and `getOwnMailMessage`, are excluded. A mail sending
key cannot authenticate an MCP connection.

## Read the documentation [#read-the-documentation]

The connection includes the full public documentation in English and Japanese as a snapshot
from the MCP server's build. Documentation calls use the same authentication and MCP rate
limits as other calls and work with any permissions. They read the bundled snapshot without
fetching the website or calling the project API.

Use `searchDocumentation` to find relevant pages:

```json
{
  "query": "storage bindings",
  "locale": "en",
  "limit": 5
}
```

`locale` accepts `en`, `ja` or `all` and defaults to `all`. `limit` defaults to 5 and accepts
1–20. The trimmed query must contain 1–256 characters. Search matches all whitespace-separated
terms after Unicode normalization and lowercasing, and ranks title matches before heading
matches and body matches. Results include the page URI, language, title, source URL and a short
excerpt.

Pass a result's URI to `getDocumentation` to read its full Markdown:

```json
{
  "uri": "arkor://docs/en/projects/storage"
}
```

Use `arkor://docs/index` to read the bilingual page index. Clients that support MCP Resources
can also list and read the same index and pages directly. Page URIs use
`arkor://docs/{locale}/{slug}`, with `index` for each language's documentation home:
`arkor://docs/en/index` and `arkor://docs/ja/index`. Resource content is `text/markdown` and
retains code examples, tables, source links and license notices. Screenshots are represented by
their alternative text.

An unknown URI returns an error. The snapshot updates when the MCP server is rebuilt; it may
differ from documentation published after that build. Internal developer notes, blog posts and
image files are not included.

## Upload a deployment [#upload-a-deployment]

Use the bundle produced by your build. The examples below are tool arguments; replace the
project and deployment IDs with your own.

Call `createDeployment` with exactly one of `body` or `sourceUrl`. For an inline bundle, `bundle`
below is the complete parsed contents of `bundle.json`, not a filename or a JSON string:

```javascript
{
  params: { projectId: "project_…" },
  body: bundle
}
```

For a larger bundle, make `bundle.json` available at a public or signed HTTPS URL:

```json
{
  "params": { "projectId": "project_…" },
  "sourceUrl": "https://storage.example.com/bundle.json?signature=…"
}
```

The response returns a deployment and a `missing` array of blob SHA-256 hashes. Call
`uploadBlob` for each missing hash, using exactly one of `source.url` or `source.base64`:

```json
{
  "params": {
    "projectId": "project_…",
    "deploymentId": "dpl_…",
    "sha256": "039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81"
  },
  "source": { "url": "https://storage.example.com/blob?signature=…" }
}
```

For a small blob, canonical Base64 is also supported. This example uploads the bytes `01 02 03`
under their SHA-256 hash:

```json
{
  "params": {
    "projectId": "project_…",
    "deploymentId": "dpl_…",
    "sha256": "039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81"
  },
  "source": { "base64": "AQID" }
}
```

Canonical Base64 uses the standard alphabet and padding, with no whitespace or data-URL prefix.
The API verifies that uploaded bytes match `sha256`; a mismatch returns `blob_mismatch`.
After all missing blobs have arrived, call `finalizeDeployment` with
`params: { projectId, deploymentId }`. It returns `blobs_missing` if any are still absent.
Follow the returned run with `getRun`.

### Upload limits [#upload-limits]

| Input                                          | Limit                                   |
| ---------------------------------------------- | --------------------------------------- |
| Bundle fetched through `sourceUrl`             | 16 MiB                                  |
| Blob fetched through `source.url`              | 32 MiB                                  |
| Blob in `source.base64`                        | 1 MiB after decoding                    |
| Complete MCP JSON request, including arguments | 8 MiB and 16,384 structural JSON values |

The blob upload limit does not override deployment-specific storage limits. KV shell and
rendering placement and native framework Static Assets remain limited to 25 MiB each.

Large inline arrays and objects can exceed the JSON structure limit even below 8 MiB. Use
`sourceUrl` for a large bundle rather than embedding it in the MCP request. One MiB is
1,048,576 bytes.

Source URLs must be publicly accessible HTTPS on port 443 and return HTTP 200 with a body.
Redirects, local or private hosts, IP literals, URL usernames/passwords and fragments are refused.
Use a signed URL if the object needs authorization: Arkor does not forward the MCP connection's
token, cookies or custom authorization headers to the source. Source fetching stops after a
10-second stall or 60 seconds overall, so the source must finish within those limits.

## Read build logs [#read-build-logs]

`getDeploymentLog` accepts `params: { projectId, deploymentId }` and returns
`{ text, nextCursor }`. Each page contains at most 64 KiB of UTF-8 text. If `nextCursor` is not
`null`, call the same tool with that value in its `cursor` argument. Continue until it is `null`;
the cursor is opaque and should be passed unchanged.

## Long-running calls [#long-running-calls]

`finalizeDeployment` can run for 1,225 seconds (20 minutes 25 seconds). Configure the client's
tool-call timeout to allow at least that long; 25 minutes gives room for the connection. If your
client cannot configure a sufficient timeout, it may stop waiting before finalization completes.
Long calls use an SSE response with a keep-alive heartbeat every 15 seconds. A heartbeat keeps
the stream active but does not extend a client's fixed overall timeout.

Cancelling a call or closing its stream does not undo a deployment or run already accepted.
Check its status before retrying.

## Disconnect [#disconnect]

Remove the MCP connection in your assistant. To stop its Arkor access, revoke the connection's
token in **Team settings** › **API tokens**. OAuth connections create a token there; a connection
using an existing token uses the token you supplied. Revocation stops subsequent requests,
including requests made with an OAuth access token that has not expired yet.

Tokens issued by someone who leaves the team, is removed, or becomes a member are also revoked.
See [Teams and roles](/docs/account/teams).

OAuth clients can also revoke tokens at `https://api.arkor.dev/oauth/token`. For an
`offline_access` connection, revoking its current OAuth refresh token revokes that authorization
and all its access tokens. Separately approved connections remain valid.

This example uses a public OAuth client (`token_endpoint_auth_method=none`). Replace the two
`YOUR_…` placeholders with the client's OAuth client ID and current OAuth refresh token. A
confidential client must use its registered authentication method.

```sh
curl --request POST 'https://api.arkor.dev/oauth/token' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'client_id=YOUR_OAUTH_CLIENT_ID' \
  --data-urlencode 'token=YOUR_CURRENT_REFRESH_TOKEN' \
  --data-urlencode 'token_type_hint=refresh_token'
```

Omit `grant_type`. Revoking an access token instead revokes only that token; refresh tokens and
other access tokens remain valid. HTTP 200 with an empty body is also returned for an unknown
token.

OAuth endpoint revocation uses Workers KV and can take time to propagate. It does not revoke the
connection's Arkor API token. To deny all subsequent requests immediately, also revoke that API
token in **Team settings** › **API tokens** as described above.

## Connection errors [#connection-errors]

- **Sign-in or consent is required:** reconnect and finish the browser flow.
- **An operation is forbidden:** the connection's token lacks that permission at that level, is
  limited to other projects, or may not be used from the address the request came from. Edit the
  token in **Team settings** › **API tokens**, or reconnect and allow more.
- **A token was revoked or expired:** reconnect, or configure another API token. An OAuth
  connection also ends when a refresh token is used again after a newer one has been used, since
  that means someone else may hold it.
- **Rate limited:** wait before retrying. API-backed tools also retain their REST operation limits:
  120 requests per minute per IP and token, with a separate 3,000/minute budget for blob uploads.
- **Service unavailable:** try again later. A deployment or temporary backend failure can make
  the connection unavailable.

When contacting support, include `structuredContent.requestId` for a failed tool operation.
For a connection or transport failure, include the HTTP response's `x-arkor-request-id`.
Keep authorization headers and tokens out of support messages.

Binding tools can register Workers AI with `createBinding` and `{ name: "INFERENCE", type: "ai" }`. Registration is explicit and becomes ready after publication; it exposes only public-model inference through the SDK. Default storage tools never create AI.

---

Text on this page: Creative Commons Attribution 4.0 International (https://creativecommons.org/licenses/by/4.0/) by Arkor, 2026.

Code samples on this page: MIT License (https://opensource.org/license/mit) by Arkor, 2026.

Scope and exceptions: https://www.arkor.dev/license
