# Streamable HTTP MCP Protocol & Discovery Endpoints — AlwaysOn Memory

> AlwaysOn Memory runs Streamable HTTP MCP (JSON-RPC 2.0 over HTTPS POST) at `https://always-on.cloud/mcp` (universal OAuth 2.1), `https://always-on.cloud/t/<slug>/mcp` (workspace-scoped), and `https://always-on.cloud/docs/mcp` (public read-only docs). Supported MCP protocol versions are `2025-11-25`, `2025-06-18`, `2025-03-26`, `2024-11-05`.

- **Canonical HTML:** https://always-on.cloud/docs/reference/mcp-protocol
- **Markdown Mirror:** https://always-on.cloud/docs/reference/mcp-protocol.md
- **Public Docs MCP:** https://always-on.cloud/docs/mcp
- **Agent Skill:** https://always-on.cloud/skill.md
- **Last Updated:** 2026-12-01

## What MCP and discovery endpoints does AlwaysOn Memory expose?

Use `/mcp` for universal OAuth 2.1 apps, `/t/<workspace-slug>/mcp` for connection keys or workspace-pinned OAuth connectors, and `/docs/mcp` for public unauthenticated documentation lookup. Standard `.well-known` files advertise OAuth 2.1, SEP-2127 server cards, and Agent Skills.

| Endpoint | Auth | Purpose |
| --- | --- | --- |
| `POST https://always-on.cloud/mcp` | OAuth 2.1 Bearer (`awm_oauth_`) | Universal Memory MCP endpoint; pick a workspace during browser consent. |
| `POST https://always-on.cloud/t/<slug>/mcp` | Connection key (`awm_`) or OAuth 2.1 | Workspace Memory MCP endpoint locked to `<slug>`. |
| `POST https://always-on.cloud/docs/mcp` | None (public, read-only) | Public Docs MCP server (5 tools, Markdown resources, prompts; 120 req/min/IP). |
| `GET https://always-on.cloud/.well-known/oauth-protected-resource` | Public | RFC 9728 Protected Resource Metadata for `/mcp` and `/t/<slug>/mcp`. |
| `GET https://always-on.cloud/.well-known/oauth-authorization-server` | Public | RFC 8414 OAuth 2.1 Authorization Server Metadata (PKCE S256, DCR, rotating refresh). |
| `GET https://always-on.cloud/.well-known/mcp/server-card.json` | Public | SEP-2127 MCP server card for Memory MCP (`/mcp`, all 16 tools). |
| `GET https://always-on.cloud/.well-known/mcp/docs-server-card.json` | Public | SEP-2127 MCP server card for Docs MCP (`/docs/mcp`). |
| `GET https://always-on.cloud/.well-known/agent-skills/index.json` | Public | Agent Skills Discovery v0.2.0 index with SHA-256 digest and `SKILL.md` link. |
| `GET https://always-on.cloud/.well-known/ai-catalog.json` | Public | Unified AI discovery catalog pointing to `llms.txt`, `llms-full.txt`, `skill.md`, and both server cards. |

## What HTTP headers, methods, and protocol versions are required?

Send JSON-RPC 2.0 requests via HTTP `POST` with `Content-Type: application/json` and `Accept: application/json, text/event-stream`. AlwaysOn supports `2025-11-25`, `2025-06-18`, `2025-03-26`, `2024-11-05`, echoes `MCP-Protocol-Version`, handles CORS preflight (`OPTIONS`), and returns `202` for notifications.

- `POST`: Run JSON-RPC 2.0 methods (`initialize`, `ping`, `tools/list`, `tools/call`, plus `resources/*` and `prompts/*` on `/docs/mcp`). Max request body: `320 KB` on Memory MCP, `16 KB` on `/docs/mcp`.
- `OPTIONS / DELETE`: Returns `204 No Content` with permissive MCP CORS headers (`Access-Control-Allow-Origin: *`).
- `GET`: Returns `405 Method Not Allowed` with `Allow: POST, DELETE, OPTIONS` (AlwaysOn uses stateless request/response Streamable HTTP without long-lived SSE sockets).
- `MCP-Protocol-Version`: Optional request header. If sent, it must be one of `2025-11-25`, `2025-06-18`, `2025-03-26`, `2024-11-05` (otherwise HTTP 400 JSON-RPC `-32600`).

_Initialize handshake and tools/list via curl_

```bash
curl -fsS -X POST "https://always-on.cloud/t/YOUR-WORKSPACE/mcp" \
  -H "Authorization: Bearer YOUR_CONNECTION_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl-demo","version":"1.0"}}}'

curl -fsS -X POST "https://always-on.cloud/t/YOUR-WORKSPACE/mcp" \
  -H "Authorization: Bearer YOUR_CONNECTION_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":"2","method":"tools/list","params":{}}'
```

### Agent Context: Transport & Metering Rules for MCP Clients

Avoid unnecessary control calls on Free workspaces to protect daily request headroom.

- On `/mcp` and `/t/<slug>/mcp`, every JSON-RPC method—including `initialize`, `ping`, `tools/list`, and `notifications/initialized`—counts as 1 request against the workspace daily request limit.
- Don't poll `ping` or re-fetch `tools/list` in loops; cache the tool list for the life of the session.
- The public `/docs/mcp` server is separate and never consumes workspace quota.

## Related Documentation

- [Memory tools (16)](https://always-on.cloud/docs/reference/mcp-tools.md): Parameter tables, safety annotations, and JSON-RPC examples for all 16 AlwaysOn Memory MCP tools: pages, search, briefings, handoffs, and inbox messages.
- [Authentication](https://always-on.cloud/docs/concepts/authentication.md): Compare OAuth 2.1 PKCE and scoped awm_ connection keys for MCP tools, plus account sign-in with email links, Google/GitHub/GitLab/OpenID SSO, and passkeys.
- [Error codes](https://always-on.cloud/docs/reference/errors.md): Reference for AlwaysOn Memory HTTP status codes, domain error codes, and MCP JSON-RPC error codes with exact causes and fixes.
