Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 2 min read

Build Buddy, Day 4: I gave an AI agent my database, read-only first

Day 4 of MLH Global Hack Week: Builders Week. Yesterday I put Build Buddy's benchmark results in a Tiger Data hypertable. Today I connected an AI agent to that database through MCP (Model Context Protocol), and the most

Day 4 of MLH Global Hack Week: Builders Week. Yesterday I put Build Buddy's benchmark results in a Tiger Data hypertable. Today I connected an AI agent to that database through MCP (Model Context Protocol), and the most useful thing I did was lock it down first.

Read-only before anything else

Tiger's MCP server gives an agent real power. Its tools include listing services, reading logs and metrics, and also deleting services and resetting passwords. Before connecting any agent:

tiger config set read_only all

With read_only all, the MCP tools that write (delete, reset password, create, resize) aren't even registered: the agent can't see them, so it can't call them. Database sessions also open in Tiger Cloud's read-only mode, so the server rejects any writes or schema changes (per the Tiger CLI docs).

What the agent did

  1. Listed my services. Easy.
  2. Tried to query the build_results table and couldn't. My network blocks the database port, so direct SQL timed out.
  3. Diagnosed the failure itself. It read the service's live logs through Tiger's API and saw that no client connection ever arrived.
  4. Was honest about it. It said plainly that it couldn't query the table live and was using my local results file instead.

Tiger CLI service list, Cursor agent listing services through MCP, and tiger config showing read_only set to all.

It also checked my work

Analysing that file, the agent:

  • caught a mistake in my Day 3 post: the two warm CS0029 runs were 7.7 s and 7.6 s, not 7.6 s twice
  • found something I'd missed: with cold starts removed, CS0161 is the slowest error even when the model is warm (10.4–12.9 s every run)

What I'm taking away

  • Lock permissions down before you connect an agent. Read-only first, widen later only if needed.
  • The agent working around a blocked connection, and telling me so, is what I want. An agent that quietly made up "live" numbers would be far worse.
  • Check the agent, too. It labelled Alberta as Central Time. Small, but it's the same lesson as every post this week.

Next

After that: behaviour checks in Build Buddy (issue #1), so a fix only counts if it builds and behaves the same.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.