# Marqly Developers & AI Agents

> Official developer documentation for integrating with Marqly's hosted Streamable HTTP MCP server, OAuth 2.1 authentication, declared scopes, and machine-readable agent manifests.

## MCP Server

- **Endpoint:** `https://mcp.marqly.com/ai/mcp`
- **Transport:** Streamable HTTP (JSON-RPC 2.0)
- **Tools:** 22 tools covering semantic bookmark search, full-content retrieval, duplicate and broken-link detection, boards, tags, 6-color web highlights, account info, and help search (plus `search` and `fetch` Deep Research aliases)
- **Safety:** Read-only by default, per-app write toggle, soft delete to trash, 30-day undo window
- **Server Card:** https://www.marqly.com/.well-known/mcp/server-card.json

## OAuth 2.1 Authentication

- **Protected Resource Metadata (RFC 9728):** https://mcp.marqly.com/.well-known/oauth-protected-resource/ai/mcp
- **Authorization Server Metadata (RFC 8414):** https://api.marqly.com/.well-known/oauth-authorization-server
- **Authorization Endpoint:** `https://api.marqly.com/oauth/authorize`
- **Token Endpoint:** `https://api.marqly.com/oauth/token`
- **Dynamic Client Registration (RFC 7591):** `https://api.marqly.com/oauth/register`
- **Revocation Endpoint:** `https://api.marqly.com/oauth/revoke`
- **PKCE:** Required (`S256`)

## Declared OAuth Scopes

| Scope | Access | Description |
| --- | --- | --- |
| `bookmarks:read` | Read | Search and read saved bookmarks, metadata, summaries, and full content |
| `bookmarks:write` | Write | Create, update, tag, move, and soft-delete bookmarks |
| `boards:read` | Read | List and inspect boards and board hierarchy |
| `boards:write` | Write | Create, update, merge, and soft-delete boards |
| `tags:read` | Read | List and inspect tags across the library |
| `tags:write` | Write | Rename, merge, and delete tags |
| `highlights:read` | Read | Search and read saved webpage highlights and notes |
| `highlights:write` | Write | Create, update, and delete webpage highlights |
| `account:read` | Read | Read authenticated user profile and plan status |
| `bookmarks` | Read & Write | Combined read and write access to bookmarks |
| `boards` | Read & Write | Combined read and write access to boards |
| `tags` | Read & Write | Combined read and write access to tags |
| `conversations` | Read | Search and read saved ChatVault AI conversations |

## Machine-Readable Specifications

- OpenAPI 3.1: https://www.marqly.com/openapi.json
- Agent Resource Discovery (ARD): https://www.marqly.com/.well-known/ard.json
- A2A Agent Card: https://www.marqly.com/.well-known/agent-card.json
- Agent Skills Index (v0.2.0): https://www.marqly.com/.well-known/agent-skills/index.json
- MCP Server Card: https://www.marqly.com/.well-known/mcp/server-card.json
- LLM Index: https://www.marqly.com/llms.txt
- Auth Documentation: https://www.marqly.com/auth.md
- Support & Contact: https://www.marqly.com/contact (support@marqly.com)

## Error Model & Versioning Policy

- **Structured errors (RFC 9457):** Error responses return `application/problem+json` / `application/json` with `code`, `status`, `title`, `detail`, `retryable`, and `request_id`.
- **Versioning & deprecation:** REST endpoints are versioned via `/v1/` path prefix and optional `X-API-Version` header (`2026-12-01`). Deprecated endpoints emit `Deprecation` and `Sunset` headers with at least 12 months notice.
