# Weave — Complete Documentation > Automatically generated for language models from http://localhost:3000/docs/ --- ## Agent House API URL: http://localhost:3000/docs/api-reference/agent-house/ Summary: Public chat, agents, models, and sandbox endpoints under /api/public/v1/agent-house. # Agent House API Base: `https:///api/public/v1/agent-house` Requires `Authorization: Bearer wn_…` and `X-Workspace-Id`. ## Chat | Method | Path | Scopes | | :--- | :--- | :--- | | `POST` | `/chat` | `ai_chat:write` | | `GET` | `/chat/history` | `ai_chat:read` | | `POST` | `/chat/sessions` | `ai_chat:write` | | `GET` / `PATCH` / `DELETE` | `/chat/sessions/:sessionId` | `ai_chat:read` / `write` / `delete` | ### Send a message ```bash curl -X POST "https:///api/public/v1/agent-house/chat" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "message": "Summarize open tasks in the relaunch project.", "model": { "name": "claude-sonnet-4-5", "version": "latest", "reasoningLevel": "medium" }, "allowEdit": true, "allowWebSearch": false, "noteIds": [], "projectIds": ["proj_01..."], "sessionId": null, "agentId": null }' ``` | Field | Type | Required | Notes | | :--- | :--- | :--- | :--- | | `message` | string | **yes** | User prompt | | `model` | object | **yes** | `{ name, version?, reasoningLevel? }` | | `allowEdit` | boolean | no | Default `true` | | `allowWebSearch` | boolean | no | | | `noteIds` | string[] | no | Context notes | | `projectIds` | string[] | no | Context projects | | `agentId` | string | no | Optional agent | | `sessionId` | string | no | Continue a session | | `streamTransport` | `socket` \| `sse` | no | Streaming transport | Multipart: field name `files` for uploads (images/docs per product limits). ### List history ```bash curl "https:///api/public/v1/agent-house/chat/history?sessionId=ses_01...&limit=50" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## Models & tools ```bash curl "https:///api/public/v1/agent-house/models" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " curl "https:///api/public/v1/agent-house/tools" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## Agents | Method | Path | Scopes | | :--- | :--- | :--- | | `GET` | `/agents` | `ai_agents:read` | | `POST` | `/agents` | `ai_agents:write` | | `GET` / `PUT` / `PATCH` / `DELETE` | `/agents/:id` | read / write / delete | | `POST` | `/agents/:id/publish` | `ai_agents:write` | | `POST` | `/agents/delegate` | `ai_agents:execute` | ### Create agent ```bash curl -X POST "https:///api/public/v1/agent-house/agents" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "name": "Docs assistant", "instructions": "Help with Weave API and MCP setup. Prefer curl examples.", "model_name": "claude-sonnet-4-5", "model_provider": "anthropic", "reasoning_level": "medium", "mcp_allowed_tools": ["list_notes", "get_note", "list_projects"], "language": "en" }' ``` ## Sandbox (execute) Requires `sandbox:execute`. ```bash curl -X POST "https:///api/public/v1/agent-house/sandbox/code" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "code": "print(2 + 2)", "language": "python", "timeoutMs": 15000 }' ``` Also available: `POST /sandbox/bash`, `/sandbox/files/write|read|list`, `/sandbox/server/start|url|stop`. ## LLM connections (BYOK) ```bash curl -X POST "https:///api/public/v1/agent-house/connections" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "provider": "anthropic", "title": "Personal Anthropic", "secrets": { "apiKey": "sk-ant-..." }, "models": ["claude-sonnet-4-5"] }' ``` List providers: `GET /agent-house/providers`. --- ## REST Conventions URL: http://localhost:3000/docs/api-reference/conventions/ Summary: Public API base path, JSON envelopes, pagination, errors, rate limits, and required headers. # REST Conventions & Response Envelopes ## Base URL Personal / script access uses the **Public API**: ```text https:///api/public/v1 ``` Do not confuse this with the session-authenticated app API under `/api/v1`. Public routes currently mount: - `/me` - `/notes` - `/projects` - `/agent-house` - `/users/search` ## Required headers ```http Authorization: Bearer wn_live_YOUR_TOKEN Content-Type: application/json X-Workspace-Id: ``` `X-Workspace-Id` is required for workspace-scoped routes. It is **not** required for `GET /me`. ## Response envelope ### Success ```json { "success": true, "data": { "id": "note_01J9X8Y7Z6", "title": "Sprint notes" }, "message": "Resource fetched successfully", "meta": { "timestamp": "2026-11-08T19:00:01.450Z", "requestId": "req_01J9X8..." } } ``` ### Error ```json { "success": false, "error": { "code": "VALIDATION_ERROR", "message": "The field 'title' is required.", "details": [ { "field": "title", "issue": "Required" } ] }, "meta": { "timestamp": "2026-11-08T19:00:01.450Z", "requestId": "req_01J9X8..." } } ``` ## Error codes | Code | HTTP | Meaning | | :--- | :--- | :--- | | `UNAUTHORIZED` | `401` | Missing or invalid token | | `FORBIDDEN` | `403` | Missing scope or workspace membership | | `NOT_FOUND` | `404` | Resource not found in workspace | | `CONFLICT` | `409` | Unique constraint / conflict | | `VALIDATION_ERROR` | `422` | Body failed schema validation | | `RATE_LIMITED` | `429` | Rate quota exceeded | | `INTERNAL_ERROR` | `500` | Unexpected server error | ## Pagination List endpoints accept cursor / limit style queries: ```bash curl "https:///api/public/v1/notes?limit=25&cursor=note_01J9X8Y7" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` Common query params: `limit`, `cursor`, `offset`, `page`, `search`, `sort` / `sort_by`, `sort_order`. ## Rate limits When limited, expect `429` and headers such as: ```http Retry-After: 30 X-RateLimit-Limit: 120 X-RateLimit-Remaining: 0 ``` ## Soft deletes Many resources support soft-delete via `deleted: true` on update payloads (or dedicated delete routes that soft-delete). Restore is typically `deleted: false` or a restore endpoint where documented. --- ## Me & Users URL: http://localhost:3000/docs/api-reference/me-and-users/ Summary: Verify token identity with GET /me and search workspace users. # Me & Users ## `GET /api/public/v1/me` Validates the Bearer token and returns the authenticated user. **No** `X-Workspace-Id` required. | | | | :--- | :--- | | **Scope** | Valid `wn_` token | | **Workspace header** | Not required | ```bash curl "https:///api/public/v1/me" \ -H "Authorization: Bearer wn_live_..." ``` **Success (200):** ```json { "status": "OK", "message": "Successfully accessed Weave Notes Public API.", "user": { "id": "usr_...", "email": "you@example.com", "name": "Ada Lovelace" }, "apiToken": { "id": "tok_...", "name": "Local scripts" } } ``` **Unauthorized (401):** ```json { "success": false, "error": { "code": "UNAUTHORIZED", "message": "Invalid or missing token" } } ``` ## `GET /api/public/v1/users/search` Search users available to the workspace (mentions, collaborators). | | | | :--- | :--- | | **Scope** | `users:read` | | **Workspace header** | Required | ```bash curl "https:///api/public/v1/users/search?q=ada&limit=10" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` **Success (shape):** ```json { "success": true, "data": [ { "id": "usr_...", "name": "Ada Lovelace", "email": "ada@example.com", "avatarUrl": null } ] } ``` --- ## Notes API URL: http://localhost:3000/docs/api-reference/notes/ Summary: Create, list, update, and export notes via the Public REST API with example payloads. # Notes API Base: `https:///api/public/v1/notes` All routes require `Authorization: Bearer wn_…` and `X-Workspace-Id`. | Method | Path | Scopes | | :--- | :--- | :--- | | `GET` | `/` | `notes:read` | | `GET` | `/stats` | `notes:read` | | `POST` | `/` | `notes:write` | | `GET` | `/:id` | `notes:read` | | `PUT` / `PATCH` | `/:id` | `notes:write` | | `DELETE` | `/:id` | `notes:delete` | | `GET` | `/:noteId/content` | `notes:read` | | `PUT` / `POST` | `/:noteId/content` | `notes:write` | | `GET` | `/:noteId/export` | `notes:read` | | `GET` / `POST` | `/:noteId/comments` | `notes:read` / `notes:write` | | `GET` / `POST` | `/:noteId/collaborators` | `notes:read` / `notes:write` | ## List notes ```bash curl "https:///api/public/v1/notes?limit=25&search=sprint&deleted=false" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` Query params: `cursor`, `limit`, `offset`, `page`, `search`, `sort` / `sort_by`, `sort_order`, `tags`, `deleted`. ## Create note ```bash curl -X POST "https:///api/public/v1/notes" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "title": "Sprint planning", "markdown": "## Agenda\n\n- Scope\n- Risks", "project_id": null, "status": "active", "tags": ["planning"] }' ``` | Field | Type | Required | | :--- | :--- | :--- | | `title` | string | no | | `markdown` | string | no | | `project_id` | string \| null | no | | `status` | string | no | | `tags` | string \| string[] | no | **Success (201):** ```json { "success": true, "data": { "id": "note_01...", "title": "Sprint planning", "status": "active", "createdAt": "2026-11-22T12:00:00.000Z" } } ``` ## Get note ```bash curl "https:///api/public/v1/notes/note_01..." \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## Update note ```bash curl -X PATCH "https:///api/public/v1/notes/note_01..." \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "title": "Sprint planning (updated)", "tags": ["planning", "q4"], "deleted": false }' ``` ## Replace / append content ```bash # Replace markdown body curl -X PUT "https:///api/public/v1/notes/note_01.../content" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "markdown": "# New body\n\nFull replacement." }' # Append markdown curl -X POST "https:///api/public/v1/notes/note_01.../content" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "markdown": "\n\n## Follow-up\n- Ship docs" }' ``` `markdown` is required. Optional: `baseRevision` / `base_revision` for optimistic concurrency. ## Export ```bash curl "https:///api/public/v1/notes/note_01.../export?format=md" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` `format`: `pdf` | `md` | `csv`. ## Comments ```bash curl -X POST "https:///api/public/v1/notes/note_01.../comments" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "content": "Looks good — ship it.", "parent_id": null }' ``` ## Collaborators ```bash curl -X POST "https:///api/public/v1/notes/note_01.../collaborators" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "userId": "usr_..." }' ``` ## Soft delete ```bash curl -X DELETE "https:///api/public/v1/notes/note_01..." \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` Or set `"deleted": true` on `PATCH /:id`. --- ## Projects API URL: http://localhost:3000/docs/api-reference/projects/ Summary: Workspaces projects, stages, tasks, tags, and priorities via the Public REST API. # Projects API Base: `https:///api/public/v1/projects` Requires `Authorization: Bearer wn_…` and `X-Workspace-Id`. | Method | Path | Scopes | | :--- | :--- | :--- | | `GET` | `/` | `projects:read` | | `POST` | `/` | `projects:write` | | `GET` | `/:id` | `projects:read` | | `PATCH` / `PUT` | `/:id` | `projects:write` | | `DELETE` | `/:id` | `projects:delete` | | `GET` / `POST` | `/:id/stages` | `projects:read` / `projects:write` | | `POST` | `/:projectId/stages/:stageId/tasks` | `projects:write` | | `PATCH` | `/:projectId/tasks/:noteId` | `projects:write` | | `GET` / `POST` | `/tags` | `tags:read` / `tags:write` | ## List projects ```bash curl "https:///api/public/v1/projects?limit=20&search=launch&status=active" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` Useful query filters: `search`, `status`, `methodology`, `visibility`, `tags`, `cursor`, `limit`, `include`. ## Create project ```bash curl -X POST "https:///api/public/v1/projects" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "title": "Website relaunch", "methodology": "kanban", "visibility": "workspace", "status": "active", "stages": [ { "name": "Backlog", "position": 0 }, { "name": "In progress", "position": 1 }, { "name": "Done", "position": 2, "is_done": true } ] }' ``` | Field | Type | Required | | :--- | :--- | :--- | | `title` | string | **yes** | | `methodology` | string | no | | `visibility` | string | no | | `status` | string | no | | `stages` | object[] | no | | `parent_project_id` | string | no | | `properties` | object | no | ## Get project ```bash curl "https:///api/public/v1/projects/proj_01...?include=stages,collaborators" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` `include` may include `collaborators`, `notes`, `subprojects`, `stages`. ## Update project ```bash curl -X PATCH "https:///api/public/v1/projects/proj_01..." \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "title": "Website relaunch v2", "status": "active" }' ``` ## Stages ```bash curl -X POST "https:///api/public/v1/projects/proj_01.../stages" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "name": "Review", "color": "#6366f1", "position": 2 }' ``` ## Create task in a stage Tasks are note-backed cards on the board: ```bash curl -X POST "https:///api/public/v1/projects/proj_01.../stages/stg_01.../tasks" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "title": "Ship docs overhaul", "markdown": "Rewrite public docs for API + MCP." }' ``` ## Patch task ```bash curl -X PATCH "https:///api/public/v1/projects/proj_01.../tasks/note_01..." \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "title": "Ship docs overhaul (done)", "status": "done" }' ``` ## Tags ```bash curl -X POST "https:///api/public/v1/projects/tags" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "name": "priority", "color": "#ef4444" }' ``` ## Soft delete / restore ```bash curl -X DELETE "https:///api/public/v1/projects/proj_01..." \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " curl -X POST "https:///api/public/v1/projects/proj_01.../restore" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` --- ## Personal API Tokens (wn_) URL: http://localhost:3000/docs/authentication/api-tokens/ Summary: Create, scope, and revoke personal access tokens for the Public REST API and MCP Bearer auth. # Personal API Tokens (`wn_`) Personal tokens authenticate scripts, CI, MCP clients (Bearer), and the Public REST API. Tokens are prefixed `wn_` and stored as hashes server-side. ## Endpoints Base: `https:///api/v1/api-tokens` | Method | Path | Scope | Description | | :--- | :--- | :--- | :--- | | `GET` | `/scopes` | `api_tokens:read` | List available scope keys | | `GET` | `/get-tokens` | `api_tokens:read` | List your tokens (no plaintext) | | `POST` | `/create-token` | `api_tokens:write` | Create a token (returns plaintext once) | | `POST` | `/:id/revoke` | `api_tokens:delete` | Revoke a token | ## Create token ```bash curl -X POST "https:///api/v1/api-tokens/create-token" \ -H "Authorization: Bearer wn_live_..." \ -H "Content-Type: application/json" \ -H "X-Workspace-Id: " \ -d '{ "name": "CI deployer", "scopes": ["notes:read", "notes:write", "projects:read"], "expiresAt": "2027-01-01T00:00:00.000Z", "workspaceId": "" }' ``` | Field | Type | Required | Notes | | :--- | :--- | :--- | :--- | | `name` | string | yes | Display label | | `scopes` | string[] | no | Subset of catalog; omit only if your client defaults scopes | | `expiresAt` | ISO datetime | no | Optional expiry | | `workspaceId` | uuid | no | Optional workspace binding | ## Using a token ```http Authorization: Bearer wn_live_YOUR_TOKEN X-Workspace-Id: ``` - **Public REST:** `https:///api/public/v1/...` - **MCP Bearer:** `Authorization: Bearer wn_…` against `https:///v1/mcp` ## Scope catalog Scopes mirror workspace RBAC. Common groups: ### Notes & projects | Scope | Access | | :--- | :--- | | `notes:read` / `notes:write` / `notes:delete` | Notes and content | | `projects:read` / `projects:write` / `projects:delete` | Projects, stages, tasks | | `projects:admin` | Project administration | | `tags:read` / `tags:write` / `tags:delete` | Tags | | `priorities:read` / `priorities:write` / `priorities:delete` | Task priorities | ### AI & agents | Scope | Access | | :--- | :--- | | `ai_chat:read` / `ai_chat:write` / `ai_chat:delete` | Chat sessions | | `ai_agents:read` / `ai_agents:write` / `ai_agents:delete` / `ai_agents:execute` | Agents | | `ai_artifacts:read` / `ai_artifacts:write` / `ai_artifacts:delete` | Artifacts | | `sandbox:execute` | Agent sandbox | ### Integrations & MCP | Scope | Access | | :--- | :--- | | `integrations:read` / `integrations:write` / `integrations:delete` | Native integrations | | `mcp_connectors:read` / `mcp_connectors:write` / `mcp_connectors:delete` | External MCP connectors | | `webhooks:read` / `webhooks:write` / `webhooks:delete` | Webhooks | ### Profile & workspace | Scope | Access | | :--- | :--- | | `users:read` | User search | | `profile:read` / `profile:write` / `profile:delete` | Profile | | `workspaces:read` / `workspaces:write` / `workspaces:delete` | Workspaces | | `workspace_members:read` / `workspace_members:write` / `workspace_members:delete` | Members | | `api_tokens:read` / `api_tokens:write` / `api_tokens:delete` | Manage tokens | Fetch the live list: ```bash curl "https:///api/v1/api-tokens/scopes" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## Revoke ```bash curl -X POST "https:///api/v1/api-tokens//revoke" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## Errors | Status | Meaning | | :--- | :--- | | `401` | Missing or invalid token | | `403` | Token lacks required scope | | `422` | Invalid body (e.g. unknown scope string) | For browser OAuth into MCP clients (Claude.ai, ChatGPT), see [MCP OAuth](/docs/authentication/mcp-oauth/). --- ## MCP OAuth 2.1 URL: http://localhost:3000/docs/authentication/mcp-oauth/ Summary: OAuth 2.1 with Dynamic Client Registration and PKCE S256 for Weave MCP clients. # MCP OAuth 2.1 & PKCE Web and desktop MCP clients (Claude.ai, ChatGPT, and others) can connect without pasting a personal token by using Weave as an OAuth 2.1 authorization server. ## Endpoints Authorization server base: `https:///api/v1/mcp-oauth` | Method | Path | Purpose | | :--- | :--- | :--- | | `POST` | `/register` | Dynamic Client Registration (DCR) | | `GET` | `/authorize` | Authorization (PKCE S256) | | `POST` | `/token` | Token exchange / refresh | | `GET` | `/consent/context` | Consent UI context | | `GET` | `/consent/tools-preview` | Tools preview for consent | | `POST` | `/consent` | Approve / deny consent | | `GET` | `/grants` | List grants | | `DELETE` | `/grants/:grantId` | Revoke grant | ## Discovery (well-known) Served from the API origin: | Path | | :--- | | `/.well-known/oauth-authorization-server` | | `/.well-known/openid-configuration` | | `/.well-known/oauth-protected-resource` | | `/.well-known/oauth-protected-resource/v1/mcp` | Metadata advertises: - `registration_endpoint` → `…/api/v1/mcp-oauth/register` - `authorization_endpoint` → `…/api/v1/mcp-oauth/authorize` - `token_endpoint` → `…/api/v1/mcp-oauth/token` - PKCE method: `S256` - Grants: `authorization_code`, `refresh_token` - Protected resource: `https:///v1/mcp` ## Register a client (DCR) ```bash curl -X POST "https:///api/v1/mcp-oauth/register" \ -H "Content-Type: application/json" \ -d '{ "client_name": "My MCP Client", "redirect_uris": ["https://client.example/callback"], "token_endpoint_auth_method": "none", "grant_types": ["authorization_code", "refresh_token"], "response_types": ["code"], "code_challenge_method": "S256" }' ``` **Example response:** ```json { "client_id": "mcp_client_...", "client_name": "My MCP Client", "redirect_uris": ["https://client.example/callback"], "token_endpoint_auth_method": "none", "grant_types": ["authorization_code", "refresh_token"], "response_types": ["code"] } ``` ## Authorization code + PKCE 1. Generate `code_verifier` and `code_challenge` (S256). 2. Redirect the user to: ```text https:///api/v1/mcp-oauth/authorize ?response_type=code &client_id= &redirect_uri= &code_challenge= &code_challenge_method=S256 &scope=notes:read%20projects:read &state= &resource=https:///v1/mcp ``` 3. After consent, exchange the code: ```bash curl -X POST "https:///api/v1/mcp-oauth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=authorization_code" \ -d "code=" \ -d "redirect_uri=" \ -d "client_id=" \ -d "code_verifier=" \ -d "resource=https:///v1/mcp" ``` **Token response (shape):** ```json { "access_token": "wmo_...", "refresh_token": "wmr_...", "token_type": "Bearer", "expires_in": 3600, "scope": "notes:read projects:read" } ``` ## Call MCP with the access token ```bash curl -X POST "https:///v1/mcp" \ -H "Authorization: Bearer wmo_..." \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' ``` ## Personal tokens vs OAuth | Mode | When to use | | :--- | :--- | | Bearer `wn_…` | Scripts, CI, Cursor/VS Code config files | | OAuth `wmo_…` | Hosted clients with 1-click connect (Claude.ai, ChatGPT) | See [Connecting MCP clients](/docs/mcp/connecting-clients/) for per-client setup. --- ## Introduction URL: http://localhost:3000/docs/ Summary: Developer documentation for Weave Public API, MCP, integrations, and personal access tokens. # Weave Developer Documentation Weave exposes programmatic surfaces so you can automate workspaces, connect AI clients, and wire external tools — without using the product UI. ## What you can build with | Surface | Base URL | Auth | | :--- | :--- | :--- | | **Public REST API** | `https:///api/public/v1` | Personal token `wn_…` | | **Workspace MCP** | `https:///v1/mcp` | Bearer `wn_…` or OAuth 2.1 | | **Native integrations** | `https:///api/v1/integrations` | Session or `wn_…` with scopes | | **External MCP connectors** | `https:///api/v1/mcp-connectors` | Session or `wn_…` | | **Public Docs MCP** | `https:///api/docs/mcp` | None (read-only docs) | Replace `` and `` with your deployment hosts. ## Start here 1. [Personal setup](/docs/personal-setup/) — create a token, set `X-Workspace-Id`, call `GET /me`. 2. [API tokens](/docs/authentication/api-tokens/) — scopes and rotation. 3. [REST conventions](/docs/api-reference/conventions/) — envelopes, errors, pagination. 4. [Connect MCP clients](/docs/mcp/connecting-clients/) — Claude, Cursor, VS Code, and more. 5. [Integrations overview](/docs/integrations/overview/) — native providers vs external MCP. ## Machine-readable docs - [`/llms.txt`](/llms.txt) — compact index for agents - [`/llms-full.txt`](/llms-full.txt) — full Markdown corpus - [Public Docs MCP](/docs/mcp/public-docs-server/) — search and read these guides from an IDE Use the **Use with LLM** button in the docs toolbar to open or copy context into your assistant. --- ## External MCP Connectors URL: http://localhost:3000/docs/integrations/external-mcp/ Summary: Connect remote MCP servers from the catalog or a custom SSE URL for use by Weave agents. # External MCP Connectors Base: `https:///api/v1/mcp-connectors` Scopes: `mcp_connectors:read` | `write` | `delete`. Remote tools are adapted into agent tool names as `ext_{slug}_*`. ## Catalog presets ```bash curl "https:///api/v1/mcp-connectors/catalog" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` Presets are code-backed (examples): Context7, GitHub, GitLab, Linear, Notion, Atlassian, Figma, Asana, ClickUp, monday.com, HubSpot, Intercom, Supabase, Neon, Prisma, Vercel, PostHog, Cloudflare Docs, DeepWiki, Exa, and more. MCP tools for the same catalog: `list_mcp_connector_catalog`, `get_mcp_connector_catalog`. ## List connections ```bash curl "https:///api/v1/mcp-connectors" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## Create from preset ```bash curl -X POST "https:///api/v1/mcp-connectors" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "catalog_slug": "mcp_github", "name": "GitHub MCP", "auth_mode": "oauth", "is_enabled": true }' ``` ## Create custom SSE URL ```bash curl -X POST "https:///api/v1/mcp-connectors" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "sse_url": "https://mcp.example.com/sse", "name": "Custom MCP", "slug": "custom_mcp", "auth_mode": "bearer", "bearer_token": "secret", "is_enabled": true }' ``` | Field | Type | Required | Notes | | :--- | :--- | :--- | :--- | | `catalog_slug` | string | one of | Preset id | | `sse_url` | url | one of | Custom remote MCP | | `name` / `slug` / `description` | string | no | | | `auth_mode` | enum | no | `none` \| `oauth` \| `api_key` \| `bearer` \| `headers` | | `api_key` / `bearer_token` | string | no | | | `config` / `secret_ref` | object | no | | | `is_enabled` | boolean | no | | Provide **either** `catalog_slug` **or** `sse_url` (or `config.sse_url`). ## Connect, sync, OAuth ```bash curl -X POST "https:///api/v1/mcp-connectors//connect" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " curl -X POST "https:///api/v1/mcp-connectors//sync" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " curl -X POST "https:///api/v1/mcp-connectors//oauth/start" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## Update / delete ```bash curl -X PATCH "https:///api/v1/mcp-connectors/" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "is_enabled": false }' curl -X DELETE "https:///api/v1/mcp-connectors/" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## Agent allowlists When creating agents via Public API or MCP, restrict remote tools with `mcp_connector_ids` and `mcp_allowed_tools` (include `ext_*` names after sync). See [Agent House API](/docs/api-reference/agent-house/). --- ## Native Integrations URL: http://localhost:3000/docs/integrations/native-integrations/ Summary: Catalog, connect, OAuth, and invoke actions on Weave HTTP integrations. # Native Integrations Base: `https:///api/v1/integrations` Authenticate with a session or personal token that includes `integrations:*` scopes. Prefer `X-Workspace-Id` for workspace context. ## Catalog ```bash curl "https:///api/v1/integrations/catalog" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` Returns provider manifests (slug, auth type, available actions, setup tips). ## List connections ```bash curl "https:///api/v1/integrations" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## Create connection ```bash curl -X POST "https:///api/v1/integrations" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "slug": "google_calendar", "name": "Work calendar", "is_enabled": true, "config": {} }' ``` | Field | Type | Required | Notes | | :--- | :--- | :--- | :--- | | `slug` or `catalog_slug` | string | **yes** | Provider id | | `name` | string | no | Display name | | `api_key` / `bearer_token` | string | no | For key-based providers | | `username` / `password` | string | no | Basic auth providers | | `config` | object | no | Provider-specific | | `is_enabled` | boolean | no | | ## Connect / disconnect ```bash curl -X POST "https:///api/v1/integrations//connect" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "api_key": "..." }' curl -X POST "https:///api/v1/integrations//disconnect" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## OAuth start ```bash curl -X POST "https:///api/v1/integrations//oauth/start" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` Browser callback (no JWT): `GET /api/v1/integrations/oauth/callback`. ## Invoke an action ```bash curl -X POST "https:///api/v1/integrations/google_calendar/actions/list_events" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "input": { "timeMin": "2026-11-01T00:00:00Z", "timeMax": "2026-11-30T23:59:59Z" } }' ``` **Success shape:** ```json { "success": true, "data": { "result": {} } } ``` Action ids and `input` schemas are provider-specific — discover them from `GET /catalog` and the provider’s action definitions. ## Delete ```bash curl -X DELETE "https:///api/v1/integrations/" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` --- ## Integrations Overview URL: http://localhost:3000/docs/integrations/overview/ Summary: Native HTTP providers versus external MCP connectors — when to use each. # Integrations Overview Weave has two complementary ways to connect external systems to agents and automations. ## Native integrations First-party HTTP providers (OAuth or API key) managed under: ```text https:///api/v1/integrations ``` Examples: Google Calendar and other providers in the integrations catalog. Actions run as: ```http POST /api/v1/integrations/:slug/actions/:actionId ``` → [Native integrations](/docs/integrations/native-integrations/) ## External MCP connectors Third-party **remote MCP servers** registered as connectors: ```text https:///api/v1/mcp-connectors ``` Presets include GitHub, Linear, Notion, Supabase, Vercel, and many more. Tools appear to agents as `ext_{slug}_*`. → [External MCP](/docs/integrations/external-mcp/) ## Webhooks & agent triggers Inbound HTTPS events (GitHub, custom HMAC, Slack) that wake agents: → [Webhooks & automations](/docs/integrations/webhooks-automations/) ## Decision guide | Need | Use | | :--- | :--- | | Structured Weave actions for a known SaaS | Native integration | | Bring an arbitrary MCP server into agents | External MCP connector | | Push events into Weave from GitHub / custom systems | Webhooks | | IDE / Claude talking *to* Weave data | [Workspace MCP](/docs/mcp/overview/) | ## Required scopes | Surface | Scopes | | :--- | :--- | | Native integrations | `integrations:read` / `write` / `delete` | | MCP connectors | `mcp_connectors:read` / `write` / `delete` | | Webhooks | `webhooks:read` / `write` / `delete` | --- ## Webhooks & Automations URL: http://localhost:3000/docs/integrations/webhooks-automations/ Summary: Inbound GitHub and HMAC agent triggers — payloads and connection endpoints. # Webhooks & Automations Agents can run when external systems POST events into Weave. Manage trigger definitions on agents; inbound delivery URLs are signature-verified. ## Agent trigger APIs Under Public API Agent House (requires agent scopes): | Method | Path | Purpose | | :--- | :--- | :--- | | `GET` / `POST` | `/api/public/v1/agent-house/agents/:agentId/triggers` | List / create triggers | | `POST` | `/api/public/v1/agent-house/agents/:agentId/triggers/:id/run` | Manual run | | `GET` | `.../triggers/:id/webhook/connection` | Inbound URL + secret metadata | | `POST` | `.../triggers/:id/webhook/rotate-secret` | Rotate HMAC secret | | `POST` | `.../triggers/:id/webhook/test` | Send a test delivery | | `GET` | `.../triggers/:id/webhook/deliveries` | Delivery log | ```bash curl -X POST "https:///api/public/v1/agent-house/agents/agt_01.../triggers" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " \ -H "Content-Type: application/json" \ -d '{ "name": "On GitHub PR", "type": "webhook", "enabled": true, "config": { "provider": "github" } }' ``` Exact `type` / `config` fields follow the agent trigger schema in the Agent House module — fetch connection details after create: ```bash curl "https:///api/public/v1/agent-house/agents/agt_01.../triggers/trg_01.../webhook/connection" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` **Connection response (shape):** ```json { "success": true, "data": { "url": "https:///api/v1/webhooks/...", "secret": "whsec_...", "headers": { "X-Weave-Signature": "sha256=..." } } } ``` ## GitHub inbound GitHub agent-trigger intake (server webhook module): ```text POST https:///api/v1/webhooks/github/agent-triggers ``` Configure the repository webhook to that URL with the secret from `webhook/connection`. Weave verifies the GitHub signature header before enqueueing the agent run. ## Custom HMAC inbound Point your system at the URL from `webhook/connection`. Sign the raw body with the shared secret (HMAC-SHA256) and send the digest in the documented signature header. Example signing sketch: ```bash BODY='{"event":"deploy.finished","service":"web"}' SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" | awk '{print $2}') curl -X POST "$WEBHOOK_URL" \ -H "Content-Type: application/json" \ -H "X-Weave-Signature: sha256=$SIG" \ -d "$BODY" ``` ## MCP webhooks tools Workspace MCP also exposes: - `list_webhooks` / `get_webhook` / `create_webhook` / `update_webhook` Use these when automating webhook registration from an IDE client. ## Related - [Agent House API](/docs/api-reference/agent-house/) - [External MCP](/docs/integrations/external-mcp/) for pulling SaaS tools into agents instead of push webhooks --- ## Connecting MCP Clients URL: http://localhost:3000/docs/mcp/connecting-clients/ Summary: Configure Claude, Cursor, VS Code, ChatGPT, Gemini CLI, Codex, Windsurf, and Zed for Weave MCP. # Connecting MCP Clients Replace placeholders: - `` — MCP origin (workspace tools) - `` — app / API origin (OAuth discovery) - `wn_YOUR_TOKEN` — personal API token ## Claude.ai (OAuth) 1. Settings → Connectors → Add custom connector. 2. URL: `https:///v1/mcp` 3. Complete OAuth 2.1 (DCR + PKCE). Discovery uses `/.well-known/oauth-protected-resource/v1/mcp`. See [MCP OAuth](/docs/authentication/mcp-oauth/). ## Claude Code (CLI) ```bash claude mcp add --transport http weave https:///v1/mcp \ --header "Authorization: Bearer wn_YOUR_TOKEN" ``` ## Cursor & Claude Desktop (`mcp-remote`) File: `.cursor/mcp.json` or `claude_desktop_config.json` ```json { "mcpServers": { "weave": { "command": "npx", "args": [ "-y", "mcp-remote", "https:///v1/mcp", "--header", "Authorization: Bearer wn_YOUR_TOKEN" ] } } } ``` ## ChatGPT (OAuth) Add a custom MCP / connector pointing at `https:///v1/mcp` and complete the hosted OAuth flow. ## VS Code File: `.vscode/mcp.json` ```json { "servers": { "weave": { "type": "http", "url": "https:///v1/mcp", "headers": { "Authorization": "Bearer wn_YOUR_TOKEN" } } } } ``` ## Gemini CLI File: `~/.gemini/settings.json` ```json { "mcpServers": { "weave": { "httpUrl": "https:///v1/mcp", "headers": { "Authorization": "Bearer wn_YOUR_TOKEN" } } } } ``` ## Codex CLI File: `config.toml` ```toml [mcp_servers.weave] url = "https:///v1/mcp" bearer_token_env_var = "WEAVE_API_TOKEN" ``` ```bash export WEAVE_API_TOKEN=wn_YOUR_TOKEN ``` ## Windsurf Same `mcp-remote` JSON as Cursor (`mcp_config.json`). ## Zed ```json { "context_servers": { "weave": { "command": { "path": "npx", "args": [ "-y", "mcp-remote", "https:///v1/mcp", "--header", "Authorization: Bearer wn_YOUR_TOKEN" ] } } } } ``` ## MCP Inspector ```bash npx -y @modelcontextprotocol/inspector npx -y mcp-remote \ https:///v1/mcp \ --header "Authorization: Bearer wn_YOUR_TOKEN" ``` ## Docs-only MCP (no token) For reading these documentation pages only: ```json { "mcpServers": { "weave-docs": { "command": "npx", "args": ["-y", "mcp-remote", "https:///api/docs/mcp"] } } } ``` Details: [Public docs server](/docs/mcp/public-docs-server/). --- ## MCP Overview URL: http://localhost:3000/docs/mcp/overview/ Summary: Weave workspace MCP over Streamable HTTP with Bearer tokens or OAuth 2.1. # Workspace MCP Overview Weave exposes a native **Model Context Protocol** server so external assistants can read and mutate workspace data through tools. ## Endpoint ```text https:///v1/mcp ``` Transport: **Streamable HTTP** (JSON-RPC 2.0). Clients should send: ```http Content-Type: application/json Accept: application/json, text/event-stream Authorization: Bearer ``` ## Auth modes | Mode | Token | Typical clients | | :--- | :--- | :--- | | Personal Bearer | `wn_…` | Cursor, VS Code, Claude Code, Zed, Windsurf | | OAuth 2.1 | `wmo_…` access token | Claude.ai, ChatGPT | OAuth discovery and consent: [MCP OAuth](/docs/authentication/mcp-oauth/). ## Minimal tools/list call ```bash curl -X POST "https:///v1/mcp" \ -H "Authorization: Bearer wn_live_..." \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {} }' ``` ## Call a tool ```bash curl -X POST "https:///v1/mcp" \ -H "Authorization: Bearer wn_live_..." \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "list_notes", "arguments": { "limit": 10, "search": "sprint" } } }' ``` Tool availability is gated by the token’s scopes (same catalog as [API tokens](/docs/authentication/api-tokens/)). ## Soft deletes Prefer `update_*` tools with `deleted: true` / `false` for soft-delete and restore. Some packs also expose explicit delete tools (e.g. `delete_notes`) — see the [tools catalog](/docs/mcp/tools-catalog/). ## Next - [Connecting clients](/docs/mcp/connecting-clients/) - [Tools catalog](/docs/mcp/tools-catalog/) - [Public docs MCP](/docs/mcp/public-docs-server/) (zero-auth, documentation only) --- ## Public Docs MCP URL: http://localhost:3000/docs/mcp/public-docs-server/ Summary: Zero-auth MCP server and llms.txt endpoints for reading Weave documentation. # Public Documentation MCP Server Read-only MCP for these docs. **No authentication.** ## Endpoint ```text https:///api/docs/mcp ``` ### Client config ```json { "mcpServers": { "weave-docs": { "command": "npx", "args": ["-y", "mcp-remote", "https:///api/docs/mcp"] } } } ``` Claude Code: ```bash claude mcp add weave-docs -- npx -y mcp-remote https:///api/docs/mcp ``` ## Tools Typical tools exposed by the docs MCP: | Tool | Purpose | | :--- | :--- | | `list_documentation_pages` | List guides | | `search_documentation` | Keyword search | | `get_documentation_page` | Fetch a page as clean Markdown | ## REST docs API ```bash # List / search curl "https:///api/docs/?q=mcp" # Single page curl "https:///api/docs/?slug=mcp/overview" ``` ## llms.txt | URL | Content | | :--- | :--- | | `https:///llms.txt` | Compact index | | `https:///llms-full.txt` | Full concatenated Markdown | These endpoints resolve to the current request host (no hardcoded domain). ## Workspace MCP vs docs MCP | | Docs MCP | Workspace MCP | | :--- | :--- | :--- | | URL | `/api/docs/mcp` | `https:///v1/mcp` | | Auth | None | Bearer `wn_` or OAuth | | Data | Documentation only | Notes, projects, agents, … | For workspace tools see [MCP overview](/docs/mcp/overview/). --- ## Tools Catalog URL: http://localhost:3000/docs/mcp/tools-catalog/ Summary: Inventory of native Weave MCP tools by pack, synced to mcp/src/tools packs. # Native Workspace Tools Catalog Tools are registered from `mcp/src/tools` packs. Availability depends on the caller’s scopes. Soft-delete is usually `update_*` with `deleted: true`; some packs also expose delete tools. Call pattern: ```json { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "list_notes", "arguments": { "limit": 10 } } } ``` ## Notes | Tool | Purpose | | :--- | :--- | | `list_notes` | List / search notes | | `get_note` | Fetch note metadata | | `get_note_content` | Fetch markdown/body | | `create_note` | Create note | | `update_note` | Update metadata (incl. soft-delete) | | `update_note_content` | Replace/update body | | `delete_notes` | Delete notes | | `export_note` | Export note | | `upload_note_file` / `delete_note_file` | Attachments | | `list_note_comments` / `update_note_comment` | Comments | | `update_note_collaborators` | Collaborators | ## Projects | Tool | Purpose | | :--- | :--- | | `list_projects` / `get_project` / `get_project_stats` | Read projects | | `create_project` / `update_project` | Write projects | | `list_project_stages` / `create_project_stage` / `update_project_stage` | Stages | | `list_project_tasks` / `get_project_task` / `create_project_task` / `update_project_task` / `bulk_update_project_tasks` | Tasks | | `list_project_collaborators` / `update_project_collaborators` | Collaborators | | `list_tags` / `create_tag` / `update_tag` | Tags | | `list_task_priorities` / `create_task_priority` / `update_task_priority` | Priorities | | `list_project_sprints` / `get_project_sprint` / `create_project_sprint` / `update_project_sprint` | Sprints | | `upload_project_file` / `get_project_file` / `update_project_file` | Files | | `list_project_reasonings` / `apply_reasoning_action_item` | Reasonings | ## Agent House & sandbox | Tool | Purpose | | :--- | :--- | | `list_agents` / `get_agent` / `create_agent` / `update_agent` / `publish_agent` | Agents | | `list_agent_versions` / `get_agent_version` / `publish_agent_version` / `restore_agent_version` | Versions | | `list_agent_runs` / `get_agent_run` | Runs | | `list_agent_triggers` / `create_agent_trigger` / `update_agent_trigger` / `run_agent_trigger` | Triggers | | `list_agent_skills` / `list_workspace_skills` / `create_workspace_skill` / `update_workspace_skill` / `invoke_agent_skill` | Skills | | `list_artifacts` / `get_artifact` / `create_artifact` / `update_artifact` / `export_artifact` / `save_artifact_as_note` / `get_file` | Artifacts | | `delegate_to_agent` | Delegation | | `list_agent_collaborators` / `update_agent_collaborators` | Collaborators | | `run_code` / `run_bash` / `sandbox_fs` / `sandbox_status` / `sandbox_start_server` / `sandbox_get_url` / `sandbox_list_processes` / `sandbox_stop_process` / `sandbox_release` | Sandbox | ## Chat | Tool | Purpose | | :--- | :--- | | `list_chat_sessions` / `get_chat_session` / `create_chat_session` / `update_chat_session` | Sessions | ## Calendar | Tool | Purpose | | :--- | :--- | | `get_calendar_status` / `list_calendar_events` / `create_calendar_event` / `update_calendar_event` | Calendar | ## MCP connectors | Tool | Purpose | | :--- | :--- | | `list_mcp_connector_catalog` / `get_mcp_connector_catalog` | Catalog presets | | `list_mcp_connections` / `get_mcp_connection` | Connections | | `create_mcp_connector` / `update_mcp_connector` | Manage connectors | ## LLM connections | Tool | Purpose | | :--- | :--- | | `list_llm_providers` / `list_llm_connections` / `list_llm_connection_models` / `update_llm_connection` | BYOK providers | ## Workspaces & members | Tool | Purpose | | :--- | :--- | | `list_workspaces` / `get_active_workspace` / `create_workspace` / `update_workspace` | Workspaces | | `list_workspace_members` / `create_workspace_member` / `delete_workspace_member` / `update_workspace_member_role` / `update_workspace_member_status` | Members | | `list_workspace_settings` / `update_workspace_setting` | Settings | ## Wiki | Tool | Purpose | | :--- | :--- | | `list_wiki_tree` / `get_wiki_page` / `create_wiki_page` / `update_wiki_page` / `delete_wiki_page` / `link_wiki_artifact` | Wiki | ## Webhooks, imports, exports, shares | Pack | Tools | | :--- | :--- | | Webhooks | `list_webhooks`, `get_webhook`, `create_webhook`, `update_webhook` | | Imports | `list_import_jobs`, `get_import_job`, `create_import_job`, `update_import_job` | | Exports | `list_export_data`, `get_export_data`, `get_export_summary`, `create_export_data` | | External shares | `list_external_shares`, `get_external_share`, `create_external_share`, `update_external_share` | ## API tokens, auth, tracing, plans, views | Pack | Tools | | :--- | :--- | | API tokens | `list_api_tokens`, `create_api_token`, `update_api_token` | | Auth / profile | `get_my_profile`, `update_my_profile`, `check_user_availability` | | Tracing | `list_traces`, `get_trace`, `get_tracing_settings`, `update_tracing_settings` | | Plans / quotas | `get_plan_usage_overview`, `list_resource_groups`, `get_resource_group`, `create_resource_group`, `update_resource_group`, `delete_resource_group`, `assign_resource_group_member`, `remove_resource_group_member`, `get_member_effective_policy`, `upsert_member_quota_override` | | Workspace views | `list_workspace_view_modules`, `get_workspace_view_module`, `create_workspace_view_module`, `update_workspace_view_module` | | User messages | `list_user_messages`, `get_user_message`, `create_user_message`, `update_user_message` | ## Example: create note ```json { "name": "create_note", "arguments": { "title": "From MCP", "markdown": "Created by an external assistant.", "tags": ["mcp"] } } ``` --- ## Use with LLM URL: http://localhost:3000/docs/open-in-ides-and-ai/ Summary: Open Weave docs in Cursor, VS Code, Claude, ChatGPT, and other assistants from the toolbar. # Use with LLM Every documentation page includes a **Use with LLM** button in the header toolbar. ## What it does - **IDEs** — Cursor, VS Code, Windsurf, Zed: copies a prompt with the canonical page URL and attempts a deep link. - **AI assistants** — Claude.ai / ChatGPT: opens a new chat with the page URL prefilled. - **Copy helpers** — Claude Code, Claude Desktop, Gemini CLI, Codex CLI: copies MCP config snippets for the **public docs** MCP. - **Agent context** — copy page Markdown, copy public MCP config, open `/llms.txt`, or copy an MCP Inspector command. ## Public Docs MCP (recommended for IDEs) ```json { "mcpServers": { "weave-docs": { "command": "npx", "args": ["-y", "mcp-remote", "https:///api/docs/mcp"] } } } ``` Full guide: [Public docs MCP](/docs/mcp/public-docs-server/). ## Workspace MCP To let assistants operate on your notes and projects (authenticated), see [Connecting MCP clients](/docs/mcp/connecting-clients/). ## Machine-readable indexes | URL | Use | | :--- | :--- | | `/llms.txt` | Compact docs index | | `/llms-full.txt` | Full Markdown corpus | | `/api/docs/?slug=…` | Single-page clean Markdown JSON | --- ## Personal Setup URL: http://localhost:3000/docs/personal-setup/ Summary: Create a personal API token, select a workspace, and verify access with GET /me. # Personal Setup This guide gets you from zero to a verified Public API call. ## 1. Create a personal API token In the Weave app: **Settings → API Tokens → Create token**. Or via the authenticated app API (session cookie or existing token with `api_tokens:write`): ```bash curl -X POST "https:///api/v1/api-tokens/create-token" \ -H "Authorization: Bearer wn_YOUR_EXISTING_TOKEN" \ -H "Content-Type: application/json" \ -H "X-Workspace-Id: " \ -d '{ "name": "Local scripts", "scopes": [ "notes:read", "notes:write", "projects:read", "projects:write", "ai_chat:read", "ai_chat:write", "users:read" ] }' ``` **Response (token shown once):** ```json { "success": true, "data": { "id": "tok_01...", "name": "Local scripts", "token": "wn_live_...", "scopes": ["notes:read", "notes:write", "projects:read", "projects:write", "ai_chat:read", "ai_chat:write", "users:read"], "expiresAt": null } } ``` Store `data.token` securely. Weave only stores a hash — you cannot retrieve the plaintext later. See [API Tokens](/docs/authentication/api-tokens/) for the full scope catalog. ## 2. Workspace header Workspace-scoped Public API routes require: ```http X-Workspace-Id: ``` Use the workspace public ID from the app URL (`//…`) or from workspace list APIs. `GET /api/public/v1/me` does **not** require a workspace header. ## 3. Verify with `/me` ```bash curl "https:///api/public/v1/me" \ -H "Authorization: Bearer wn_live_..." ``` **Success:** ```json { "status": "OK", "message": "Successfully accessed Weave Notes Public API.", "user": { "id": "...", "email": "you@example.com" }, "apiToken": { "id": "tok_01...", "name": "Local scripts" } } ``` ## 4. First workspace call ```bash curl "https:///api/public/v1/notes?limit=5" \ -H "Authorization: Bearer wn_live_..." \ -H "X-Workspace-Id: " ``` ## Next steps - [REST conventions](/docs/api-reference/conventions/) - [Notes API](/docs/api-reference/notes/) - [Connect MCP clients](/docs/mcp/connecting-clients/) - [Use with LLM toolbar](/docs/open-in-ides-and-ai/) ---