Assistant setup
Give your assistant read access.
Connect a client that supports Streamable HTTP MCP and a custom Authorization header.
Connect in three steps
- Sign in on the Account page with your wallet or phone QR.
- Under “Assistant read access”, choose the exact tools, review the request and approve. The token is shown once.
- Configure the endpoint below and the header
Authorization: Bearer YOUR_APPROVED_TOKENin your client’s secure credential settings.
A token grants only its selected tools for one hour. Revoking the grant or its approving sign-in session stops access. Refreshing the grant list does not extend it.
Access permits selected reads and unsaved drafts only. It cannot publish a Flow, save personal rules, trade, sign, schedule activity or prepare transactions.
Automatic OAuth sign-in is not implemented. A client that requires OAuth and cannot set a custom Bearer header cannot use this connection method.
Check with the official SDK
This example uses @modelcontextprotocol/sdk version 1.32.1. Set your token in the client process’s protected environment as FIRSTBELL_MCP_TOKEN. Keep credentials out of chats, URLs and source files.
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const token = process.env.FIRSTBELL_MCP_TOKEN;
if (!token) throw new Error("Configure your approved read token securely.");
const client = new Client({ name: "My KeepFlow assistant", version: "1" });
const transport = new StreamableHTTPClientTransport(new URL("https://keepflow.site/api/mcp"), {
requestInit: { headers: { Authorization: "Bearer " + token } }
});
try {
await client.connect(transport);
console.log((await client.listTools()).tools.map(tool => tool.name));
// Select get_bell during approval to enable this example.
console.log(await client.callTool({ name: "get_bell", arguments: { id: "ai-compute" } }));
} finally {
await client.close();
}Available read and unsaved draft scopes
search_stockget_stockget_stock_researchget_stock_underlyingget_bellget_bell_versionscompare_bell_versionsget_portfolioget_portfolio_driftget_receiptexplain_decisionpreview_next_contributionpreview_rebalanceget_execution_statuscreate_bell_from_promptmodify_bell_from_promptcreate_policy_from_prompt
Draft with an assistant
Explicitly select create_bell_from_prompt, modify_bell_from_prompt or create_policy_from_prompt when approving access. Draft tools return unsaved suggestions, never publication or trading permission. Review Flow suggestions in the Create page and personal rules in your portfolio before saving them separately.
If a request fails
- 401: the token or approving session has expired or been revoked. Sign in and explicitly approve a new grant.
- A tool is absent: it was not selected for that grant. Create a new grant with the required read scope.
- 429: the bounded request quota is busy. Wait before retrying reads.