Tidy3D + AI πŸ’‘#

Ushering in a new era of AI-assisted photonic design

We are pleased to announce the release of the new Tidy3D Extension, which enables seamless building, visualization, and iteration on electromagnetic simulations within Visual Studio Code or Cursor. The extension automatically detects simulations in Tidy3D Python scripts and notebooks, opens an interactive 3D viewer alongside your code, and enables the IDE AI assistant to leverage the integrated FlexAgent MCP server for an intelligent, physics‑aware assistance experience.

Tidy3D Extension

Key Components#

FlexAgent MCP#

FlexAgent MCP is a physics-aware AI assistant that understands Tidy3D workflows and electromagnetic simulation concepts. Unlike generic coding assistants, FlexAgent provides specialized knowledge and can control the 3D Viewer to provide comprehensive, context-aware support.

Key Capabilities:

  • Natural Language Interaction – Build, modify, and analyze simulations using plain English

  • Physics-Aware – Understands electromagnetic simulation concepts and Tidy3D’s API

  • Learning & Troubleshooting – Get explanations and fix simulation issues

  • Code Generation – Create complete simulation setups from scratch

  • Result Analysis – Interpret and visualize simulation data

3D Viewer#

The 3D Viewer provides interactive, real-time visualization of Tidy3D simulations directly within your IDE. It automatically detects simulation objects in your code and opens alongside your editor, providing immediate visual feedback as you develop.

Key Features:

  • Automatic Detection – Identifies Simulation objects and opens automatically

  • Live Synchronization – Updates instantly when you modify code

  • Interactive Navigation – Rotate, zoom, and pan to explore simulations

  • AI-Controlled – FlexAgent can navigate and explain the 3D scene

  • Comprehensive Visualization – View structures, sources, monitors, and boundaries

Video Demos#

Watch these demonstration videos to see Tidy3D + AI capabilities in action. Each video showcases specific workflows and features that highlight how FlexAgent MCP and the 3D Viewer can accelerate your photonic design process.

For more comprehensive tutorials and the complete video series, visit our Tidy3D + AI Video Playlist.

Using Tidy3D with AI Coding Agents#

The FlexAgent MCP works with any MCP-compatible AI coding agent β€” not just the Tidy3D IDE extensions. To get started:

  1. Set up the MCP β€” follow the instructions in FlexAgent MCP β€” Standalone MCP Client for your client (Claude Code, Codex CLI, Cursor, Gemini CLI, etc.).

  2. Add a bootstrap file β€” save the markdown below as AGENTS.md (or CLAUDE.md for Claude Code) in your project root directory. This tells the agent how to use the MCP effectively.

  3. Review the simulation tips β€” the Simulation Tips for AI Agents page covers workflow patterns, parameter sweeps, inverse design, and common pitfalls.

# Tidy3D Agent Instructions

## MCP Setup

If the Tidy3D MCP server is not already configured, see:
https://docs.flexcompute.com/projects/tidy3d/en/latest/ai/flex_agent.html#standalone-mcp-client

## Workflow

Use `search_flexcompute_docs` and `fetch_flexcompute_doc` from the Tidy3D MCP as
your primary documentation source throughout the session. Before writing simulation
code:

1. Search for "Simulation Tips for AI Agents" β€” workflow patterns, pitfalls,
   and checklists.
2. Search for the relevant class docstrings β€” they contain selection guides,
   extraction patterns, and practical advice.
3. Search for example notebooks related to the device or workflow you are building.