Connect an AI assistant
- Sign in to Sure and open Settings > MCP Server.
- Copy the MCP server URL shown on the page. Sure builds this URL from your configured base URL and appends
/mcp. - Open Claude.ai and go to Settings > Connectors.
- Select Add a connector.
- Enter the connector name and paste the MCP server URL from Sure Settings > MCP Server, then select Add.
- Select the connector’s Connect button to complete authorization. Your browser redirects to Sure. Sign in if needed, then authorize access.
Manage connected clients
The Connected clients section under Settings > MCP Server lists clients with active access to your account. Select Revoke beside a client to invalidate its token. Revoke clients you no longer use or recognize.Available tools and access
The currentAssistant.function_classes registry exposes the following tools. Tool availability and schemas can vary by Sure version, so clients should use tools/list as the source of truth for their installation.
Read
Rules
New rules are saved inactive; renaming an existing active rule can leave it active.
apply_rule is the only tool that activates a rule and applies it to existing transactions. A preview_token from an actual preview is required; it expires after 30 minutes and is invalidated if the rule definition or match count changes since the preview was issued. AI-backed actions (auto_categorize, auto_detect_merchants) are not available through MCP — edit those rules in Settings > Rules.
Create, update, and import
create_transaction and delete_transaction write to the ledger. delete_transaction is permanent and irreversible. import_bank_statement is not read-only. It requires a bank-statement PDF already uploaded to Sure and creates an import for review; it does not publish the import automatically. Because MCP access is scoped to the Sure user who authorizes the client, tools can access that user’s family data. Review tool calls whenever your client offers that option.
apply_rule activates a rule and runs it against matching transactions, respecting rule order and attribute locks by default. Deactivating the rule does not undo earlier changes.
Preview tools
These tools appear only when the MCP user has opted into preview features under Settings > Preferences. Until then they are absent fromtools/list, and calling one by name returns an “Unknown tool” error. The Statement Vault tools also require the user to be an admin or member, matching the permissions enforced in the web UI.
These tools are designed for agents that maintain a document-backed record of a family’s wealth over time.
Technical details
Sure serves MCP over JSON-RPC 2.0 at the URL displayed in Settings > MCP Server. The endpoint supportsinitialize, tools/list, and tools/call over HTTP POST requests. MCP-compatible clients use this URL and handle browser-based sign-in and authorization with Sure.
Sure authenticates each MCP request with an active OAuth access token that has the read_write scope. The token’s resource owner determines the Sure user and family available to the tools. Sure creates a fresh transient session for that user for the request so an existing browser or impersonation session is not reused.
Dynamic client registration redirect URIs
Sure registers MCP clients dynamically viaPOST /register. The redirect_uris field must contain at least one URI that matches one of the following schemes:
https— any HTTPS URI with a host (e.g.https://claude.ai/callback)- Loopback HTTP —
http://localhost,http://127.0.0.1, orhttp://[::1](any port) - Native-app private-use scheme — custom URI schemes used by desktop and mobile OAuth clients, such as
cursor://anysphere.cursor-mcp/oauth/callback,vscode://augment.vscode-augment/auth/mcp, or reverse-domain schemes likecom.example.app:/oauth2redirect/example-provider
cursor:// scheme, a loopback HTTP URI, and an https URI in the same list). Sure validates every URI in the list; if any URI fails validation the entire registration is rejected.
The following URI schemes are always rejected: javascript, data, file, about, blob, ws, wss, ftp, mailto, tel, sms, and intent. Plain HTTP to a non-loopback host is also rejected. URIs with a userinfo component or a fragment are rejected regardless of scheme.
Dynamic client registration client names
Theclient_name field in a POST /register request is optional; Sure defaults to "MCP Client" when it is absent. Two additional restrictions apply:
- Reserved names — Names that contain the word “Sure” as a whole word, or that start with “SureMobile”, are reserved for first-party apps and are rejected with
invalid_client_metadata. The check is case-insensitive, strips punctuation, invisible characters, and combining marks, and maps look-alike Cyrillic, Greek, and Armenian letters to their Latin equivalents before matching. Names such as “Measure Mobile” or “Surefire” are not affected. - Bidirectional control characters — Names that contain any Unicode bidirectional control character (for example U+202E RIGHT-TO-LEFT OVERRIDE) are rejected with
invalid_client_metadata. These characters can make the consent screen render a different name than the one stored, so Sure rejects them instead of silently stripping them.
error: "invalid_client_metadata".
Protocol version and transport
Sure supports protocol versions2025-03-26 and 2025-06-18. The current default is 2025-06-18, which introduces the Streamable HTTP transport used by clients such as Bifrost v1.6.3 and later.
During the initialize handshake, the client sends its preferred version in params.protocolVersion. Sure selects that version if it is supported, or falls back to 2025-06-18 otherwise. The agreed version is returned in the initialize response body and echoed in the Mcp-Protocol-Version response header on every subsequent response.
The initialize response also includes a sessionId field. Sure records the session in a server-side cache for 24 hours. Subsequent requests may include this value in the Mcp-Session-Id request header; Sure validates the session and echoes the ID in the corresponding response header. Clients that do not send a session ID are still served normally.
Legacy environment-token fallback
Self-hosted deployments can optionally support older clients that cannot complete the browser authorization flow. Set bothMCP_API_TOKEN to a high-entropy secret and MCP_USER_EMAIL to an existing Sure user’s email. The client sends the configured token as a bearer token, and the selected user’s family data is exposed to the available MCP tools.
This is a compatibility fallback: Sure tries OAuth access-token authentication first. Prefer the connection flow in Settings > MCP Server, and protect, rotate, and avoid logging any fallback token.
Optional Pipelock proxy
Pipelock is an optional security proxy that can scan MCP tool calls and responses for secret exfiltration, prompt injection, and tool poisoning before forwarding traffic to Sure. Sure’s AI Docker Compose example exposes Pipelock’s MCP listener on port8889 and forwards it to Sure’s internal /mcp endpoint. The Helm chart can similarly expose a Pipelock MCP ingress. Operators who deploy it should provide users with the proxied MCP address. Pipelock adds scanning; it does not replace Sure’s browser sign-in and authorization or require users to configure OAuth manually.
Operators can see the Pipelock section in the Helm guide for deployment and policy options. Use TLS, restrict direct access to /mcp when practical, and ensure clients use the proxied URL so they cannot bypass scanning.