← all repositories
matiasbattocchia/open-bsp-api

Postgres as your WhatsApp and Instagram inbox, open-source

OpenBSP API is an open-source, self-hostable layer over Meta’s messaging APIs that treats Postgres tables as the entire messaging surface.

506 stars TypeScript AgentsChat Assistants
open-bsp-api
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does OpenBSP API connects to the official WhatsApp and Instagram Business APIs and stores every message in a Supabase-backed Postgres database. It is multi-tenant and designed for both individual businesses and service providers aiming to become official Meta Business Partners. Sending a message means inserting a database row; receiving one means a webhook POSTs the new row to your endpoint. The stack is Deno and Postgres, and the code is released into the public domain under The Unlicense.

The interesting bit The entire API surface is just PostgREST over the database: every table is an endpoint, so you interact with WhatsApp through SQL inserts and REST reads rather than a bespoke messaging API. It also exposes an MCP server over HTTP, letting Claude Code or other agentic clients list conversations, search contacts, and send messages directly from the database. The project deliberately keeps advanced AI agent logic external, offering only lightweight built-in tools like an MCP client, SQL client, and calculator.

Key highlights

  • Multi-tenant by default, with isolated organizations and support for third-party onboarding via Embedded Signup.
  • Messages are plain database rows: send by inserting into the messages table, receive via webhooks registered in the webhooks table.
  • Ships with an MCP server (Streamable HTTP) for agentic access, plus a Claude Code plugin and official n8n nodes.
  • Media processing for audio, images, video, PDF, and text-based documents is built in.
  • Includes an unofficial WhatsApp Web integration alongside the official Meta Business API.

Caveats

  • You still have to run the Meta gauntlet: Business Partner verification and app review are documented prerequisites for the official API channels.
  • The hosted version includes a 5,000 message/month cap and 1 GB storage limit; the README cuts off before clarifying AI credit top-ups or paid tiers.
  • An unofficial WhatsApp Web integration is provided, though the project clearly treats it as a secondary path to the official APIs.

Verdict Worth a look if you are building a messaging service, a Meta Business Partner offering, or an AI agent that needs structured access to WhatsApp and Instagram conversations. Skip it if you want a fully managed, zero-setup chatbot platform or if you are trying to avoid Meta’s API ecosystem altogether.

Frequently asked

What is matiasbattocchia/open-bsp-api?
OpenBSP API is an open-source, self-hostable layer over Meta’s messaging APIs that treats Postgres tables as the entire messaging surface.
Is open-bsp-api open source?
Yes — matiasbattocchia/open-bsp-api is open source, released under the Unlicense license.
What language is open-bsp-api written in?
matiasbattocchia/open-bsp-api is primarily written in TypeScript.
How popular is open-bsp-api?
matiasbattocchia/open-bsp-api has 506 stars on GitHub.
Where can I find open-bsp-api?
matiasbattocchia/open-bsp-api is on GitHub at https://github.com/matiasbattocchia/open-bsp-api.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.