Back to Blog

Pinterest Saved 7,000 Engineering Hours a Month with MCP — Here's the Database Architecture That Made It Work

Pinterest's production MCP ecosystem handles 66,000 tool invocations per month across 844 engineers. While 78% of enterprises have AI agent pilots and only 14% reach production, Pinterest cracked the code with domain-specific MCP servers, a central registry, and a database-first architecture. Here's what their approach means for your data layer.

Yesterday we wrote about the 10,000 MCP servers indexed across public registries and the fragmentation problem that creates for database access. Today, Pinterest Engineering published the most detailed production MCP case study we’ve seen — and it’s a masterclass in how to actually make AI agents work at scale.

The numbers: 66,000 MCP tool invocations per month. 844 monthly active engineers. An estimated 7,000 hours saved every month. Not a pilot. Not a proof of concept. Production infrastructure running across Pinterest’s entire engineering organization.

This matters because Pinterest is now part of a very exclusive club. According to a March 2026 survey of 650 enterprise technology leaders, 78% of enterprises have at least one AI agent pilot running — but only 14% have successfully scaled agents to organization-wide production use. Pinterest didn’t just cross that gap. They built the bridge.

The Architecture That Works

The most important decision Pinterest made wasn’t about which LLM to use or which agent framework to adopt. It was about how they structured their MCP servers around data domains.

Instead of building one massive MCP server that exposes everything, Pinterest deployed a fleet of domain-specific MCP servers — each dedicated to a single data system. Their Presto MCP server handles analytical queries. Their Spark MCP server manages job debugging and log analysis. Their Airflow MCP server deals with workflow orchestration.

This is the opposite of what most teams do when they first experiment with MCP. The natural instinct is to build a “god server” that wraps every database, every API, every internal tool into one massive MCP endpoint. It feels efficient. It’s actually a trap.

Here’s why: a single MCP server that exposes 200 tools creates a context window tax that cripples agent performance. The model has to process every tool definition on every request, burning tokens on tool descriptions it won’t use. Worse, it creates a blast radius problem — one misconfigured tool can take down access to everything.

Pinterest’s domain-specific approach solves both problems:

  • Context stays lean. Each server exposes only the tools relevant to its domain. An agent debugging a Spark job doesn’t need to see Presto query tools.
  • Access control is granular. Different teams get access to different servers. The ML team’s agents can query Presto but not modify Airflow DAGs.
  • Failures are isolated. If the Spark MCP server goes down, Presto-based agents keep working.
  • Scaling is independent. The Presto server — Pinterest’s highest-traffic MCP server — can scale independently of lower-traffic services.

The Registry Pattern

The second critical piece of Pinterest’s architecture is their central MCP registry. This is the component most enterprises skip entirely, and it’s the reason their pilots never graduate to production.

Pinterest’s registry serves as the source of truth for every approved MCP server in the organization. It exposes both a human-friendly UI and a programmatic API. When an agent needs to call a tool, the flow looks like this:

  1. Agent queries the registry to discover available servers
  2. Registry validates permissions and returns connectivity metadata
  3. Agent connects to the approved server and invokes the tool
  4. Every invocation is logged for audit and governance

This is critical infrastructure. Without it, you get agent sprawl — the AI equivalent of shadow IT, where individual teams spin up their own MCP servers with different security postures, different access policies, and no centralized visibility into what agents are doing with production data.

The registry pattern also solves the discovery problem. When you have 15 domain-specific MCP servers (and Pinterest likely has more), engineers need a way to find the right one. The registry acts as a service catalog for AI tool access.

Why the Data Layer Is the Production Bottleneck

The March 2026 enterprise survey identified five root causes that account for 89% of AI agent scaling failures:

  1. Integration complexity with legacy systems
  2. Inconsistent output quality at volume
  3. Absence of monitoring tooling
  4. Unclear organizational ownership
  5. Insufficient domain training data

Notice what three of these five have in common: they’re all data layer problems. Integration complexity? That’s connecting agents to databases and internal systems. Monitoring tooling? That’s observability over what data agents are accessing. Domain training data? That’s structured data locked in production databases that agents can’t reach.

Pinterest solved this by treating database access as infrastructure, not as an afterthought. Their Presto MCP server isn’t just a thin wrapper around SQL. It’s a production service with its own scaling, monitoring, and access controls. It’s the highest-traffic MCP server in their fleet for a reason — data is what agents need most.

What This Looks Like in Practice

Let’s make this concrete. Say you’re a Pinterest engineer and a Spark job fails at 2 AM. Before MCP, you’d SSH into a box, grep through logs, cross-reference with the DAG definition in Airflow, check the data lineage in Presto, and maybe file a ticket. That’s 45 minutes of context-switching across four different systems.

With their MCP-powered agents, the workflow becomes:

  1. Agent receives the failure alert
  2. Calls the Spark MCP server to pull job logs and error details
  3. Calls the Presto MCP server to check upstream data freshness
  4. Calls the Airflow MCP server to inspect the DAG configuration
  5. Synthesizes everything into a root cause analysis with a suggested fix

The agent does in seconds what took an engineer 45 minutes. Multiply that by the hundreds of Spark jobs running daily, and you start to understand how Pinterest gets to 7,000 hours saved per month.

The Pattern for Your Team

You don’t need to be Pinterest-scale to apply this architecture. The pattern works at any size:

Step 1: Start with your database, not your agent framework.

Every AI agent team eventually needs data access. Most start by giving agents raw SQL access and hoping for the best. That’s how you get the security incidents — 88% of organizations reported at least one AI agent security incident last year, and database access was the most common vector.

Instead, expose your database through a structured API that enforces access controls, rate limits, and query validation. This is exactly what Faucet does — point it at any SQL database and get a governed REST API with built-in MCP server support:

# Install Faucet
curl -fsSL https://get.faucet.dev | sh

# Connect to your database
faucet serve --db "postgres://user:pass@localhost/mydb"

In under a minute, you have a REST API with full CRUD operations, filtering, pagination, and an MCP server endpoint that any AI agent can connect to. No ORM. No boilerplate. No god-server context bloat.

Step 2: One database, one MCP server.

Follow Pinterest’s domain-specific pattern. If you have a PostgreSQL analytics database and a MySQL operational database, run two Faucet instances:

# Analytics database - read-only access for agents
faucet serve --db "postgres://readonly@analytics:5432/warehouse" \
  --port 8080 --read-only

# Operational database - full CRUD for internal tools
faucet serve --db "mysql://app@operations:3306/production" \
  --port 8081

Each instance generates its own MCP endpoint with only the tools relevant to that database. Your analytics agents see warehouse tables. Your operational agents see production tables. No cross-contamination, no context bloat.

Step 3: Add governance before you add agents.

Pinterest’s registry enforces governance at the protocol level. You can approximate this pattern today with Faucet’s built-in RBAC:

# Create a role with read-only access to specific tables
faucet config set roles.analyst.tables "orders,products,customers"
faucet config set roles.analyst.operations "read"

# Create a role for the ML team with broader access
faucet config set roles.ml_engineer.tables "*"
faucet config set roles.ml_engineer.operations "read"

When an agent connects via MCP, it authenticates with a role. The role determines which tables it can see and what operations it can perform. This is the governance layer that separates production deployments from pilot projects.

The Numbers Don’t Lie

Pinterest’s results speak for themselves, but they’re consistent with what we’re seeing across the industry:

  • Financial services leads enterprise AI agent production deployment at 21%, largely because they invested early in structured data access for compliance automation
  • Healthcare trails at 8%, primarily due to regulatory complexity around data access — exactly the kind of problem that governed database APIs solve
  • Gartner projects 40% of enterprise applications will integrate task-specific AI agents by end of 2026, up from less than 5% in 2025

The enterprises that are making it to production share a common trait: they treated the data layer as a first-class concern, not a problem to solve later. Pinterest didn’t build agents and then figure out how to connect them to databases. They built the database access infrastructure first and then let agents use it.

That’s the playbook. Your database is the foundation. The API layer is the interface. The MCP server is the protocol. The agent is just the last mile.

The 14% Playbook

If you’re in the 78% with a pilot and want to join the 14% in production, here’s the checklist:

  1. Audit your data access. How are your agents currently reaching databases? Raw SQL? Direct connections? Custom wrappers? Each of these is a security and scaling liability.

  2. Deploy structured APIs. Replace direct database connections with governed REST APIs. One API per database, with RBAC, rate limiting, and query validation.

  3. Enable MCP endpoints. Give your agents a standardized protocol for discovering and using database tools. This eliminates the bespoke integration code that makes pilots brittle.

  4. Monitor everything. Every tool invocation, every query, every data access event. If you can’t see what your agents are doing with production data, you’re not ready for production.

  5. Start with read-only. Pinterest’s Presto server primarily serves read queries. Start there. Let agents query and analyze. Add write operations only when you’ve validated the governance layer.

The gap between pilot and production isn’t about model capability. GPT-4, Claude, Gemini — they can all reason over structured data. The gap is about infrastructure. It’s about having a data layer that’s agent-ready: discoverable, governed, observable, and safe.

Pinterest built that infrastructure with a team of engineers over months. With Faucet, you can have the foundation running in under a minute.

Getting Started

# Install Faucet - single binary, no dependencies
curl -fsSL https://get.faucet.dev | sh

# Connect to any SQL database and get an instant REST API + MCP server
faucet serve --db "postgres://localhost/mydb"

# Your MCP endpoint is live at http://localhost:8080/mcp
# Your REST API is live at http://localhost:8080/api/v1

Faucet supports PostgreSQL, MySQL, SQL Server, Oracle, Snowflake, and SQLite. One binary. Every database. The API layer your AI agents have been waiting for.