WDocs
WDocs
Open AppSign inGet Started

Getting Started

IntroductionPersonal SetupUse with LLM

Authentication

Personal API Tokens (wn_)MCP OAuth 2.1

Public REST API

Model Context Protocol (MCP)

Integrations

W© 2026 Weave
PrivacyTermsDataSupportllms.txtOpen App
Authentication

MCP OAuth 2.1

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://<APP_HOST>/api/v1/mcp-oauth

MethodPathPurpose
POST/registerDynamic Client Registration (DCR)
GET/authorizeAuthorization (PKCE S256)
POST/tokenToken exchange / refresh
GET/consent/contextConsent UI context
GET/consent/tools-previewTools preview for consent
POST/consentApprove / deny consent
GET/grantsList grants
DELETE/grants/:grantIdRevoke 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://<MCP_HOST>/v1/mcp

Register a client (DCR)

curl -X POST "https://<APP_HOST>/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:

{
  "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:
https://<APP_HOST>/api/v1/mcp-oauth/authorize
  ?response_type=code
  &client_id=<CLIENT_ID>
  &redirect_uri=<REDIRECT_URI>
  &code_challenge=<CHALLENGE>
  &code_challenge_method=S256
  &scope=notes:read%20projects:read
  &state=<STATE>
  &resource=https://<MCP_HOST>/v1/mcp
  1. After consent, exchange the code:
curl -X POST "https://<APP_HOST>/api/v1/mcp-oauth/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=authorization_code" \
  -d "code=<AUTH_CODE>" \
  -d "redirect_uri=<REDIRECT_URI>" \
  -d "client_id=<CLIENT_ID>" \
  -d "code_verifier=<VERIFIER>" \
  -d "resource=https://<MCP_HOST>/v1/mcp"

Token response (shape):

{
  "access_token": "wmo_...",
  "refresh_token": "wmr_...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "notes:read projects:read"
}

Call MCP with the access token

curl -X POST "https://<MCP_HOST>/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

ModeWhen 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 for per-client setup.

Personal API Tokens (wn_)

Create, scope, and revoke personal access tokens for the Public REST API and MCP Bearer auth.

REST Conventions

Public API base path, JSON envelopes, pagination, errors, rate limits, and required headers.

W© 2026 Weave. All rights reserved.
PrivacyTermsDataSupportllms.txtOpen App

On this page

MCP OAuth 2.1 & PKCEEndpointsDiscovery (well-known)Register a client (DCR)Authorization code + PKCECall MCP with the access tokenPersonal tokens vs OAuth