Connect BankSync to TypeScript SDK
Build a custom MCP client in TypeScript/JavaScript using the official MCP SDK with BankSync as the data source.
See the TypeScript SDK MCP docs for more detail.
Prerequisites
- A BankSync account with at least one connected bank
- An API key with all permission scopes (created from Workspace → Developers)
Install the SDK
Install the official Model Context Protocol SDK:
npm install @modelcontextprotocol/sdk
Connect to BankSync
Point the client at the BankSync MCP server, replacing the placeholder with your API key:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";const transport = new StreamableHTTPClientTransport(new URL("https://mcp.banksync.io"),{ requestInit: { headers: { "X-API-Key": "bsk_your_api_key_here" } } });const client = new Client({ name: "my-app", version: "1.0.0" });await client.connect(transport);
https://mcp.banksync.io over Streamable HTTP, authenticated with your X-API-Key.Verify your connection
Restart your client and try these prompts to confirm the connection works:
Troubleshooting
“No tools available” or the MCP server is not listed
- Make sure you restarted your AI client after editing the config file.
- Verify the JSON/YAML is valid (no trailing commas, correct brackets).
- Check the URL is exactly
https://mcp.banksync.io.
“Authentication failed” or “Invalid API key”
- Confirm the key starts with
bsk_and has not been revoked. - Ensure the key is passed in the
X-API-Keyheader. - Check for stray whitespace or newlines around the key value.
Connection timeout or the client lacks remote HTTP support
- The server uses Streamable HTTP. Allow outbound HTTPS to
mcp.banksync.io. - If your client only supports local servers, use the npm bridge:
npx -y @banksync/mcp.
Tools are listed but return errors
- Verify your API key has the required scopes — for full access, select all scopes when creating the key.
- Make sure you have at least one bank connected in the BankSync app.
- Check that you are passing the correct workspace ID when prompted.
Debugging with MCP Inspector
- Use the MCP Inspector to test the connection independently of your AI client.
- Run:
npx @modelcontextprotocol/inspector --url https://mcp.banksync.io--header "X-API-Key: bsk_your_key" - If the Inspector connects but your client does not, the issue is your client configuration.
Frequently asked questions
What is the official MCP TypeScript SDK?
The official MCP TypeScript SDK is the @modelcontextprotocol/sdk npm package. It provides Client and StreamableHTTPClientTransport classes for connecting to MCP servers like BankSync.
How do I authenticate with BankSync from a custom MCP client?
Pass your BankSync API key in the X-API-Key header via the requestInit.headers option when creating the StreamableHTTPClientTransport instance.
What transport does BankSync use?
BankSync uses Streamable HTTP transport (not SSE or stdio). Use StreamableHTTPClientTransport from @modelcontextprotocol/sdk/client/streamableHttp.js to connect.