Introduction | Ambient Context Protocol

Ambient Context Protocol

5 min read Original article ↗

How a desktop app communicates its ambient context to an agent host

The Ambient Context Protocol is an extension to the Model Context Protocol (MCP) that lets a desktop app tell an AI assistant what the user is looking at.

With it, an assistant you call from anywhere on your computer can ask the app in front which documents are open, what is selected and where each of those things is on screen.

Today an assistant learns what is in front of you from a screenshot, a paste or a paragraph of explanation. The protocol replaces that with the app's own account: structured, exact, and with ids the assistant can point back at.

It is not a protocol of its own. A provider is an ordinary MCP server, its two answers are ordinary MCP resources, and a client that has never heard of the extension can still list and read them. It is called a protocol to give it a short name to refer to.

This is draft 0.2.4, and any name may change.

Editors

Paper, code editors

Design tools

Canvases, frames, layers

Task and mail apps

Lists, threads, messages

Providers: the apps the user works in. They answer what is open and selected, and where.

Ambient Context Protocol

An extension to MCP

ambient://currentambient://location/{id}

Ambient assistants

Sirius

Any MCP client

Lists and reads the two resources

The agent

Sees only what the host passes on

Hosts: MCP clients. They read when the user asks.

  • Select a sentence in a Markdown editor and ask "is this claim true?" The assistant knows which sentence, in which file, and shows its answer beside it.
  • Select a frame in a design tool and ask "does this match our spacing rules?" The assistant receives a thumbnail and a link to the frame, not a screenshot of the whole window.
  • With a task open in a task manager, ask "what is blocking this?" The assistant knows which task, inside which list.
  • Point at a chart and ask "what am I looking at?" The app reports what is under the pointer, and the assistant treats it as a weaker hint than a selection.

Depending on where you sit, the protocol does different things for you.

  • App developers: one small MCP server makes your app understood by every assistant that speaks the protocol, without a separate integration for each.
  • Assistant developers: you get exact context and on-screen positions from the apps your users work in, without screenshots or accessibility scraping.
  • Users: you can ask about what is in front of you without explaining it first, and you see what is sent before it goes. Nothing is read until you call on the assistant.

The first provider is Paper, a Markdown editor. The first host is Sirius, an assistant. Both are planned, and neither has shipped this version.

Three parties are involved. Two of them take part in the protocol.

Provider

The app the user is working in. It is an MCP server on the local machine and answers questions about itself.

Host

The agent's own app, an MCP client. It finds the front app's provider, reads its context, shows the user what it collected and draws its own interface.

Agent

The model behind the host. It is not a party to the protocol and sees only what the host passes on.

A provider offers two reads, each an ordinary MCP resource that the host reads with resources/read:

OperationResourceQuestion it answers
currentambient://currentWhat does the user have open, and what are they pointing at?
locateambient://location/{id}Where on screen is the element with this id?

The answer to current is one tree of elements rooted at the app: its windows, the documents in them, and what is selected, focused or under the pointer.

A provider may offer a third operation, watch: while a host is showing the user what it read, the provider tells it when the answer to current changes, with no content, and the host reads again.

A typical exchange:

A running provider announces itself with a descriptor file in a known per-user folder. The file holds the provider's local endpoint and a bearer token.

The user invokes the host. The host finds the descriptor for the app in front and checks the endpoint it names.

The host reads ambient://current with the token. The provider answers with the tree of elements. If anything fails, the host carries on without context.

The host shows the user what it collected, lets them remove it, and passes the rest to the agent with the question.

The agent names an element by id, such as sel-23. To show something beside it, the host reads ambient://location/sel-23 from the same provider and gets back the element's rectangles on screen.

The provider never learns what the host drew, and the agent never sees a coordinate. The agent never calls the provider; the host does.

  • The app says where; the host decides what. A provider reports elements and their positions. It never names what the host draws there.
  • A shared language for how a thing is shown, the app's own word for what it is. Every element has a role from a fixed list of thirteen, such as Window, List, Row or Text, which a program can write rules against. What the thing is to the app, such as a task or a comment, goes in subrole and attributes, which the app defines freely.
  • Pulled on the user's action, and kept current while the user is looking. A host asks for context when the user does something that calls for it. While it is showing the user what it read, it may ask the provider to say when that changes. A provider sends nothing a host did not ask for, and a host does not poll.
  • It is ordinary MCP. A provider is an MCP server and the two answers are MCP resources. A client that has never heard of the protocol can still list and read them.