8. Exercise 3: Mutation mode and introspection
1m

Mutation mode

The MCP server's mutation_mode can be configured for:

  • No to run (mutation_mode: none, which is the default)
  • Allowing pre-defined through local files, operation collections and PQ but it blocks the LLM from creating ad-hoc mutations (mutation_mode: explicit)
  • Allowing any to run (mutation_mode: any)

Introspection

You can configure the following MCP server tools to enable capabilities:

  • introspect: Get the full
  • search: Search for types, , or other schema elements
  • validate: Validate queries without executing them
  • execute: Execute dynamically

By default, all of these tools are disabled. To disable them, set enabled: false for the tools you want to disable, or omit them entirely from the configuration file.

Currently, our MCP server has enabled all the tools, but it would be better to disable the execute tool to prevent the LLM from executing arbitrary queries.

Exercise 3: Configuring mutation mode and introspection ( 5 min)

Goal: Configure the MCP server to only allow pre-defined and disable the execute tool.

Steps

  1. Configure the MCP server to only allow pre-defined through local files, operation collections and PQ but it blocks the LLM from creating ad-hoc mutations.

    mcp/mcp.yaml
    overrides:
    mutation_mode: explicit
  2. Configure the MCP server to disable the execute tool.

    mcp/mcp.yaml
    introspection:
    execute:
    enabled: false
  3. Restart the MCP server.

    rover dev --supergraph-config supergraph.yaml --router-config router.yaml --mcp mcp.yaml
  4. Connect to the MCP Inspector. You should see a new AddFunds tool (a ) and the absence of the execute tool. Note that AddFunds is only available for logged-in guest users (guest@example.com with password guest456!).

Task!
Previous