SDKs and MCP
Use TypeScript or Python on your server, or connect an MCP client to Crossblade.
The SDKs and the local MCP server are shared as source packages during the beta. Email [email protected] for them. Hosted MCP needs no package, and cURL works today.
For an agent that acts for one person with delegated access, which is off by default, see Delegated access in the TypeScript and Python SDKs.
Step 1: TypeScript and Node
Use Node 20 or later, or Bun. Build the package from the source, then add it to your backend as a local dependency named @crossblade/sdk.
bun run build:sdk
import Crossblade from "@crossblade/sdk";
const client = new Crossblade({
apiKey: process.env.CROSSBLADE_SECRET_KEY,
baseURL: "https://crossblade.dev/v1",
});
for await (const customer of client.qbd.customers.list({
conductorEndUserId: process.env.CROSSBLADE_END_USER_ID!,
limit: 25,
})) {
console.log(customer.id, customer.fullName);
}
Await a list call for its first page, or use for await to visit all pages. Calls accept a timeout and AbortSignal. Use .withResponse() when you need HTTP metadata or a request ID. Every documented response field is present; a value QuickBooks did not return is null.
Step 2: Python
The Python client needs Python 3.11 or later and has no dependencies. Put the source on your path, or install the directory with your usual packaging tools.
export PYTHONPATH="packages/python-sdk"
import os
from crossblade import Crossblade
client = Crossblade(
api_key=os.environ["CROSSBLADE_SECRET_KEY"],
base_url="https://crossblade.dev/v1",
)
for customer in client.qbd.customers.list(
conductor_end_user_id=os.environ["CROSSBLADE_END_USER_ID"],
limit=25,
):
print(customer.get("id"), customer.get("fullName"))
Python inputs use snake_case; returned dictionaries preserve the API’s camelCase keys. AsyncCrossblade supports async calls and iteration using the standard library transport. Canceling an await cannot stop an accounting request that was already dispatched.
Step 3: Hosted MCP
Create a Read only key, then add this server to a client that supports Streamable HTTP with a bearer header. Keep the real key in your client’s secret store. Clients that only install servers through OAuth are not supported.
{
"mcpServers": {
"crossblade": {
"url": "https://crossblade.dev/mcp",
"headers": {
"Authorization": "Bearer YOUR_SERVER_KEY"
}
}
}
}
Start with search_docs and describe_operation, then read a company by its end-user ID. A read-only key cannot use write tools. With a read + write key, each write still needs a stable idempotency key.
Step 4: Local MCP
Run the source entry point with Bun from any MCP client that supports local servers. Replace the path with your copy of the source, and keep the key out of shared configuration.
{
"mcpServers": {
"crossblade": {
"command": "bun",
"args": [
"/absolute/path/to/crossblade/packages/mcp/src/cli.ts"
],
"env": {
"CROSSBLADE_SECRET_KEY": "YOUR_SERVER_KEY",
"CROSSBLADE_BASE_URL": "https://crossblade.dev/v1"
}
}
}
}
The server starts read-only. Follow the returned cursor when a read has more pages. Add --allow-writes only when that client may change the company file; write tools need stable idempotency keys.
To run it with Node 20 or later, build the bundle:
bun run build:mcp
node /absolute/path/to/crossblade/packages/mcp/dist/cli.js
Save an idempotency key before you send a write. When QuickBooks doesn’t confirm it, TypeScript returns a value that isPendingQuickBooksResult() recognises, and Python returns a PendingQuickBooksRequest. Its ID is a request ID, never an invoice or payment ID. MCP reports the same case with a request ID. Check the request and QuickBooks before any further write. See Errors and retries.