How a client connects
- Give your MCP client (a desktop or web assistant, a coding agent in the terminal, or an IDE) only the URL https://wellfriend.dev/mcp. It finds the sign-in, registers itself and opens Wellfriend's consent page in your browser.
- Discovery: an unauthenticated request answers 401 with the protected-resource metadata at https://wellfriend.dev/.well-known/oauth-protected-resource/mcp, which names the authorization server. Its metadata is at https://wellfriend.dev/.well-known/oauth-authorization-server (issuer https://wellfriend.dev, authorization endpoint https://wellfriend.dev/oauth/authorize, token endpoint https://wellfriend.dev/oauth/token, registration endpoint https://wellfriend.dev/oauth/register).
- Registration: clients register with OAuth Dynamic Client Registration (RFC 7591) or identify themselves with a Client ID Metadata Document URL. Only public clients are accepted (no client secret). Redirect URIs must be https, a loopback http address (
127.0.0.1, [::1] or localhost, on any port) or an app scheme such as vscode:// or cursor://. A registration that is never used to sign in expires after 24 hours. - Consent: you choose the workspace and environment the client works in. The client gets only the scopes it asks for and your role in that workspace allows; new connections start with Full access within your role, and you can choose a narrower mode (see What each role can grant). For your own application, you can register a client with fixed redirect URIs in Developer API → MCP.
- Authorization: OAuth authorization code with PKCE (S256) is required, and clients never receive a Wellfriend API key. Send JSON-RPC requests with POST to https://wellfriend.dev/mcp with the access token as a Bearer token. The endpoint accepts POST only.
- Tokens: access tokens last 15 minutes. Refresh tokens rotate on every use and expire after 30 days without use; reusing an old refresh token revokes the whole connection. A connection ends 90 days after consent.
- Protocol versions:
2026-07-28(stateless, no initialize handshake) is preferred. Clients on2025-11-25,2025-06-18and2025-03-26connect with the initialize handshake. GET and DELETE on /mcp answer 405. - Revoke a connection in Developer API → MCP when you no longer need it, or revoke a token at https://wellfriend.dev/oauth/revoke (RFC 7009).
Resources and tools
| MCP method | Returns | What is checked |
|---|---|---|
| server/discover | Supported protocol versions (2026-07-28 first, then 2025-11-25, 2025-06-18 and 2025-03-26), capabilities and server information | Nothing account-specific is returned |
| resources/list | The documents you can see | Your current access to each document |
| resources/read | One document resource | Your current access to that document |
| tools/list | The tools this connection can use | The connection's scopes and your workspace role |
| tools/call | The result of one tool | Input schema, permissions, idempotency and usage; every call is recorded in the activity log |
Toolsets
Every v2 API feature your role allows is available as a tool, and every toolset is on by default. The connection's scopes and your workspace role decide which tools a client sees. Add ?toolsets=documents,processing to the URL to offer fewer toolsets, or ?readonly=1 to offer read-only tools only. Tools marked * ask you to confirm in your client before they run. Your client's tools/list shows exactly what one connection can use.
| Toolset | Tools | What they do |
|---|---|---|
| Documents | documents_search, document_get, document_versions, document_version_get, document_analytics_get, document_upload_url, document_import_from_url*, document_page_render, document_download_link, esign_levels, esign_envelope_create*, esign_envelope_get, esign_envelope_list, esign_envelope_cancel* | Search documents, read versions, upload or import files, and create download links. |
| Processing | tools_catalog, document_process, document_chain, document_chain_get, document_chain_cancel*, document_chain_resume, operation_outputs, operation_get | Run PDF and image tools on documents and follow their operations. |
| Sharing | secure_link_create*, secure_link_get, secure_link_revoke*, secure_link_list, secure_link_update*, secure_link_change_version*, secure_link_recipients_add*, secure_link_sessions_list, share_analytics, room_list, room_get, room_create, room_transition*, room_folder_create, room_document_add*, room_participant_add*, room_question_answer*, portal_list, portal_get, portal_create, portal_publish*, portal_room_add*, secure_link_recipients_list, secure_link_session_revoke*, secure_link_password_set*, room_folder_update, room_document_update, room_participant_update*, room_permission_set*, room_permission_revoke*, room_request_create, room_question_create, portal_update, portal_announcement_create*, portal_resource_add*, embed_session_get, embed_session_revoke* | Create, inspect and revoke secure links. |
| Workflows | workflow_list, workflow_get, workflow_validate, workflow_create, workflow_update, workflow_publish*, workflow_run, workflow_run_get, workflow_run_cancel*, workflow_run_replay, workflow_approval_decide* | Create, validate, publish, run, replay and cancel workflows, and decide approvals. |
| Resources | resource_list, resource_get, resource_create, resource_update, resource_transition* | Templates, forms, rooms, portals and other workspace resources. |
| Connectors | connector_list, connector_items, connector_operations_list, connector_test, connector_disconnect*, connector_generic_http_create*, connector_import, connector_export*, connector_send* | Browse, test and disconnect connected accounts, import and export files and send documents out. |
| Webhooks | webhook_event_types, webhook_endpoint_list, webhook_endpoint_get, webhook_endpoint_create*, webhook_endpoint_update*, webhook_endpoint_delete*, webhook_endpoint_test*, webhook_endpoint_rotate_secret*, webhook_endpoint_replay*, webhook_delivery_list, webhook_delivery_replay*, webhook_delivery_get, webhook_endpoint_insights | Event types, webhook endpoints and signing secrets, test events, deliveries and replay. |
| API keys | api_key_list, api_key_create*, api_key_rotate*, api_key_revoke* | List, create, rotate and revoke API keys; a new secret is shown once. |
| Developer | usage_get, logs_list, api_capabilities, api_quote | Usage and request units, request logs and the live API capabilities. |
Processing tools
document_processruns the 49 website tools plus Edit PDF and Render page; /docs/mcp/tools lists every MCP tool and every toolId.tools_cataloglists every Wellfriend PDF and image tool with the JSON Schema of its parameters, available: true for the toolsdocument_processcan run, and outputKind: version (the document's next version) or artifact (a new derived document).document_processchecks the parameters against that schema and returns an operation. Confirm completion withoperation_getor the task, then download outputDocumentId and outputVersionId withdocument_download_link.- AI mode options cannot be run through
document_process;tools_catalogleaves them out of the parameter schemas.
What each role can grant
Every new connection starts with Full access within what your role allows, so a connected agent can work across the whole account. Choose Read only or Read & write on the consent page to limit it, or change the connection later in Developer API → MCP.
A connection holds the scopes of the permission mode you chose, limited to what your role in the workspace allows. Your role is checked again on every call, so a role change applies at once.
| Role | Scopes a client can hold |
|---|---|
| Owner | documents.read, documents.write, documents.process, links.read, links.write, webhooks.read, webhooks.write, workflows.read, workflows.write, workflows.execute, workflows.approve, resources.read, resources.write, keys.read, keys.write, usage.read, logs.read, analytics.read, connectors.read, connectors.write |
| Admin | documents.read, documents.write, documents.process, links.read, links.write, webhooks.read, webhooks.write, workflows.read, workflows.write, workflows.execute, workflows.approve, resources.read, resources.write, keys.read, keys.write, usage.read, logs.read, analytics.read, connectors.read, connectors.write |
| Member | documents.read, documents.write, documents.process, links.read, links.write, webhooks.read, workflows.read, workflows.write, workflows.execute, resources.read, resources.write, usage.read, logs.read, analytics.read, connectors.read |
| Viewer | documents.read, links.read, webhooks.read, workflows.read, resources.read, analytics.read, connectors.read |
API keys, webhook secrets and approvals
- Owners and admins can list, create, rotate and revoke API keys, manage webhook endpoints and rotate their signing secrets, and decide workflow approvals through MCP. Members cannot read or change API keys, change webhook endpoints, decide approvals or change connectors; viewers can only read.
- A new API key or signing secret appears once, in the result of the call you confirmed. Store it straight away: repeating the call returns the key or endpoint without the secret, and Wellfriend never shows it again.
- A key created through MCP can only have scopes the MCP connection already holds.
- Tool arguments and results are not logged. The activity log records the tool, the outcome and a hash of the arguments.
Security
- Document content is treated as data. Text inside a document cannot grant a tool, change recipients, reach another workspace or change a policy.
- Every call checks the workspace, the user, the scopes and access to the target again.
- Tokens, authorization codes and document content are kept out of logs.
- Wildcard redirect URIs are never accepted. Never give an API key to an MCP client.
Limits
MCP tools that create schedules, webhook endpoints or replays have the same limits as the dashboard and the API, and URL imports have a size limit.
Schedule limits count active and paused schedules, not disabled ones. Endpoint limits do not count deleted endpoints. The same limits apply in the dashboard, the API, the SDKs and MCP.
| Limit | Value | When it is reached |
|---|---|---|
| Schedules per automation | 20 | WORKFLOW_SCHEDULE_LIMIT_REACHED |
| Schedules per workspace | 200 | WORKFLOW_SCHEDULE_LIMIT_REACHED |
| Webhook endpoints per workspace and environment (test or live) | 20 | WEBHOOK_ENDPOINT_LIMIT_REACHED |
| Replays of one endpoint's deliveries in any hour | 200 | WEBHOOK_REPLAY_LIMIT_REACHED |
| Deliveries in one bulk replay | 1,000 | Bulk replay stops at the limit |
| File size of one MCP URL import | 25 MB | The import is refused |