---
title: "@affordances/protocol · Affordances"
description: "Affordances gives every page of a Next.js app a JSON view for agents, and turns one action definition into a server action, an HTTP endpoint, a WebMCP tool, and an MCP tool."
url: "https://affordances.vercel.app/docs/reference/api-reference/protocol"
image: "https://affordances.vercel.app/og/docs/reference/api-reference/protocol"
lang: "en"
---

# @affordances/protocol

The Affordances protocol: TypeScript types and zod schemas for graphs, calls, deltas, and the site index, the JSON Schemas generated from them, the protocol constants, and the normative `spec.md`. The other Affordances packages import their types from here.

```bash
vlt install @affordances/protocol
```

```ts
import { Delta, Graph, MEDIA_TYPE } from '@affordances/protocol'

const response = await fetch('https://store.example.com/products/tee', {
  headers: { accept: MEDIA_TYPE },
})
const graph = Graph.parse(await response.json())
```

The JSON Schemas are at `@affordances/protocol/schemas/*.json`, example documents at `@affordances/protocol/fixtures/*`, and the spec at `@affordances/protocol/spec.md`.

Read the protocol: [https://github.com/vltpkg/affordances/blob/main/apps/docs/content/protocol.mdx](https://affordances.vercel.app/docs/reference/api-reference/protocol/https:/github.com/vltpkg/affordances/blob/main/apps/docs/content/protocol)
