Building a Production Model Context Protocol (MCP) Ecosystem for AI Agents

pinterest · Tech · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Production MCP ecosystem for internal engineering agents

Pinterest needed a standardized, secure, observable way for AI agents in chats, IDEs, and internal workflows to call real engineering tools and data systems without creating one-off integrations, silently expanding data access, or letting automated actions mutate sensitive systems without governance.

Constraints:

Architecture

Pinterest built a cloud-hosted MCP ecosystem with many small domain-specific MCP servers, a central registry, unified deployment pipeline, security review, JWT and mesh-identity authorization, business-group access gating, channel/tool restrictions, human-in-the-loop approval for sensitive actions, and built-in telemetry. Internal chat, IDE, AI bot, and agent surfaces discover approved servers through the registry API, authenticate through Pinterest's internal auth stack, and bind authorized MCP tools into their agent toolsets.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  ai-work-surfaces[AI work surfaces] --> internal-auth-stack[Internal auth stack]
  ai-work-surfaces --> mcp-registry[MCP registry]
  ai-work-surfaces --> mcp-toolset-binding[MCP toolset binding]
  internal-auth-stack --> envoy-gateway[Envoy gateway]
  mcp-registry --> mcp-server-fleet[MCP server fleet]
  mcp-toolset-binding --> mcp-server-fleet
  unified-deployment-pipeline[Unified deployment pipeline] --> mcp-server-fleet
  security-review-workflow[Security review workflow] --> mcp-registry
  envoy-gateway --> mcp-server-fleet
  envoy-gateway --> policy-decorators[Policy decorators]
  policy-decorators --> mcp-server-fleet
  mcp-server-fleet --> presto-mcp-server[Presto MCP server]
  mcp-server-fleet --> spark-mcp-server[Spark MCP server]
  mcp-server-fleet --> knowledge-mcp-server[Knowledge MCP server]
  mcp-server-fleet --> human-approval-layer[Human approval layer]
  mcp-server-fleet --> telemetry-library[Telemetry library]
  telemetry-library --> impact-metrics[Impact metrics]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
AI work surfaces Internal LLM web chat, internal chat bots, IDE integrations, and AI agents where employees use MCP tools. MCP registry, Internal auth stack, MCP toolset binding
Internal auth stack OAuth and identity source that issues user JWTs for registry and MCP server connections. AI work surfaces, Envoy gateway, MCP registry
MCP registry Source of truth for approved MCP servers, connection metadata, owners, support channels, security posture, status, visible tools, discovery, validation, and governance. AI work surfaces, Internal auth stack, MCP server fleet, Security review workflow
MCP toolset binding Client-side binding of authorized MCP tools into agent toolsets so they feel like ordinary agent tools. AI work surfaces, MCP registry, MCP server fleet
Unified deployment pipeline Platform pipeline that handles deployment and scaling infrastructure for MCP servers. MCP server fleet
MCP server fleet Cloud-hosted collection of domain-specific MCP servers such as Presto, Spark, Airflow, and Knowledge. Unified deployment pipeline, MCP registry, Envoy gateway, Policy decorators, Telemetry library, Human approval layer
Presto MCP server High-traffic data-query MCP server that lets agents pull Presto-backed data on demand with business-group access controls. MCP server fleet, Policy decorators
Spark MCP server Debugging server used to diagnose Spark job failures, summarize logs, and record structured root-cause analyses. MCP server fleet, Policy decorators
Knowledge MCP server General-purpose company knowledge endpoint for Q&A, documentation, and debugging across internal sources. MCP server fleet
Envoy gateway Gateway that validates JWTs, maps forwarded user/group headers, and enforces coarse-grained security policies. Internal auth stack, MCP server fleet, Policy decorators
Policy decorators Lightweight server-side authorize_tool decorators enforcing fine-grained tool permissions. Envoy gateway, MCP server fleet
Security review workflow MCP Security Standard process with owning team, registry entry, Security, Legal/Privacy, and GenAI review tickets. MCP registry, MCP server fleet
Human approval layer Human-in-the-loop and elicitation controls for sensitive or expensive MCP-powered actions. MCP server fleet, AI work surfaces
Telemetry library Shared library functions for logging inputs, outputs, invocation counts, exception tracing, and impact analysis. MCP server fleet, Impact metrics
Impact metrics Ecosystem metrics for servers, tools, invocations, estimated minutes saved, monthly active users, and hours saved. Telemetry library

Data flow

A team defines tools for a domain-specific MCP server and deploys it through Pinterest's unified pipeline. The server appears in the internal MCP registry after review, with owner, support, status, security posture, visible tools, and production approval. When a user in web chat, an IDE plugin, or an AI bot invokes an agent, the client performs OAuth against internal auth, sends a JWT to the registry and target server, Envoy maps user/group headers, policy decorators enforce fine-grained tool access, and telemetry records inputs, outputs, invocations, exceptions, and estimated time saved.

4 supporting quotes
“Local MCP servers are still possible for experimentation, but the paved path is “write a server, deploy it to our cloud compute environment, list it in the registry.” ### Many Small Servers, Not One Giant One”article, stated
“The API lets AI clients (e.g., our internal AI chat platform, AI agents on our internal communications platform, IDE integrations) discover and validate servers”article, stated
“The client performs an OAuth flow against our internal auth stack and sends the resulting JWT when it connects to the MCP registry and the target MCP server.”article, stated
“All MCP servers at Pinterest use a set of library functions that provide logging for inputs/outputs, invocation counts, exception tracing, and other telemetry”article, stated

Why this architecture

Pinterest optimized MCP for production governance rather than local experimentation. Cloud-hosted servers let internal routing and security logic apply consistently; multiple domain-specific servers kept contexts small and access controls precise; the registry became the production approval and discovery backbone; and a unified deployment pipeline reduced the operational burden that would otherwise block domain teams from building useful tools.

4 supporting quotes
“we explicitly optimized for internal cloud-hosted MCP servers, where our internal routing and security logic can best be applied.”article, stated
“We chose the latter: multiple MCP servers (e.g., Presto, Spark, Airflow) each own a small, coherent set of tools.”article, stated
“This is also the backbone for governance: only servers registered here count as “approved for use in production.””article, stated
“To address this, we created a unified deployment pipeline that handles infrastructure for all MCP servers: teams define their tools and the platform handles deployment and scaling of their service. This lets domain experts focus on their business logic rather than figuring out deployment mechanics.”article, stated

Models used: LLMs via internal AI chat · AI agents using MCP tools

Scale

Alternatives considered (roads not taken)

Use local MCP servers as the production paved path

Rejected because: Pinterest wanted centralized routing, security logic, and operational consistency for production use.

“Although MCP supports local servers (running on your laptop or personal cloud development box, communicating over stdio)”article, stated
“we explicitly optimized for internal cloud-hosted MCP servers, where our internal routing and security logic can best be applied.”article, stated

Build one monolithic MCP server

Rejected because: A monolith would crowd the model context and make access controls less precise than domain-specific servers.

“We debated a single monolithic MCP server vs. multiple domain-specific servers. We chose the latter: multiple MCP servers (e.g., Presto, Spark, Airflow) each own a small, coherent set of tools.”article, stated
“We chose the latter: multiple MCP servers (e.g., Presto, Spark, Airflow) each own a small, coherent set of tools. This lets us apply different access controls per server and avoid crowding the model’s context.”article, stated

Make each team build full server infrastructure before writing tools

Rejected because: Early feedback showed the deployment and service setup burden was too high.

“spinning up a new MCP server required too much work: deployment pipelines, service configuration, and operational setup before writing any business logic.”article, stated
“To address this, we created a unified deployment pipeline that handles infrastructure for all MCP servers: teams define their tools and the platform handles deployment and scaling of their service.”article, stated

Use the MCP OAuth standard with per-server consent prompts

Rejected because: Pinterest piggybacked on existing internal auth sessions and handled authorization transparently through Envoy and policy decorators.

“The MCP specification defines an OAuth 2.0 authorization flow where users explicitly authenticate with each MCP server”article, stated
“Our approach is different: users already authenticate against our internal auth stack when they open a surface like the AI chat interface”article, stated

Grant all authenticated employees access to sensitive MCP servers

Rejected because: Data-heavy tools such as Presto required business-group gating so broad surfaces would not silently expand sensitive data access.

“Note that since some MCP servers can execute queries against sensitive internal data systems (like the Presto MCP server), we implemented business-group-based access gating. Rather than granting access to all authenticated Pinterest employees and contractors, some servers will:”article, stated
“Turning on a powerful, data-heavy MCP server in a popular surface therefore doesn’t silently expand who can see sensitive data.”article, stated

Patterns

tool-use-orchestration (mcp-integration)

Pinterest uses MCP as a unified protocol for agents to call Presto, Spark, Knowledge, Airflow, and other internal tools from chat, IDE, and agent surfaces.

“is an open-source standard that lets large language models talk to tools and data sources over a unified client-server protocol”article, stated
“Once connected, our AI chat agent binds MCP tools directly into its agent toolset so invoking MCP feels no different from calling any other tool.”article, stated

safety-policy-enforcement (governance)

Production MCP servers require security review, owning teams, registry approval, JWT/mesh authorization, business-group gates, and policy decorators.

“Every MCP server that is not a one-off experiment must be tied to an owning team, appear in the internal MCP registry, and go through review”article, stated
“almost every MCP call is governed by two layers of auth: end-user JWTs and mesh identities.”article, stated

human-in-the-loop-gate (action-safety)

Agents can propose sensitive or expensive MCP-powered actions, but humans approve or reject before execution and elicitation confirms dangerous actions.

“mandates human-in-the-loop before any sensitive or expensive action”article, stated
“agents propose actions using MCP tools, and humans approve or reject (optionally in batches) before execution.”article, stated

observability-tracing (mcp-operations)

All MCP servers use shared logging/telemetry libraries for inputs, outputs, invocation counts, exceptions, and impact analysis.

“We didn’t want MCP to become a black box.”article, stated
“logging for inputs/outputs, invocation counts, exception tracing, and other telemetry for impact analysis out of the box.”article, stated

privacy-preserving-processing (data-access)

Business-group access gating and user-level attribution prevent broad AI surfaces from expanding access to sensitive internal data.

“only a specific set of approved business groups (for example, Ads, Finance, or specific infra teams) can establish a session”article, stated
“Some servers require a valid JWT even for tool discovery. That gives us user-level attribution for every invocation”article, stated

rag-retrieval (knowledge-access)

The Knowledge MCP server gives agents a company knowledge endpoint for internal Q&A, documentation, and debugging across internal sources.

“Knowledge MCP server: a general-purpose knowledge endpoint”article, stated
“agents can reach for institutional knowledge with the same ease as calling a tool.”article, stated

Tradeoffs

Standardize on cloud-hosted MCP servers for production

Chose internal cloud-hosted MCP servers over local stdio servers as the paved production path.

Rationale: Centralized hosting lets Pinterest apply routing, security, governance, and operational controls consistently.

“Local MCP servers are still possible for experimentation”article, stated
“the paved path is “write a server, deploy it to our cloud compute environment, list it in the registry.””article, stated

Use many domain-specific MCP servers

Chose Presto, Spark, Airflow, Knowledge, and other focused servers over one giant MCP server.

Rationale: Focused servers reduce context clutter, allow domain ownership, and enable different access controls by tool domain.

“We debated a single monolithic MCP server vs. multiple domain-specific servers.”article, stated
“We chose the latter”article, stated

Use existing internal auth rather than per-server OAuth UX

Chose JWTs from internal auth plus Envoy and policy decorators over extra login prompts and per-server consent screens.

Rationale: Pinterest could preserve fine-grained authorization without exposing per-server auth complexity to end users.

“There is no additional login prompt or consent dialog when a user invokes an MCP tool.”article, stated
“Envoy and our policy decorators handle authorization transparently in the background”article, stated

Require human approval for sensitive automated actions

Chose human-in-the-loop and elicitation over fully autonomous execution of expensive or sensitive tool actions.

Rationale: Automation speed increases risk when tools can overwrite data or touch real systems.

“agents propose actions using MCP tools, and humans approve or reject (optionally in batches) before execution.”article, stated
“We also use elicitation to confirm dangerous actions.”article, stated

Use time saved as the north-star metric

Chose estimated minutes saved per invocation times invocation counts over only raw invocation or server counts.

Rationale: Time saved gives a value-oriented view of impact, while still being treated as directional because estimates are owner-provided.

“These roll up into a single north-star metric: time saved.”article, stated
“Combined with invocation counts, we get an order-of-magnitude view of impact”article, stated

Gotchas (what bit them)

MCP tool access can silently expand sensitive data reach.

Root cause: A popular surface like web chat can reach data-heavy MCP servers such as Presto unless access is gated beyond authentication.

Resolution: Pinterest uses business-group access gating, user JWTs, Envoy policies, and per-tool decorators.

“some MCP servers can execute queries against sensitive internal data systems (like the Presto MCP server)”article, stated
“Turning on a powerful, data-heavy MCP server in a popular surface therefore doesn’t silently expand who can see sensitive data.”article, stated

New MCP server creation initially had too much operational overhead.

Root cause: Teams had to handle deployment pipelines, service configuration, and operations before writing business logic.

Resolution: Pinterest built a unified deployment pipeline so teams define tools while the platform handles deployment and scaling.

“spinning up a new MCP server required too much work: deployment pipelines, service configuration, and operational setup before writing any business logic.”article, stated
“the platform handles deployment and scaling of their service.”article, stated

A monolithic MCP server would overload context and governance.

Root cause: Putting all tools behind one server would expose irrelevant tools together and make access control less granular.

Resolution: Pinterest uses multiple small domain-specific servers with separate ownership and access controls.

“multiple MCP servers (e.g., Presto, Spark, Airflow) each own a small, coherent set of tools.”article, stated
“avoid crowding the model’s context.”article, stated

Automated agents increase the blast radius of tool actions.

Root cause: MCP servers enable agents to call tools that affect real systems and data at automation speed.

Resolution: Sensitive or expensive actions require human-in-the-loop approval and elicitation confirmation.

“Because MCP servers enable automated actions, the blast radius is larger than if a human manually wielded these tools.”article, stated
“asking for confirmation before applying a change to e.g. overwrite data in a table.”article, stated

Impact metrics are useful but only directional.

Root cause: Minutes saved per invocation are owner-provided estimates based on lightweight feedback and prior manual workflows.

Resolution: Pinterest treats time saved as an order-of-magnitude signal rather than rigorous causal measurement.

“owners provide a directional “minutes saved per invocation” estimate”article, stated
“we get an order-of-magnitude view of impact, which we treat as a directional signal of value.”article, stated

Evaluation

Pinterest evaluates the MCP ecosystem through operational telemetry and impact metadata: registered server/tool counts, invocation counts, inputs/outputs, exceptions, user-level attribution, monthly active users, directional minutes saved per invocation, and estimated total hours saved.

Metrics: number of MCP servers registered · number of tools registered · invocations across all servers · inputs and outputs logged · exception traces · monthly active users · estimated minutes saved per invocation · estimated hours saved per month

4 supporting quotes
“we measure the number of MCP servers and tools registered, the number of invocations across all servers”article, stated
“the estimated time-savings per invocation provided as metadata by server owners.”article, stated
“Some servers require a valid JWT even for tool discovery. That gives us user-level attribution for every invocation”article, stated
“exception tracing, and other telemetry for impact analysis out of the box.”article, stated

Outcomes

The ecosystem is used by majority-daily internal LLM web chat users and reported 66,000 MCP invocations per month across 844 monthly active users, with directional estimates of 7,000 engineering hours saved per month.

4 supporting quotes
“Pinterest has successfully transitioned from an initial concept to a robust, production-ready ecosystem for the Model Context Protocol (MCP).”article, stated
“These high-leverage tools are integrated directly into employees’ daily workflows”article, stated
“The results are clear: the MCP ecosystem has already grown to over 66,000 invocations per month”article, stated
“delivering an estimated 7,000 hours of time saved monthly for our engineers.”article, stated