Agent Bridge
Connect an MCP client to ViLine
This page describes the public Agent Bridge contract and the local MCP server of the ViLine app for Mac. It does not mark any MCP client as verified.
Remote Agent Bridge is available to every ViLine account on every plan, including Free. Analysis and dubbing that an agent starts use the limits of your plan for online transcription and text-to-speech. Compatibility with external AI clients has not been verified.
Endpoint
https://www.viline.info/api/v2/mcp
The canonical MCP endpoint is one POST URL. ViLine product sessions are AgentBridgeSession values. That is not an Mcp-Session-Id, and there is no legacy SSE stream or GET stream to open.
The protocol profile is MCP streamable HTTP for the revision shown below. OAuth is OAuth 2.1 with protected-resource metadata, an authorization code, and PKCE S256. A client is a CIMD document or a public client registered in advance. Dynamic client registration is not offered. This page does not show access tokens or refresh tokens.
Versions
The MCP revision, the Agent Bridge protocol, and the operation registry are three different numbers. bridgeProtocolVersion and registryVersion on this page are the Agent Bridge contract. A command for any other version is rejected as unsupported_version.
- MCP revision
2026-07-28- bridgeProtocolVersion
1- registryVersion
11- contextSchemaVersion
1
Client compatibility
Each row is a candidate from that product public documentation. None has been checked against this endpoint. A client that cannot speak this profile is unsupported. The contract is open to any compatible MCP client. There is no separate server planner for each vendor.
AB-BE-06 writes this date after checking real client versions on a test account, without production media. While the date is empty, every candidate above stays unverified.
| Client | Status | What public documentation supports saying |
|---|---|---|
| Claude custom connector | Candidate from public documentation. Not verified. | Claude documents remote custom connectors and OAuth. Calls come from Anthropic infrastructure. Remote MCP there does not prove this wire revision. This row is only the first candidate. |
| ChatGPT custom MCP | Candidate from public documentation. Not verified. | ChatGPT documents remote custom MCP plugins, read and write tools, streaming HTTP, and OAuth with CIMD. Access depends on workspace policy. The same behavior is not promised for every plan or surface. Pages that still mention initialize for mixed auth have to be checked against this revision. |
| Cursor | Candidate from public documentation. Not verified. | Cursor documents streamable HTTP, OAuth authorization code with PKCE, and static client registration. The protocol revision is not checked. |
| Gemini CLI | Candidate from public documentation. Not verified. | Gemini CLI documents remote HTTP MCP and OAuth. It is the next candidate, after an interop check that has not been done. The CLI, the API, Enterprise, and the Android assistant are different products. |
| Gemini app (consumer) | Not promised. | A universal custom MCP connection in the ordinary consumer Gemini app is not confirmed by the public product documents used here. That app is not a promised client. |
OAuth
Discovery is the protected-resource metadata and the authorization-server metadata. The resource and the token audience are exactly the MCP endpoint. The routes below are the production paths. The metadata document is the authority for the issuer. Authorize sends the person to review the grant. The token endpoint accepts application/x-www-form-urlencoded, an authorization code or a refresh token, and PKCE S256. Client authentication is method none. Revoke returns the same empty success for an unknown token.
- Protected resource metadata
https://www.viline.info/.well-known/oauth-protected-resource/api/v2/mcp- Authorization server metadata
https://www.viline.info/.well-known/oauth-authorization-server- GET authorize
https://www.viline.info/api/v2/agent-oauth/authorize- POST token
https://www.viline.info/api/v2/agent-oauth/token- POST revoke
https://www.viline.info/api/v2/agent-oauth/revoke
An access token lives 15 minutes.
A refresh token lives 30 days and is issued only when the grant includes offline_access. Reuse of an older refresh token revokes that token family. offline_access extends authorization. It does not allow background edits.
Scopes
The default consent request is viline:projects:read and viline:projects:edit. Media, frame preview, and device invitation are separate permissions the person must see. There is no scope for the gallery, the clipboard, export, publish, or admin. preview:read returns a frame image, and that image reveals text visible in the frame even without viline:media:read.
viline:projects:readSee details of your projects and editing sessions, including names, structure, and context. This does not change a project.viline:projects:editMake editing changes in a project, and only while that project is open on your device under a session you have allowed there. Dubbing sends the needed text through ViLine servers to AI providers.viline:media:readRead transcripts, recognized text, and scene descriptions from your media, and run the analysis that creates them. Analysis sends the needed audio, video or frames through ViLine servers to AI providers.viline:preview:readSee a picture of a frame from the project. The picture can reveal text that is visible in the frame, even without viline:media:read.viline:sessions:inviteInvite a device you choose, so you can open a project on it and allow this app there.offline_accessExtend this authorization so the app can renew it later. offline_access never allows background edits.
Foreground
An edit runs only while the ViLine editor is open in the foreground, on a project the person has allowed for this grant. Stop on the device ends the lease. Leaving the editor ends it too. There is no background socket and no queue of edits to run later. A push, when the device can show one, only asks the person to open a project. Push delivery is not consent, not execution, and not a promise that the editor will wake. offline_access does not allow an edit while the editor is closed.
By default ViLine runs the commands of an agent without asking the person, on the phone and on the Mac. A setting that asks before a command will come later. The person can stop the agent at any time and undo its changes in the app.
Tools
tools/list is the catalog for the scopes of this grant. It does not follow whichever project a connection used last. get_session returns the operations the device that opened the session can actually run. A singleton tool name is the operation id with dots replaced by underscores, such as clip_split. The server turns that call into one step with id s1. When an operation has prepared fields, the caller sends them. The server does not choose a value, such as a voice, for the caller. list_sessions lists only leases this grant can use, not every project on the device. request_session invites a device only by a handle the person already allowed. The person chooses the project on that device.
execute_batch takes 1 to 12 steps, in the order given, and only operations the contract marks atomicBatch. The batch is one transaction.
After a tool accepts a command, call get_command with the commandId until the state is terminal. accepted is not success. cancel_command asks the device that opened the session to stop a command. A command that has already finished stays finished.
get_context, get_media_index, and get_frame read the same data as the resource URIs. A client that only calls tools still receives that data. get_frame returns image content after a completed render_frame and does not render the frame again. render_frame is a read, with size small or medium. It does not add an undo step.
render_frame size small uses 640 pixels on the long side. medium uses 1280. The project aspect ratio stays. A JPEG larger than 2 MiB is frame_too_large. The server does not quietly lower the quality.
Command states
delivery_ack and delivered are transport facts. They are not success.
acceptedThe server has accepted the command for dispatch. This is not success, and the edit has not been committed.dispatchedThe server stored the command and sent it toward the device that opened the session. This is not success.awaiting_confirmationThe device is waiting for the person to confirm. A device gets here only when its settings ask for confirmation. This is not success.runningThe editor is applying the command. This is not success.cancel_requestedCancellation was requested. The command may still complete, fail, or cancel. This is not success.completedThe editor committed the change and refreshed. This is the success state. A later Undo is a separate command_reverted fact and does not rewrite this result into cancelled. get_command may also report historyState applied or reverted.failedThe command failed. rollbackConfirmed true means the project returned to baseRevision. false means rollback was not proven. Do not describe that as rolled back.cancelledThe command was cancelled. A confirmed rollback keeps baseRevision. Expiry and a lost connection do not by themselves prove rollback.rejectedThe server refused the command before it changed the project. The error says why.expiredThe command reached a terminal expiry. Expiry is not success and does not prove rollback.outcome_unknownThe command was dispatched and no terminal receipt arrived. This is not success and not a proven rollback. The person allows a new session, the client reads the context again, and it does not automatically repeat the old mutation.
cancel_command is cooperative. The device and the server both watch deadlines. A missed deadline does not prove that the edit was undone.
Errors
An error is an object with code and message. A failed step can name stepId. Some errors include apiFailure. The codes below are closed. An unknown code is not a success.
unsupported_versionThe registry, Agent Bridge protocol, or context schema is not the version this server accepts.invalid_commandThe command or a step does not match the published schema.operation_unavailableThe operation is unknown, not live, outside this grant or this session, or not allowed in a multi-step batch.insufficient_scopeThe grant is missing a scope this call needs.not_foundThere is no record for this caller. A missing record and another principal record look the same.session_closedThe lease was stopped, or it expired.session_offlineThe device that opened the session was not connected before dispatch.session_busyThis session already has a running command, or the project already has a writer.grant_revokedThe account owner revoked this grant.stale_epochThe epoch is no longer current, so older expectedRevision values are invalid.stale_revisionexpectedRevision is not the current revision.idempotency_conflictThe same clientRequestId was sent with a different payload.result_expiredThe payload was deleted. This key does not start a new command.rate_limitedThe call passed a rate limit and was rejected.quota_exceededAgent Bridge has no quota of its own: its limits return rate_limited. A provider step that goes over a daily quota of the account (captions, text-to-speech, or Vibe requests on the Mac) fails with step_failed, and apiFailure.code is quota_exceeded.plan_requiredAgent Bridge is not available for this account. A provider step that the plan does not allow (captions, text-to-speech, the chosen voice, or Vibe requests on the Mac) fails with step_failed instead, and apiFailure.code is plan_required.deadline_expiredThe command deadline passed.confirmation_rejectedThe person rejected the command on the device.confirmation_expiredThe confirmation window on the device passed.step_failedA step failed. stepId names it when the error includes one.commit_failedThe editor commit or refresh failed. Treat the edit as rolled back only when rollbackConfirmed is true.frame_too_largeThe JPEG exceeded the size limit. The server does not silently reduce quality.outcome_unknownThe command was dispatched and no terminal receipt arrived. This is not success.
Resources
A resource URI is an address, not a credential. Every read checks the grant and its scopes again. While a command is running, the context resource does not return an in-progress model. Read tools and resources are two surfaces of one provider.
viline://sessions/{sessionId}/contextviline:projects:read- The latest finished context, including epoch, revision, and capturedAt. Scope viline:projects:read.
viline://sessions/{sessionId}/media-index/{assetId}/{sourceVersion}viline:media:read- Observed scenes, speech, and OCR for one source version in this session. No raw file paths, no local source descriptor, and no neighboring project. Scope viline:media:read.
viline://sessions/{sessionId}/frames/{frameId}viline:preview:read- One JPEG for a revision and timeUs. It is private, not a public URL. The image reveals text visible in the frame even without viline:media:read. Scope viline:preview:read.
viline://registry/11- Machine-readable contract, selectors, and operation metadata. No account data.
Rate limits
Past a limit, the call is rejected. The server does not shrink the request to fit the limit. These figures are operational settings. Their capacity under load has not been measured.
- 60 command submissions per minute for one account.
- 120 reads per minute for one grant.
- 10 frames per minute for one account.
- 3 invitations per 10 minutes for one account.
- 1 running command in a session. Another call is session_busy.
- 1 active writer for one project.
Timeouts
- Lease: 30 minutes.
- Heartbeat: 10 seconds.
- Offline after 30 seconds without a heartbeat.
- Delivery acknowledgement: 5 seconds.
- Local command deadline: 60 seconds.
- Confirmation on the device, when its settings ask for it: 120 seconds, before the command deadline starts.
- Frame: 15 seconds.
- Invitation: 10 minutes.
Privacy
The trust boundary is checked on every command, resource, and event, not only on the consent screen. Text from the agent, overlay text, OCR, transcripts, and scene descriptions do not grant permission. Marking content untrusted does not stop an edit the grant already allows. Prompt injection cannot be fully removed here, because the external agent reads the data in its own environment. A completed edit is not permission to export, publish, copy raw media to a third party, or send a message. The person exports from the normal editor after Stop. A future export or publish would need its own scope, a one-time confirmation of that immutable request on the device, a real completion receipt, and a separate change. This contract does not include that tool.
Retention
- Context is deleted when the lease closes.
- A frame is deleted when the lease closes, and also after 5 minutes.
- Command payloads and results are kept for 24 hours.
- A minimal audit, without text, media, or tokens, is kept for 30 days.
- The idempotency record for a clientRequestId is kept until the grant is revoked. After the payload is deleted, the same key returns result_expired and does not start the command again.
Revoking a token blocks new access on the server immediately. The device stops when it receives the revoke, or at the next loss of the lease or heartbeat. If the device is offline, the revoke cannot arrive instantly. That window lasts until the lease times out. It is not a remote instant rollback. Edits already committed stay in Undo. A bound device may still submit a terminal receipt for reconciliation after the grant is revoked. The revoked agent cannot read that receipt.
Not available through MCP
The cloud Agent Bridge does not expose gallery import, creating a project, stories, the music catalog, voice recording, stickers, GIFs, the interactive collage handoff, support chat, the clipboard, or export. The operation ids are listed below. On the Mac, the local server adds media.import, project.create, and project.export for folders the person granted. The rest of the list is not available there either. The registry has no publish operation. Do not call a publish tool. There is not one.
media.importproject.createstories.createmusic.selectvoiceover.recordsticker.addgif.addcollage.addsupport.openclipboard.pasteproject.export
ViLine for Mac: local server
http://127.0.0.1:7429/mcp
The ViLine app for Mac also runs an MCP server on the computer, at the address below. It listens only on the loopback address, so only a client on the same Mac can connect. The person turns it on in Agent Settings, can change the port there, and connects a client with a bearer token that the app shows once. A local agent, such as Claude Code or Codex, uses the same commands, receipts, revisions, and clientRequestId rules as above. Its catalog is the desktop profile of registry 11: more live operations than the cloud Agent Bridge, including files. Edits and project files stay on the Mac. Analysis, dubbing, online captions, text-to-speech and music send the needed audio, video, frames or text through ViLine servers to providers. Noise reduction processes the audio on ViLine servers. The agent itself is usually a cloud model: what it reads, such as the context, transcripts and frames, goes to the provider of that model.
create_project makes a new project without a session, from files in folders the person granted or empty. An empty project stays in the library like any other. The tool answers at once with a running receipt. get_command follows it, and the output of the completed receipt names the sessionId of the new project, already open for the same agent. open_project opens an existing project. The first time a client opens a project, the Mac asks the person once.
An agent reaches only folders the person granted, and paths are relative to such a folder. list_folder lists the files of a granted folder by name, with their sizes and modification dates, not their contents. ViLine does not keep the listing. The file commands below have no deadline. They run while they make progress, until they finish or cancel_command or Stop ends them. Each one answers as soon as the Mac has taken the command: the receipt is dispatched, or running for create_project, and is not finished yet. get_command shows the progress and, once the receipt is completed, the output. A broken request, such as a client timeout or a closed connection, does not cancel the command. The same call with the same clientRequestId returns the same command and does not do the work twice. A new clientRequestId starts the work again. An export writes only into a read-write folder and never over an existing file. media_analyze and audio_dub answer the same way on the Mac: they run on a ViLine AI service for up to 10 minutes, so each one answers with a dispatched receipt that is not finished yet. get_command follows it until it is completed, failed, or cancelled. cancel_command and Stop stop them and leave the project unchanged.
create_projectmedia_importproject_createproject_export
Examples
{
"sessionId": "5e55a001-0000-4000-8000-000000000001",
"expectedRevision": 4,
"clientRequestId": "agent-split-1",
"target": {
"ids": [
"clip-a"
]
},
"args": {
"atUs": 2000000
}
}{
"sessionId": "5e55a001-0000-4000-8000-000000000001",
"expectedRevision": 6,
"clientRequestId": "agent-batch-1",
"steps": [
{
"id": "trim",
"op": "clip.trim",
"target": {
"ids": [
"clip-b"
]
},
"args": {
"startUs": 1000000,
"endUs": 4000000
}
},
{
"id": "mute",
"op": "audio.mute",
"target": {
"ref": "trim.items"
},
"args": {
"muted": true
}
}
]
}{
"state": "accepted",
"commandId": "c0000001-0000-4000-8000-000000000001",
"epoch": 3,
"baseRevision": 4,
"revision": 4,
"stepResults": [],
"contextUri": "viline://sessions/5e55a001-0000-4000-8000-000000000001/context"
}{
"state": "completed",
"commandId": "c0000001-0000-4000-8000-000000000001",
"epoch": 3,
"baseRevision": 4,
"revision": 5,
"stepResults": [
{
"stepId": "s1",
"op": "clip.split",
"resolvedTargets": [
{
"id": "clip-a",
"kind": "item"
}
],
"outputTargets": [
{
"id": "clip-a",
"kind": "item"
},
{
"id": "clip-c",
"kind": "item"
}
],
"status": "completed"
}
],
"completedAt": "2026-11-04T10:00:12.000Z",
"contextUri": "viline://sessions/5e55a001-0000-4000-8000-000000000001/context"
}{
"state": "rejected",
"commandId": "c0000005-0000-4000-8000-000000000005",
"epoch": 3,
"baseRevision": 7,
"revision": 7,
"stepResults": [],
"completedAt": "2026-11-04T10:00:32.000Z",
"error": {
"code": "stale_revision",
"message": "expectedRevision 2 is not the current revision 7"
},
"contextUri": "viline://sessions/5e55a001-0000-4000-8000-000000000001/context"
}{
"state": "cancelled",
"commandId": "c0000006-0000-4000-8000-000000000006",
"epoch": 3,
"baseRevision": 7,
"revision": 7,
"stepResults": [
{
"stepId": "cut",
"op": "timeline.removeRange",
"resolvedTargets": [],
"outputTargets": [],
"status": "rolled_back"
},
{
"stepId": "fast",
"op": "clip.speed",
"resolvedTargets": [
{
"id": "clip-c",
"kind": "item"
}
],
"outputTargets": [],
"status": "cancelled"
}
],
"completedAt": "2026-11-04T10:00:41.000Z",
"rollbackConfirmed": true,
"contextUri": "viline://sessions/5e55a001-0000-4000-8000-000000000001/context"
}{
"code": "operation_unavailable",
"message": "project.export is not available to agents"
}{
"state": "completed",
"commandId": "c0000004-0000-4000-8000-000000000004",
"epoch": 3,
"baseRevision": 7,
"revision": 7,
"stepResults": [],
"completedAt": "2026-11-04T10:00:30.000Z",
"frame": {
"resourceUri": "viline://sessions/5e55a001-0000-4000-8000-000000000001/frames/f0000001-0000-4000-8000-000000000001",
"timeUs": 1500000,
"width": 720,
"height": 1280,
"mimeType": "image/jpeg",
"byteLength": 182344
},
"contextUri": "viline://sessions/5e55a001-0000-4000-8000-000000000001/context"
}