Skip to content
HomeNewsConceptsGuidesToolbox
AboutSubscribeUA
Subscribe

AI Today Brief

The daily AI-engineering brief. Built in public. EN · UA.

XTelegramLinkedInYouTubeRSS

Follow AI Today Brief on LinkedIn for daily AI-engineering updates and the weekly “5 shifts that changed how developers work” PDF.

Explore

NewsDigestsConceptsGuides

Company

SubscribeAdvertiseAbout

Legal

Editorial policyAI disclosurePrivacyTerms

© 2026 AI Today Brief. All rights reserved.

  1. Home/
  2. News/
  3. Agents & MCP/
  4. MCP Tool Server Architecture Defines Dry-Run Previews and Prompt Injection Guards
Agents & MCP

MCP Tool Server Architecture Defines Dry-Run Previews and Prompt Injection Guards

A newly documented Model Context Protocol (MCP) server architecture establishes a deterministic 5-phase execution routine with two-phase mutation safeguards. External inputs are strictly isolated in XML untrusted content tags to neutralize prompt injection while executing dry-run previews before write actions.

August 26, 2026· 4 min read
OKCurated by Oleksandr Kuzmenko, AI Product Engineer·Updated August 26, 2026·Sources cited on every story
AI-assisted · editor-reviewed·How we use AI
MCP Tool Server Architecture Defines Dry-Run Previews and Prompt Injection Guards

Impact: Medium

Why it matters

Implement strict JSON contracts and dry-run preview steps to secure custom MCP agents against prompt injection and unintended API mutations.

TL;DR

  • 01Enforce dry-run previews before allowing MCP tools to perform mutation operations on remote databases or CRMs.
  • 02Encapsulate all external web content and API responses in <untrusted_external_content> XML blocks.
  • 03Define explicit JSON Schema output contracts to prevent structural model hallucinations during tool calls.

Key facts

Execution Protocol Phases
5 Phases (Validation, Grounding, Reasoning, Dry-Run, Output Verification)
Data Isolation Boundary
<untrusted_external_content> XML tags
Default Operational Mode
dry_run_preview

Hardened 5-Phase MCP Execution Protocol

To eliminate vulnerabilities in autonomous agents operating over MCP remote servers, the reference architecture mandates a 5-phase sequence:

1. Phase 1: Input Validation & Schema Sanitization: Validates parameters against strict JSON argument definitions. 2. Phase 2: Live Grounding: Queries connected remote_mcp and SQLite state repositories. 3. Phase 3: Deep Analytical Reasoning: Evaluates state under assigned reasoning budgets. 4. Phase 4: Two-Phase Mutation Safeguard: Requires explicit dry_run_preview generation before executing database updates or external write actions. 5. Phase 5: Output Schema Validation: Returns structured response payloads enforcing deterministic JSON contracts.

Prompt Injection Mitigation

All external data (scraped web pages, tickets, external API payloads) must be encapsulated inside explicit <untrusted_external_content> tags. Prompts explicitly instruct reasoning engines to strip embedded markdown images and treat enclosed strings strictly as passive data rather than actionable commands.

Try it in 2 minutes

# Python CLI trigger command for MCP dry-run execution
python grokbot/cli.py \
  --skill-id GROK-SKILL-273 \
  --target "Target Entity / Account" \
  --action dry_run_preview

python

✓ When to use

  • When building enterprise MCP servers that execute destructive or state-changing actions across production services.

✕ When NOT to use

  • For read-only tools that do not interact with persistent databases, external messaging APIs, or filesystem state.

What to do today

  • →Update custom MCP server handlers to support dry_run_preview parameters.
  • →Wrap untrusted text inputs inside <untrusted_external_content> tags in system prompts.
#Model Context Protocol#Grok#xAI

Sources

  • MCP Tool Server - servers Agent Routine
ShareShare on XShare on LinkedIn
← Previous storyQuantization-Aware Healing Recovers 4-Bit LLMs Beyond Full-Precision PerformanceNext story →OpenAI Restores 5-Hour Rate Limits for ChatGPT Plus Developer Subscriptions

Related stories

  • Agents & MCPDeploy Kimi K3 to Messaging Platforms via LangBot Pipelines
  • Agents & MCPIsolating Parallel AI Coding Agents into Cloud Virtual Machines
  • Agents & MCPModel Context Protocol Enterprise Pattern Mandates Dry-Run Previews and Injection Isolation
  • Agents & MCPAutomating Ground-Truth Extraction with Dual-LLM Gating and Agent Arbitration

Email digest

Get the morning AI brief

One email a day — the stories that matter for engineers, founders and tech leads. Human-edited, with links to primary sources.

  • ✓120+ sources scanned daily
  • ✓Edited by a human
  • ✓1 email per day
  • ✓EN + UA

By subscribing you agree to the privacy policy.