GraphQL + MCP: The Semantic Architecture Autonomous Agents Need
Apollo GraphQL proposes a semantic layer based on GraphQL and MCP for enterprise agents to consume precise data, reduce token costs, and prevent data leaks.
June 16, 2026 · 4 min read

TL;DR: GraphQL and MCP combined create a semantic architecture that allows enterprise autonomous agents to consume precise data, reducing token costs and security risks. Apollo GraphQL leads this vision presented at the AI Agent Conference.
During the AI Agent Conference, Ryan Donovan (Stack Overflow) interviewed Matt DeBerglis, CEO of Apollo GraphQL, who presented the vision of using GraphQL together with the Model Context Protocol (MCP) as a structured semantic architecture for enterprise autonomous agents. The core idea is that agents do not directly access internal microservices but consume data through a GraphQL layer that exposes exactly the context they need, defined via MCP.
Historical Context: Evolution of APIs and Agents
To understand the relevance of this proposal, it is useful to review the evolution of APIs. In the 2000s, REST became the dominant standard for service-to-service communication, replacing SOAP. However, REST had limitations: data overhead (over-fetching and under-fetching) and multiple endpoints. GraphQL, created by Facebook in 2012 and open-sourced in 2015, solved these problems by allowing precise queries. Now, with the advent of autonomous agents based on large language models (LLMs), a new challenge arises: how to feed these agents with structured and secure data. MCP, an open protocol driven by Anthropic (launched in November 2024), seeks to standardize how agents access tools and context. The GraphQL+MCP combination is therefore a natural evolution.
Why Is It Important?
Companies are adopting autonomous agents to automate processes but face three critical problems:
- Security: direct access to internal microservices creates risks of 'east-west exfiltration' of data, where a compromised agent can move laterally. DeBerglis highlighted in the interview that 'without a semantic layer, agents are like a child in a china shop.'
- Token Costs: language models consume tokens uncontrollably when receiving unfiltered or irrelevant data. According to industry data, inference costs can be reduced by up to 70% by limiting queries to strictly necessary fields.
- Data Quality: without a semantic layer, agents receive raw data without context, leading to hallucinations and errors. A Gartner study (2024) indicates that 40% of failures in autonomous agents are due to poorly contextualized data.
The GraphQL+MCP combination addresses these points: GraphQL enables precise queries (only the needed fields), while MCP defines the context and tools the agent can use, limiting its scope. This is similar to how relational databases used views to restrict access to sensitive data.
What Consequences Will It Have?
If this architecture is adopted, we could see:
- Significant reduction in inference costs by minimizing tokens per query. Companies like Netflix have already reported 50% savings in API costs when migrating from REST to GraphQL.
- Greater security by preventing agents from accessing internal APIs without control. This is especially critical in regulated industries like finance or healthcare, where data leaks can have legal consequences.
- More reliable agents by receiving contextualized and validated data. For example, a customer service agent could query only the user's order history without accessing payment data.
- Standardization in how enterprise agents interact with data, similar to how REST standardized APIs in the 2000s. MCP could become the 'HTTP of agents.'
However, adoption will require changes to existing infrastructure and a learning curve for data and AI teams. Additionally, not all workloads will benefit: for simple queries, REST may suffice.
Comparison with Previous Events
This proposal recalls the transition from SOAP to REST, where simplicity and flexibility drove massive adoption. Similarly, GraphQL+MCP offers a semantic layer that abstracts underlying complexity. It also resembles the adoption of API Gateways in microservices, which centralized access control. However, unlike those, the focus here is on interaction with intelligent agents, not just traditional applications.
What Should Readers Know?
To implement this architecture, companies should:
- Expose their data through well-designed GraphQL APIs, with schemas reflecting the business domain. Tools like Apollo Federation allow unifying multiple data sources.
- Define MCP tools and contexts for each type of agent, restricting which data and actions are available. For example, a sales agent might have access to product catalog but not financial data.
- Monitor token consumption and adjust GraphQL queries for maximum efficiency. Platforms like Apollo Studio offer real-time analytics.
'If context is king, architecture is the castle,' said DeBerglis, emphasizing that without a semantic layer, agents are vulnerable and inefficient.
Companies like Apollo GraphQL already offer tools to build this layer, and other providers like AWS (AppSync) or Hasura are expected to follow suit. MCP, an open protocol driven by Anthropic, is gaining traction as a standard for defining agent contexts. Major companies like Shopify and Netflix are already experimenting with GraphQL for agents, according to industry sources.
In summary, the GraphQL+MCP combination represents a step forward toward secure, efficient, and reliable autonomous agents. Technology leaders should evaluate early adoption to gain competitive advantages, though with caution not to over-engineer the solution for simple cases. The future of enterprise automation relies on a solid semantic architecture, and this proposal could be the foundation.