# Ferrite Chronicle Sync for developers

Ferrite Chronicle Sync keeps a directory inside a Linux sandbox equal to a workspace stored on Ferrite, in both directions, so files outlive the sandbox.

Call the same operations over plain HTTP, as MCP tools, or from a page through WebMCP. The base URL is `https://chronicle-sync.ferrite.run`.

## Quickstart

Read something first. This request needs no setup:

```sh
curl -s 'https://chronicle-sync.ferrite.run/api/service'
```

Read what this service is and whether its storage answers now. Use it as a health check, or first to learn where the workspace API and the synchronization connections are. Returns the version, the protocol version, the storage state and the entry points.

To use Ferrite Chronicle Sync from an AI assistant, add its MCP server:

```sh
claude mcp add --transport http ferrite-chronicle-sync https://chronicle-sync.ferrite.run/mcp
```

## Authentication and API keys

The operations listed here need no credential. They describe the service and never read a workspace. The workspace API under `/api/workspaces` needs a signed-in session: [sign in](/_sso/login) in a browser, and send changes from this origin, because a request that changes something must carry the service's own `Origin`. A request with an `Authorization` header is refused there, so a bearer token does not open a workspace. The synchronization connections under `/sync` use a separate one-use credential that the workspace's owner creates with `POST /api/workspaces/{workspace}/attach`.

## Sandbox

Every operation listed here only reads, so all of them are safe to try, and none of them touches anybody's workspace. `check_path` is the quickest one to experiment with: give it any path and it applies the same rule the service applies before it stores a file. To try the workspace API itself, sign in and create a workspace of your own.

The [sandbox page](/sandbox) is the place to start.

## Endpoints

| Operation | Request | What it does |
| --- | --- | --- |
| `get_service` | `GET /api/service` | Read what this service is and whether its storage answers now. Use it as a health check, or first to learn where the workspace API and the synchronization connections are. Returns the version, the protocol version, the storage state and the entry points. |
| `get_limits` | `GET /api/limits` | Read the limits on files, requests, changes and connections. Use it before moving a large file or a large tree, to decide between one request and several. Returns sizes in bytes, times in milliseconds and counts, for the workspace API and for the protocol. |
| `get_protocol` | `GET /api/protocol` | Read the synchronization protocol message by message. Use it when you are writing or debugging a client, or want to know what a frame's kind number means. Returns the frame header length, the two connections, and the number, sender and purpose of every message. |
| `list_workspace_operations` | `GET /api/operations` | List the operations of the workspace API, which needs a signed-in session. Use it to plan work with a workspace before signing in: creating one, reading and writing files, or connecting a sandbox. Returns the method, path and purpose of each operation. |
| `check_path` | `GET /api/paths/check` | Check whether a path may be stored in a workspace. Use it before writing a generated or imported file name; it applies the same rule as the service and the sandbox daemon, and reads no workspace. Returns valid, and the reason when the path is refused. |

The [OpenAPI 3.1 document](/openapi.json) describes every parameter and response. The MCP server at `https://chronicle-sync.ferrite.run/mcp` exposes the same operations as tools with the same names.

## Example requests

### `get_service`

```sh
curl -s 'https://chronicle-sync.ferrite.run/api/service'
```

### `get_limits`

```sh
curl -s 'https://chronicle-sync.ferrite.run/api/limits'
```

### `get_protocol`

```sh
curl -s 'https://chronicle-sync.ferrite.run/api/protocol'
```

### `list_workspace_operations`

```sh
curl -s 'https://chronicle-sync.ferrite.run/api/operations'
```

### `check_path`

```sh
curl -s 'https://chronicle-sync.ferrite.run/api/paths/check?path=src%2Fmain.rs'
```

## Conventions

- Rate limits: every response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`. A `429` also carries `Retry-After`, in seconds.
- Errors: refusals are RFC 9457 `application/problem+json` with a stable `type`, a `detail` written to be read, and a `hint` when there is a next step.
- Versioning: this is version 0.2.0. A change that would break a caller is announced with `Deprecation` and `Sunset` headers at least 90 days ahead.
- Markdown: add `.md` to a page path, or send `Accept: text/markdown`.

## Machine-readable descriptions

- [llms.txt](/llms.txt): orientation for agents
- [OpenAPI](/openapi.json): operations and schemas
- [Agent skills](/.well-known/agent-skills/index.json): installable instructions
- [Agentic Resource Discovery](/.well-known/ard.json): the catalogue of everything here
- [Pricing](/pricing.md)

Questions: see the [contact page](/contact).
