Notes on MCP, database access, and keeping AI tools local to your infrastructure.
Written by the people building Bufflehead. No newsletter gate — read and go.
During Claude’s November 13 connector disruption, our local Bufflehead connection kept working. What local MCP removes from the path—and what it still depends on.
Save database connections in Bufflehead, connect your AI assistant through native MCP, and let it discover schemas and query the source you choose.
Shared service credentials add identity and access-control work. Our preferred default is a local AI bridge, scoped user credentials and corporate-managed endpoints.
How Bufflehead configures read-only connections, what each database enforces, and why restricted database permissions provide a separate boundary.
A tested synthetic subscription example produces 25% customer churn and 10% gross MRR churn. Define the cohort and calculation before asking an AI tool to query the data.
Estimate an agent query with a dry run, enforce a maximum-bytes-billed limit, and distinguish a per-query guardrail from a total spending budget.
A tested synthetic order fixture checks status, amount and date boundaries together. Separate exact eligibility, missing evidence and optional ranking before trusting an AI recommendation.
A tested synthetic revenue example separates a measured decline from a supplier memo's proposed explanation. Keep SQL facts, document claims and causal uncertainty visible.
A tested Postgres inventory fixture separates sellable stock, confirmed receipts and reorder thresholds from supplier lookup and purchase approval.
Preserve the question, SQL and returned rows together. A synthetic review-record demo separates an incorrect query from a summary that contradicts its result.
A tested Postgres fixture shows why one-to-many joins inflate totals and SUM(DISTINCT amount) loses equal-valued orders. Define the metric grain before trusting an AI answer.
Compare two bounded query budgets against a known-answer fixture. Record what remains unknown when the loop stops, and keep completion checks in the client.
A tested Postgres order lookup shows why stock alone does not establish fulfilment eligibility. Supply the table relationships and business rule, then inspect the SQL.
Give an AI agent a scoped read-only Postgres role, then find its session in the database logs. A tested walkthrough with real log lines, and what Bufflehead does and does not do.
Measure AI deployment cost per successful outcome with read-only Postgres SQL. Include retries and failures, check billing coverage, and keep unit cost separate from ROI.
Check attribution import coverage before explaining an install drop. A read-only Postgres walkthrough for AI analytics, campaign comparisons, and correctly weighted rates.
Gross sales, paid orders, or revenue after refunds? A Postgres walkthrough showing when an AI should ask for a business definition before querying through read-only access.
Five Postgres checks for AI-generated SQL: totals, rankings, date boundaries, duplicate joins, and missing data. Verify the answer, not just whether the query runs.
Compare invoice prices with effective-dated catalog data using read-only Postgres SQL. Surface missing periods, overlapping prices, and currency or unit mismatches.
Read-only access prevents writes, but does not decide which data an AI may read. Test a scoped Postgres role with allowed and denied queries through Bufflehead.
Give AI useful database context with schema, relevant samples, and focused SQL. A read-only Postgres walkthrough inspired by Matthew Brown’s Claude demo.
The tool boundary isn't the security boundary — query construction and credential grants are. Why read-only enforcement belongs at the connector layer, not just the DB layer.
Query-logging and credential-attribution are different problems. Scrubbed views and pgaudit fix the first one; per-engineer credentials fix the second.
Remote MCP on the DB server, local MCP with a direct connection, or local MCP over an SSH tunnel — the tradeoffs that actually matter for stability, security, and maintenance.