Browse documentation DocumentationLet’s talk
Documentation / Build with Rokn

Connect over MCP

Connect an MCP-compatible client such as Claude to your Rokn workspace with OAuth, and use more than 150 tools that call the REST API.

Add the server URL

The MCP endpoint is your app origin followed by /api/mcp. You do not need to create a separate MCP-specific API key.

JSON
{
  "mcpServers": {
    "rokn": {
      "url": "https://app.rokn.dev/api/mcp"
    }
  }
}

Authorize a workspace

On connection, the client opens Rokn's consent screen. Choose the workspace and scopes the client may use. The resulting token is bound to that access. To set up a connection from the app instead, follow the guide Connect an AI agent.

OAuth discovery

Compatible clients discover the authorization and token endpoints at the issuer's root, not below the MCP path.

HTTP
GET /.well-known/oauth-authorization-server

Tools

The server offers more than 150 tools, which grow with the API: call the standard tools/list to see the current set. Every tool calls exactly one REST route, so the scope and member-permission checks are the ones of the REST API and each route's request and response are in the API reference. A tool that replaces a set is marked destructive. Each topic page names the tool for every route: clients, projects, billing and catalogue and sending documents.

What the 401 challenge asks for

A request to the MCP endpoint without a valid token is answered with a 401 whose challenge names the scopes to request: mcp:tools, offline_access (without it the provider issues no refresh token and the client must authorize again every hour) and the scope each tool's route checks. A client that requests the challenge's scope gets a token every tool accepts.

A token narrows a membership and never widens one, so asking for every tool scope gives a member no more than their role allows. An OAuth client also has a scope ceiling: if Rokn lowers it, tokens already issued above it are refused and the client authorizes again.

Rules the tools share

  • update_invoice (the whole lineItems list), set_task_labels (the whole label set), update_package (items) and set_project_links (the whole list of links) replace what was there: send everything you want to keep, because anything left out is removed. update_invoice edits drafts only.
  • add_timeline_entry records a note, call, meeting or email on a client's timeline and never sends anything. It is authored by the signed-in person.
  • Imported calendar events (synced from Google or Microsoft) cannot be changed: update_calendar_event and delete_calendar_event answer event_not_editable. create_calendar_event pushes only the title, time and place to the member's connected calendar; no attendee is invited.
  • Only a few records can be deleted, and services, packages, tags and custom-field definitions never can; the rules are stated once, in Projects API.
  • add_task_dependency is refused with dependency_self, dependency_cycle or dependency_chain_too_long when the dependency would be invalid.
  • send_invoice and send_quote queue the document and answer with a send; read it with get_invoice_send or get_quote_send.
  • start_document_upload and complete_document_upload upload a file in two steps and need an OAuth connection, which an MCP client has.