Model Context Protocol (MCP) server for GDSFactory+ photonic IC design
Project description
GDSFactory+ MCP Server
Model Context Protocol (MCP) server for GDSFactory+ that enables AI assistants like Claude to design and build photonic integrated circuits.
What is this?
This MCP server connects AI assistants to GDSFactory+, allowing you to design photonic ICs through natural language. Build components, run verification checks, and manage multiple projects directly from Claude Code or Claude Desktop.
Prerequisites
- Python 3.10 or higher
- VSCode with the GDSFactory+ extension installed
Installation
Choose your AI assistant below and follow the instructions.
1. Cursor
One-click install:
Manual setup:
Add to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for global access):
{
"mcpServers": {
"gdsfactoryplus": {
"command": "uvx",
"args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
}
}
}
2. Claude Code
Run the following command:
claude mcp add gdsfactoryplus -- uvx --from gfp-mcp gfp-mcp-serve
Or add to .claude/settings.json manually:
{
"mcpServers": {
"gdsfactoryplus": {
"command": "uvx",
"args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
}
}
}
3. Claude Desktop
Add to your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"gdsfactoryplus": {
"command": "uvx",
"args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
}
}
}
Restart Claude Desktop after adding the configuration.
4. Other MCP Clients
Install gfp-mcp and run the server:
uvx --from gfp-mcp gfp-mcp-serve
Or install globally first, then reference gfp-mcp-serve in your client's MCP configuration:
uv tool install gfp-mcp
Start Designing
The MCP server automatically discovers running GDSFactory+ servers via the registry (~/.gdsfactory/server-registry.json). On startup, it will log all discovered projects.
Try these commands with your AI assistant:
- "List all available photonic components"
- "Build an MZI interferometer"
- "Show me details about the directional coupler"
- "Build multiple components: mzi, coupler, and bend_euler"
- "List all my GDSFactory+ projects"
Available Tools
| Tool | Description |
|---|---|
| list_projects | List all running GDSFactory+ server instances |
| get_project_info | Get detailed information about a specific project |
| build_cells | Build one or more GDS cells by name (pass a list, can be single-item) |
| list_cells | List all available photonic components |
| get_cell_info | Get detailed component metadata |
| check_drc | Run Design Rule Check verification with structured violation reports |
| check_connectivity | Run connectivity verification |
| check_lvs | Run Layout vs. Schematic verification |
| simulate_component | Run SAX circuit simulations with custom parameters |
| list_samples | List available sample files from GDSFactory+ General PDK projects |
| get_sample_file | Get the content of a specific sample file from a project |
Multi-Project Support
The MCP server automatically discovers all running GDSFactory+ projects via the server registry (~/.gdsfactory/server-registry.json). The registry is the source of truth for available servers. Use the list_projects tool to see all running projects, then specify the project name when building components:
User: "List all my GDSFactory+ projects"
Claude: [Uses list_projects tool to show all running servers]
User: "Build the mzi component in my_photonics_project"
Claude: [Routes request to the correct project]
Troubleshooting
Server not appearing in Claude
- Verify installation:
gfp-mcp-serve --help - Check Claude Code logs:
claude --debug - Restart Claude Desktop/Code
- Ensure the GDSFactory+ VSCode extension is active and a project is open
Connection refused errors
The MCP server uses the registry (~/.gdsfactory/server-registry.json) to discover running servers.
- Use the
list_projectstool in Claude to check available servers - If no servers are found, ensure the GDSFactory+ VSCode extension is running with an active project:
- Open VSCode with the GDSFactory+ extension installed
- Open a GDSFactory+ project folder
- The extension automatically starts the server and registers it
- Check the MCP startup logs for discovered servers
- Verify the registry is accessible at
~/.gdsfactory/server-registry.json - For backward compatibility, you can set a specific server URL:
export GFP_API_URL="http://localhost:YOUR_PORT"
Tool execution timeout
Increase the timeout for long-running operations:
export GFP_MCP_TIMEOUT=600 # 10 minutes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gfp_mcp-0.3.5.tar.gz.
File metadata
- Download URL: gfp_mcp-0.3.5.tar.gz
- Upload date:
- Size: 64.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f549d5a8112dbe5d0e80c00c0ee6789708fd282d37aa51b3d98f10518ab3488b
|
|
| MD5 |
169e6bb92cc9ec9cfd21a97b57eebcf5
|
|
| BLAKE2b-256 |
037447679e87abb1df44e879b118c2a4e754b20945ddc785bed0ffdca253c422
|
Provenance
The following attestation bundles were made for gfp_mcp-0.3.5.tar.gz:
Publisher:
release.yml on doplaydo/gfp-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gfp_mcp-0.3.5.tar.gz -
Subject digest:
f549d5a8112dbe5d0e80c00c0ee6789708fd282d37aa51b3d98f10518ab3488b - Sigstore transparency entry: 962584831
- Sigstore integration time:
-
Permalink:
doplaydo/gfp-mcp@521cdac91ef8c4467f5fde3839594af73ee60053 -
Branch / Tag:
refs/tags/v0.3.5 - Owner: https://github.com/doplaydo
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@521cdac91ef8c4467f5fde3839594af73ee60053 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gfp_mcp-0.3.5-py3-none-any.whl.
File metadata
- Download URL: gfp_mcp-0.3.5-py3-none-any.whl
- Upload date:
- Size: 48.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04c2a78b96746bffaa196e9f4516166f3bd9ffbf05cdd16583590ca1a3b810e4
|
|
| MD5 |
e589067a6be35b48c4a520ddefacbfc9
|
|
| BLAKE2b-256 |
992f3ad43dfe30979f315b5e8afedf0be6f12c9e84daa7f91ec8f57642697ffa
|
Provenance
The following attestation bundles were made for gfp_mcp-0.3.5-py3-none-any.whl:
Publisher:
release.yml on doplaydo/gfp-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gfp_mcp-0.3.5-py3-none-any.whl -
Subject digest:
04c2a78b96746bffaa196e9f4516166f3bd9ffbf05cdd16583590ca1a3b810e4 - Sigstore transparency entry: 962584833
- Sigstore integration time:
-
Permalink:
doplaydo/gfp-mcp@521cdac91ef8c4467f5fde3839594af73ee60053 -
Branch / Tag:
refs/tags/v0.3.5 - Owner: https://github.com/doplaydo
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@521cdac91ef8c4467f5fde3839594af73ee60053 -
Trigger Event:
push
-
Statement type: