Blog
How to Connect Claude or ChatGPT to Your Database and Stripe with an MCP Server
Tutorial
ยท
Quick answer: To connect Claude or ChatGPT to your database and Stripe, build a BuildShip workflow that starts with a Tool Trigger, so it becomes a tool with a name, a description and validated inputs. Inside, fetch the customer from Stripe and your own account row in parallel and return only what the assistant needs. Ship it and BuildShip hosts it as an MCP endpoint with an API key, which you add to Claude or Cursor. ChatGPTโs custom MCP setup offers OAuth or no authentication rather than a fixed key, so check that against your endpoint before you rely on it. Keys stay in BuildShip, not in the chat.

A support lead asks a chat assistant: โWhat plan is this customer on, and did their last payment go through?โ What comes back is a lovely explanation of how one might find that out.
The assistant can reason about billing all day. It just canโt see yours. The answer lives in Stripe and in an internal accounts table, and nobody wants to paste a secret key into a prompt to fix that.
MCP, the Model Context Protocol, is the standard way for an assistant to discover and call tools. It solves the wiring. What it leaves to you is the other end of the wire: a tool that does a real job, safely. That is what this post builds, and it is deliberately small: one lookup tool and one tiny write tool.
If you want the bigger picture of what MCP changes, start with our guide on giving Claude, ChatGPT and Cursor a real backend with MCP, which uses an order desk as its example. This post uses a customer lookup instead, so the two donโt overlap.
What the tool should and shouldnโt do
A good tool is narrower than a database connection. Decide the shape before you build:
One question, one tool. Look up an account by billing email and return what a support person needs.
Return less than you have. Plan, status, last payment result and owner. Not the whole row, and not the card details.
Say it plainly when nothing is found. โNo customer found for this email. Ask for the billing email instead.โ A model given an empty result tends to improvise, so give it a sentence.
Separate reading from writing. A second tool adds a row to a review queue. It canโt touch billing.
That last point is what lets you give different clients different permissions.
What you need
A BuildShip workspace. You can start a 7-day trial (a card is required).
A Stripe account. Use test mode and a test key while you build.
A table of accounts, for example in Supabase, with email, plan, status and owner.
Claude, Cursor or another MCP client to try it from.
Build it step by step
1. Make it a tool
Create a workflow and start it with the Tool Trigger. BuildShipโs tools docs explain that a shipped tool hosts an MCP endpoint, plus an OpenAPI spec, that MCP clients can use. Add one input, customerEmail, and write its description for a model: โthe customerโs billing email addressโ. Add validation so a malformed value is rejected before anything runs.
2. Look the customer up, twice, at once
Use a Parallel node with two branches: Fetch Stripe Customer for the billing side, and Supabase Get Row on your accounts table for your own data. Running them in parallel keeps the answer quick, and neither branch depends on the other. Keep the Stripe key as a secret.
3. Return only whatโs needed
A short script node builds the answer: plan, status, last payment result, account owner. If nothing was found, return the plain sentence from above. Log the input and the result so you can see every call later.
4. Add the second tool
Create flag_account_for_review with inputs customerEmail and reason. It inserts a row into a review_queue table and returns the new rowโs id. A person works through that queue. The tool canโt change billing, refund anything or cancel anything.
5. Ship it and copy the connection details
Ship the workflow. In the Connect tab, create an API key and copy the MCP endpoint. Every ship is saved in version history, so if a change goes wrong you can go back.

The read tool and the write tool are separate, so each client can be allowed to do only one.
Connect it to Claude
BuildShipโs Claude setup guide gives you a command, with your project, flow and key filled in, that connects the tool to Claude Desktop. Run it, restart Claude, and the tool appears. You can also add the endpoint as a custom connector in Claude by pasting the MCP endpoint URL and adding the key as a request header.
Ask it: โWhat plan is the customer at the billing email on this ticket on, and did their last payment go through?โ It will call the tool, and you can open BuildShipโs logs and see the exact input and output.
Connect it to Cursor
BuildShipโs tools docs and our MCP guide describe connecting a tool to Cursor too. Cursor reads an mcp.json file where a remote server needs a URL and, if it takes a fixed key, a headers object. Walk through it once on your own machine and keep the key in an environment variable, so it doesnโt end up in git.
What about ChatGPT?
This is the one to check before you promise it to anyone. ChatGPTโs custom MCP server setup offers OAuth or no authentication, not a fixed key in a header. A BuildShip tool endpoint takes an API key, so the authentication has to match what ChatGPT can send. Donโt remove the key to make it work. Read the ChatGPT section of our MCP guide for the current picture, and test your own tool end to end before you rely on it.
Prompt to start from in BuildShipโs AI builder
Create a tool (workflow with a Tool Trigger) named get_customer_account. Input: customerEmail (string, must match an email pattern, description: โthe customerโs billing email addressโ). Look the customer up with Fetch Stripe Customer and in my Supabase table โaccountsโ (columns: email, plan, status, owner). Run both at the same time. Return only: plan, status, last_payment_status, owner. If nothing is found, return the sentence โNo customer found for this email. Ask for the billing email instead.โ Log the input and the result. Read from Stripe only; never write to it. Then create a second tool flag_account_for_review with inputs customerEmail and reason that inserts a row in a Supabase table โreview_queueโ and returns the new row id. Use my Stripe test key for now.
Where people stay in charge
The read tool is read-only. The write tool only adds a row to a queue that a person works through. In clients that support it, you can switch the write tool to ask for approval on every call. And because every call is logged in BuildShip with its inputs and outputs, you can answer โwhat did the assistant look up, and when?โ
What Iโd test first
Use fake accounts and Stripe test mode. Ask the assistant a question about an email that exists, one that doesnโt and one that is malformed. You are checking three things: the real answer is short and correct, the empty case returns your plain sentence, and the bad input is rejected before any lookup runs. Then open the run log and confirm that no key appears anywhere in the chat.
FAQ
Can Claude use a BuildShip workflow as a tool?
Yes. A workflow that starts with a Tool Trigger becomes a tool, and once shipped it has an MCP endpoint and an API key. BuildShipโs setup guide shows how to connect it to Claude.
Can ChatGPT use the same tool?
It depends on authentication. ChatGPTโs custom MCP setup offers OAuth or no authentication, not a fixed API key, so you need to check that against your endpoint and test it yourself before relying on it.
Where do the Stripe and database keys live?
In BuildShipโs secrets. They are used inside the workflow and never appear in the chat.
Can the assistant change billing?
Not with these tools. The lookup is read-only, and the second tool only adds a row to a review queue.
How much does it cost to try?
BuildShip plans start with a 7-day trial, and a card is required to start it. See the pricing page for plans and credits.
Start building
The quickest way to learn this is to build it. Start your 7-day trial (a card is required), build the lookup tool in Stripe test mode, and connect it to the client your team already uses. If the lookup is for failed payments, see how to recover failed Stripe payments with a human for the big accounts, and for more on tools in general, read MCP tools for AI agents.





