Connect BankSync with the Python SDK
Build your own MCP client using the official mcp Python package.
Prerequisites
- A BankSync account with at least one connected bank
- An API key with all permission scopes (created from Workspace menu → Developers)
Install the SDK
Terminal
pip install mcp
Connect to BankSync
Custom MCP Client
1import asyncio2from mcp import ClientSession3from mcp.client.streamable_http import streamablehttp_client45async def main():6 async with streamablehttp_client(7 "https://mcp.banksync.io",8 headers={"X-API-Key": "bsk_your_api_key_here"},9 ) as (read_stream, write_stream, _):10 async with ClientSession(read_stream, write_stream) as session:11 await session.initialize()1213 # List available tools14 tools = await session.list_tools()15 print(f"Connected! {len(tools.tools)} tools available")1617 # Call a tool18 result = await session.call_tool(19 "list-workspaces",20 arguments={},21 )22 print(result)2324asyncio.run(main())
Verify Your Connection
After configuring your client, restart it and try these prompts to verify the connection is working:
“List my workspaces”
“What banks do I have connected?”
“What’s my checking account balance?”
Troubleshooting
“No tools available” or MCP server not listed
- Make sure you restarted your AI client after editing the configuration file.
- Verify the JSON is valid (no trailing commas, correct brackets).
- Check that 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 in the
headersobject underX-API-Key. - Check for accidental whitespace or newlines around the key value.
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.
Connection timeout or network errors
- The MCP server uses Streamable HTTP transport. Ensure your network or proxy allows outbound HTTPS connections.
- If using a VPN or firewall, allow connections to
mcp.banksync.io. - Try the connection from a different network to rule out local issues.
