Tidy3D is a software package for solving extremely large electrodynamics problems using the finite-difference time-domain (FDTD) method. It can be controlled through either an open source python package or a web-based graphical user interface.
This repository contains the python API to allow you to:
- Programmatically define FDTD simulations.
- Submit and manage simulations running on Flexcompute's servers.
- Download and postprocess the results from the simulations.
Note that while this front end package is open source, to run simulations on Flexcompute servers requires an account with credits. You can sign up for an account here. After that, you can install the front end with the instructions below, or visit this page in our documentation for more details.
To install the Tidy3D Python API locally, the following instructions should work for most users.
pip install --user tidy3d
tidy3d configure --apikey=XXX
Where XXX is your API key, which can be copied from your account page in the web interface.
In a hosted jupyter notebook environment (eg google colab), it may be more convenient to install and configure via the following lines at the top of the notebook.
!pip install tidy3d
import tidy3d.web as web
web.configure("XXX")
Advanced installation instructions for all platforms is available in the documentation installation guides.
To test the authentication, you may try importing the web interface via.
python -c "import tidy3d; tidy3d.web.test()"
It should pass without any errors if the API key is set up correctly.
To get started, our documentation has a lot of examples for inspiration.
| API Resource | URL |
|---|---|
| Installation Guide | https://docs.flexcompute.com/projects/tidy3d/en/latest/install.html |
| Documentation | https://docs.flexcompute.com/projects/tidy3d/en/latest/index.html |
| Example Library | https://docs.flexcompute.com/projects/tidy3d/en/latest/notebooks/docs/index.html |
| FAQ | https://docs.flexcompute.com/projects/tidy3d/en/latest/faq/docs/index.html |
FlexAgent adds an AI-assisted layer on top of Tidy3D via the Model Context Protocol (MCP); read more about AI-assisted simulation in Tidy3D. Install tidy3d-mcp directly when you want that experience outside the Tidy3D extensions for Visual Studio Code and Cursor. This repo also ships native plugin packaging for Claude Code and Gemini CLI.
These commands assume uv is installed on your machine.
Codex CLI / IDE
codex mcp add tidy3d -- uvx tidy3d-mcpClaude Code
Add the Tidy3D marketplace, then install the plugin:
claude plugin marketplace add https://github.com/flexcompute/tidy3d
claude plugin install tidy3d@tidy3dGemini CLI
Install the extension from this repo:
gemini extensions install https://github.com/flexcompute/tidy3dCursor CLI / IDE
Cursor reuses the same schema across the editor and cursor-agent. Configure .cursor/mcp.json (per-project) or ~/.cursor/mcp.json (global) and then run cursor-agent mcp list to verify:
{
"mcpServers": {
"tidy3d": {
"command": "uvx",
"args": ["tidy3d-mcp"]
}
}
}| Name | Repository |
|---|---|
| Source Code | https://github.com/flexcompute/tidy3d |
| Notebooks Source | https://github.com/flexcompute/tidy3d-notebooks |
| FAQ Source Code | https://github.com/flexcompute/tidy3d-faq |
Your feedback helps us immensely!
If you find bugs, file an Issue. For more general discussions, questions, comments, anything else, open a topic in the Discussions Tab.
