How to Connect Claude or ChatGPT to Your Business Database
Claude, ChatGPT, and other LLM agents become much more useful when they can answer questions from your actual business records instead of from pasted snippets. The key is not giving the model every file you have. The key is giving it controlled access to a structured database it can query when it needs facts.
For a service business, that database should hold clients, properties, jobs, dispatch appointments, technicians, parts, photos, invoices, payments, and status history. Once the records live in PostgreSQL, an agent can ask precise questions, summarize current work, and help with operations without guessing from chat history.
Why pasting spreadsheets into a chat breaks down
Pasting a spreadsheet into Claude or ChatGPT can work for a one-time summary, but it is not a reliable operating pattern. The model sees only the rows you pasted, not the updated state of the business. It does not know whether another dispatcher changed an appointment, whether a payment posted after the export, or whether a technician uploaded completion photos ten minutes later.
Spreadsheets also flatten relationships. A row might contain a customer name, job address, part number, invoice status, and technician note all in one place. That may look convenient to a human, but it gives an AI agent weak clues instead of dependable structure. If one customer owns multiple properties or one job has multiple visits, the pasted sheet becomes ambiguous fast.
A business database solves that by storing each concept in the right place and linking records with IDs. The agent no longer has to infer what belongs together. It can query jobs by property, photos by job, invoices by job, and appointments by technician.
The simple pattern: the agent uses tools to query Postgres
The practical way to connect Claude or ChatGPT to business data is to put a tool layer between the model and the database. The tool layer may be an MCP server, a function-calling integration, a small API, or another approved connector. The exact implementation can vary, but the concept is the same: the model asks for data, the tool runs a safe query, and the answer comes back as structured context.
This is different from uploading your whole business into a chat window. The model does not need every record at once. It needs the right records at the right time. If you ask, "Which jobs are ready to invoice but still unpaid?" the tool can query completed jobs, invoice records, payment records, and maybe QA status, then return the matching results.
That pattern keeps the model focused. It also lets you decide what the agent can read, what it can write, and what actions require human approval.
Why PostgreSQL is a strong foundation for agent access
PostgreSQL is a good fit because it is a real relational database, not just a storage bucket. It can enforce relationships between clients, properties, jobs, appointments, parts, photos, invoices, and payments. It can store timestamps, statuses, notes, JSON fields where appropriate, and audit records that show who changed what.
For AI agents, those boring database features are important. Foreign keys reduce confusion. Indexes make lookups fast. Constraints prevent invalid records. Views can expose clean question-friendly slices of data. Permissions can limit access so the agent only reaches the tables and actions you choose.
Postgres also avoids tying your agent strategy to a single app vendor. If your data lives in a standard database, many tools can connect to it. Claude, ChatGPT, local agents, scripts, dashboards, and reporting tools can all work from the same source of truth.
What your database needs before the agent connects
The agent can only be as useful as the records it can reach. Before connecting an LLM, make sure the database represents the real workflow. A service business usually needs separate tables for clients, properties, jobs, scheduled visits, technician assignments, status changes, parts, suppliers, purchase orders, photos, QA, invoices, and payments.
That separation is not about making the system complicated. It is about making questions answerable. "Show me every open job waiting on parts" requires job status, part requirements, purchase order or inventory status, and scheduling context. "Which properties had callbacks this month?" requires service history and status events. "Can we invoice this job?" requires completion, photos, QA, installed parts, and invoice records.
If those facts live in disconnected notes, the agent will improvise. If they live in linked tables, the agent can retrieve evidence.
Keep ownership local and permissions explicit
Connecting an AI agent to operational data does not mean giving away control of your business. A local PostgreSQL database can run on your Mac or on infrastructure you control. The agent connector can be configured to read from that database, write to approved tables, or require confirmation before making changes.
This matters for privacy and for accountability. Customer addresses, job notes, invoices, and payment status are sensitive business records. A local database lets you decide where those records live and how they are backed up. You can keep the source of truth under your control while still letting an AI assistant help with dispatch, documentation, summaries, and follow-up.
Tool access should be specific. The agent might be allowed to read jobs and write draft notes, but not delete invoices. It might create a proposed appointment, but require a dispatcher to approve it. Good data access is controlled access, not unlimited access.
Plain English questions become database queries
The user experience can feel simple even when the backend is structured. A business owner should be able to ask, "What jobs are stuck?" or "Which technicians have open appointments tomorrow?" and get an answer based on real records. Behind the scenes, the tool layer turns that request into queries over the relevant tables.
This is where a schema designed for operations pays off. If the tables clearly model status history, appointment assignments, parts readiness, photos, and invoices, the agent can answer operational questions with far less ambiguity. It can also explain why it reached a conclusion by pointing back to the records it found.
The goal is not to make the owner write SQL. The goal is to give the agent a database it can query so plain English questions produce grounded answers.
Start faster with a ready 38-table schema
You can build your own PostgreSQL schema and connector if you have the time and technical resources. Start with the core entities, define relationships carefully, add status history early, and avoid making freeform notes carry facts that should be queryable.
If you want a ready starting point, SQL Agent is a prebuilt 38-table PostgreSQL operations database for service businesses. It gives your AI agent a structured place to query clients, properties, jobs, dispatch, technicians, parts, photos, QA, invoices, payments, and related operational records.
That means you can focus on connecting Claude, ChatGPT, or another LLM agent to useful business data instead of spending weeks designing the database from zero. The schema is built to support plain English agent questions while keeping the underlying source of truth structured.
Bottom line
To connect Claude or ChatGPT to your business database, think in three layers: structured PostgreSQL data, a controlled tool or MCP-style connector, and the LLM interface where you ask questions. The database holds the truth. The tool layer retrieves or updates approved records. The model explains and acts on the information.
Whether you build the database yourself or use SQL Agent, the outcome should be the same: your AI agent works from real operational data instead of pasted spreadsheets, stale exports, or memory from previous chats. That is how an AI assistant becomes useful for dispatch, service history, parts, billing, and day-to-day decisions.