---
title: "Safelist GraphQL Operations for AI Agents | Cosmo MCP Gateway"
url: https://daily.dev/posts/safelist-graphql-operations-for-ai-agents-cosmo-mcp-gateway-ibvvt22oq
source_url: https://wundergraph.com/blog/safelist-graphql-operations-for-ai-agents-cosmo-mcp
type: article
source: "WunderGraph"
published: 2026-06-12T17:49:49.861Z
updated: 2026-08-24T06:53:39.202Z
tags: ["ai-agents", "graphql", "mcp", "oauth"]
reading_time: 8
upvotes: 1
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Safelist GraphQL Operations for AI Agents | Cosmo MCP Gateway

**[WunderGraph](https://daily.dev/sources/wundergraph)** · 8 min read · 1 upvotes · 0 comments

## Summary

The Cosmo Router MCP Gateway lets you expose federated GraphQL schemas to AI agents as reviewed, OAuth-scoped MCP tools. Two configuration flags control posture: expose_schema and enable_arbitrary_operations. In development, both are open so agents can explore and draft queries; in production, both are closed and agents can only execute pre-approved .graphql operation files. Each safelisted operation becomes a discrete MCP tool with typed inputs, validated against the composed schema at load time and on hot reload. OAuth 2.1 with JWT enforcement and @requiresScopes directives provide per-operation, per-agent authorization. Additive schema changes require no operation updates; breaking changes cause the affected operation to be skipped and logged. This approach avoids building a parallel AI-safe API by encoding the AI-facing surface as standard GraphQL persisted documents on existing infrastructure.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://wundergraph.com/blog/safelist-graphql-operations-for-ai-agents-cosmo-mcp>

## Similar posts on daily.dev

- [Don't Let AI Agents Improvise Against Production GraphQL](https://daily.dev/posts/don-t-let-ai-agents-improvise-against-production-graphql-8scnqsfxt) · WunderGraph · 2 upvotes · 0 comments
- [Per-Tool OAuth Scopes for MCP, Derived from Your Schema](https://daily.dev/posts/per-tool-oauth-scopes-for-mcp-derived-from-your-schema-y05pmgghg) · WunderGraph · 0 upvotes · 0 comments
- [GraphQL Operation Descriptions: How a Spec Update Solved Our MCP Problem](https://daily.dev/posts/graphql-operation-descriptions-how-a-spec-update-solved-our-mcp-problem-t6g25szpx) · WunderGraph · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#graphql](https://daily.dev/tags/graphql), [#mcp](https://daily.dev/tags/mcp), [#oauth](https://daily.dev/tags/oauth)

[View this post on daily.dev](https://daily.dev/posts/safelist-graphql-operations-for-ai-agents-cosmo-mcp-gateway-ibvvt22oq)
