Sobmit Docs

Sobmit as an MCP server

Sobmit is not just an MCP client — it can be consumed as an MCP server. An external agent (Claude Desktop, Cursor, or any MCP 2026-07-28 client) can discover Sobmit as a protected resource, authenticate with OAuth 2.1, and then build, read and validate flows on your behalf.

Endpoint

The MCP server is served over a stateless JSON-RPC POST endpoint:

POST /api/mcp

It implements the MCP 2026-07-28 protocol (createMcpHandler from the official SDK v2), constructing a fresh server per request so tool definitions are always backed by the current authenticated user.

Discovery (RFC 9728)

An MCP client discovers the server through its protected-resource metadata, served at the well-known root:

GET /.well-known/oauth-protected-resource

This document is what the 401 WWW-Authenticate challenge points to via its resource_metadata field, so a standards-compliant client finds the authorization server and token endpoint without manual configuration.

Authentication — OAuth 2.1 authorization-code flow + PKCE

Access is granted with the standard OAuth 2.1 authorization-code flow with PKCE (RFC 7636). The flow:

  1. Authorization request — the client redirects the user to /oauth2/authorize with client_id, scope, redirect_uri and the PKCE code_challenge.
  2. Consent — if the user has not already consented, Sobmit shows a consent screen at /consent naming the requesting client and the scopes it asks for. The user approves or denies.
  3. Authorization code — on approval, the browser is redirected back to the client’s redirect_uri with a one-time code.
  4. Token exchange — the client exchanges the code (plus its PKCE code_verifier) for an access token at the token endpoint.
  5. Access — the client calls POST /api/mcp with the bearer access token. requireMcpAuth verifies the token (issuer, audience, expiry) against the authorization server’s JWKS and maps it to the authenticated user.

The signing key is published at:

GET /jwks

Access tokens are audience-bound to the /api/mcp resource and scoped to the specific user who consented — a client can only act on that user’s flows.

Available tools

The server exposes these tools, all scoped to the authenticated user:

ToolPurpose
list_node_kindsEvery addable node kind and its default data shape
list_flowsThe user’s flows (id, name, updated)
get_flowA flow’s full project graph by id
create_flowCreate a new flow from a name
add_nodeAdd a node to a flow
update_nodeUpdate a node’s data in a flow
remove_nodeRemove a node from a flow
add_edgeConnect two nodes
remove_edgeDisconnect two nodes
validate_flowValidate a flow and return any problems

Each tool re-uses the same permission checks, header-sanitization and version snapshotting as the web app, so an agent gets exactly the behaviour (and the same safety) as a signed-in user in the browser.

Example — connect Claude Desktop

Add Sobmit as a remote MCP server in Claude Desktop, authenticating with OAuth. After consent, Claude can list your flows and build new ones:

"sobm.it" is an MCP server over OAuth — ask it to list_node_kinds first,
then create_flow + add_node to sketch a new automation.

Related

  • MCP servers — the reverse direction: calling external MCP tools from a Sobmit flow.
  • Core concepts — flows, nodes and edges.