gfp-mcp 0.3.2__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/PKG-INFO +56 -73
  2. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/README.md +55 -72
  3. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/__init__.py +1 -1
  4. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/__init__.py +4 -4
  5. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/PKG-INFO +56 -73
  6. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/pyproject.toml +1 -1
  7. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_tool_handlers.py +3 -11
  8. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_tools_init.py +2 -6
  9. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_handlers.py +0 -4
  10. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_tools.py +5 -57
  11. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/LICENSE +0 -0
  12. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/client.py +0 -0
  13. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/config.py +0 -0
  14. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/registry.py +0 -0
  15. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/render.py +0 -0
  16. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/resources.py +0 -0
  17. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/samples.py +0 -0
  18. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/server.py +0 -0
  19. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/base.py +0 -0
  20. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/bbox.py +0 -0
  21. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/build.py +0 -0
  22. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/cells.py +0 -0
  23. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/connectivity.py +0 -0
  24. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/drc.py +0 -0
  25. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/freeze.py +0 -0
  26. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/lvs.py +0 -0
  27. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/pdk.py +0 -0
  28. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/port.py +0 -0
  29. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/project.py +0 -0
  30. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/samples.py +0 -0
  31. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/simulation.py +0 -0
  32. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/utils.py +0 -0
  33. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/SOURCES.txt +0 -0
  34. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/dependency_links.txt +0 -0
  35. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/entry_points.txt +0 -0
  36. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/requires.txt +0 -0
  37. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/top_level.txt +0 -0
  38. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/setup.cfg +0 -0
  39. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_phase4.py +0 -0
  40. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_server.py +0 -0
  41. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_tools_base.py +0 -0
  42. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_utils.py +0 -0
  43. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_config.py +0 -0
  44. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_integration.py +0 -0
  45. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_render.py +0 -0
  46. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_samples.py +0 -0
  47. {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_registry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gfp-mcp
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Model Context Protocol (MCP) server for GDSFactory+ photonic IC design
5
5
  Author: GDSFactory+ Team
6
6
  License: MIT
@@ -44,7 +44,6 @@ Dynamic: license-file
44
44
 
45
45
  [![PyPI version](https://img.shields.io/pypi/v/gfp-mcp.svg)](https://pypi.org/project/gfp-mcp/)
46
46
  [![Python versions](https://img.shields.io/pypi/pyversions/gfp-mcp.svg)](https://pypi.org/project/gfp-mcp/)
47
- [![Tests](https://github.com/doplaydo/gfp-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/doplaydo/gfp-mcp/actions)
48
47
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
49
48
 
50
49
  Model Context Protocol (MCP) server for GDSFactory+ that enables AI assistants like Claude to design and build photonic integrated circuits.
@@ -53,88 +52,71 @@ Model Context Protocol (MCP) server for GDSFactory+ that enables AI assistants l
53
52
 
54
53
  This MCP server connects AI assistants to [GDSFactory+](https://gdsfactory.com), 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.
55
54
 
56
- ## Quick Start
57
-
58
- ### 1. Install Prerequisites
55
+ ## Prerequisites
59
56
 
60
57
  - Python 3.10 or higher
61
58
  - VSCode with the [GDSFactory+ extension](https://marketplace.visualstudio.com/items?itemName=gdsfactory.gdsfactoryplus) installed
62
59
 
63
- ### 2. Install the MCP Server
60
+ ## Installation
64
61
 
65
- **With uv (recommended):**
62
+ Choose your AI assistant below and follow the instructions.
66
63
 
67
- If you don't have `uv` installed, see the [uv installation guide](https://docs.astral.sh/uv/getting-started/installation/).
64
+ ### 1. Cursor
68
65
 
69
- ```bash
70
- uv tool install gfp-mcp
71
- ```
66
+ **One-click install:**
72
67
 
73
- <details>
74
- <summary>Ephemeral approach</summary>
68
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](cursor://anysphere.cursor-deeplink/mcp/install?name=gdsfactoryplus&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnZnAtbWNwIiwiZ2ZwLW1jcC1zZXJ2ZSJdfQ%3D%3D)
75
69
 
76
- Run without installing:
70
+ **Manual setup:**
77
71
 
78
- ```bash
79
- uvx --from gfp-mcp gfp-mcp-serve
80
- ```
81
- </details>
82
-
83
- <details>
84
- <summary><strong>Alternative: pip install</strong></summary>
72
+ Add to `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` for global access):
85
73
 
86
- ```bash
87
- pip install gfp-mcp
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "gdsfactoryplus": {
78
+ "command": "uvx",
79
+ "args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
80
+ }
81
+ }
82
+ }
88
83
  ```
89
84
 
90
- </details>
85
+ ### 2. Claude Code
91
86
 
92
- ### 3. Connect to Your AI Assistant
87
+ Run the following command:
93
88
 
94
- <details>
95
- <summary><strong>Claude Code</strong></summary>
89
+ ```bash
90
+ claude mcp add gdsfactoryplus -- uvx --from gfp-mcp gfp-mcp-serve
91
+ ```
96
92
 
97
- Add to `.claude/settings.json`:
93
+ Or add to `.claude/settings.json` manually:
98
94
 
99
95
  ```json
100
96
  {
101
97
  "mcpServers": {
102
98
  "gdsfactoryplus": {
103
- "command": "gfp-mcp-serve",
104
- "args": [],
105
- "env": {
106
- "GFP_API_URL": "http://localhost:8787"
107
- }
99
+ "command": "uvx",
100
+ "args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
108
101
  }
109
102
  }
110
103
  }
111
104
  ```
112
105
 
113
- Or use the CLI:
114
-
115
- ```bash
116
- claude mcp add gdsfactoryplus -- gfp-mcp-serve
117
- ```
118
-
119
- </details>
120
-
121
- <details>
122
- <summary><strong>Claude Desktop</strong></summary>
106
+ ### 3. Claude Desktop
123
107
 
124
108
  Add to your config file:
125
109
 
126
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
127
-
128
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
129
-
130
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
110
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
111
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
112
+ - **Linux**: `~/.config/Claude/claude_desktop_config.json`
131
113
 
132
114
  ```json
133
115
  {
134
116
  "mcpServers": {
135
117
  "gdsfactoryplus": {
136
- "command": "gfp-mcp-serve",
137
- "args": []
118
+ "command": "uvx",
119
+ "args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
138
120
  }
139
121
  }
140
122
  }
@@ -142,16 +124,21 @@ Add to your config file:
142
124
 
143
125
  Restart Claude Desktop after adding the configuration.
144
126
 
145
- </details>
127
+ ### 4. Other MCP Clients
146
128
 
147
- <details>
148
- <summary><strong>Cursor</strong></summary>
129
+ Install `gfp-mcp` and run the server:
130
+
131
+ ```bash
132
+ uvx --from gfp-mcp gfp-mcp-serve
133
+ ```
149
134
 
150
- Coming soon. Follow the MCP integration instructions for Cursor when available.
135
+ Or install globally first, then reference `gfp-mcp-serve` in your client's MCP configuration:
151
136
 
152
- </details>
137
+ ```bash
138
+ uv tool install gfp-mcp
139
+ ```
153
140
 
154
- ### 4. Start Designing
141
+ ## Start Designing
155
142
 
156
143
  The MCP server automatically discovers running GDSFactory+ servers via the registry (`~/.gdsfactory/server-registry.json`). On startup, it will log all discovered projects.
157
144
 
@@ -165,23 +152,19 @@ Try these commands with your AI assistant:
165
152
 
166
153
  ## Available Tools
167
154
 
168
- - **build_cells** - Build one or more GDS cells by name (pass a list, can be single-item)
169
- - **list_cells** - List all available photonic components
170
- - **get_cell_info** - Get detailed component metadata
171
- - **list_projects** - List all running GDSFactory+ server instances
172
- - **get_project_info** - Get detailed information about a specific project
173
- - **check_drc** - Run Design Rule Check verification (returns structured format with all violations including simplified location data for LLM-friendly troubleshooting)
174
- - **check_connectivity** - Run connectivity verification
175
- - **check_lvs** - Run Layout vs. Schematic verification
176
- - **simulate_component** - Run SAX circuit simulations with custom parameters
177
- - Basic: `{"name": "mzi"}` - Simulate with default parameters
178
- - Custom layout: `{"name": "mzi", "layout": {"length_mmi": 12, "gap_mmi": 0.3}}` - Customize component geometry
179
- - Wavelength sweep: `{"name": "coupler", "model": {"wl": [1.5, 1.55, 1.6]}}` - Simulate at multiple wavelengths
180
- - Full example: `{"name": "mzi", "layout": {"length": 100}, "model": {"wl": [1.5, 1.55, 1.6], "loss": 0.2}, "how": "from_layout"}`
181
- - **get_port_center** - Get physical coordinates of component ports
182
- - **generate_bbox** - Generate bounding box GDS from layout
183
- - **freeze_cell** - Freeze parametric cell as static netlist
184
- - **get_pdk_info** - Get current PDK information
155
+ | Tool | Description |
156
+ |------|-------------|
157
+ | **list_projects** | List all running GDSFactory+ server instances |
158
+ | **get_project_info** | Get detailed information about a specific project |
159
+ | **build_cells** | Build one or more GDS cells by name (pass a list, can be single-item) |
160
+ | **list_cells** | List all available photonic components |
161
+ | **get_cell_info** | Get detailed component metadata |
162
+ | **check_drc** | Run Design Rule Check verification with structured violation reports |
163
+ | **check_connectivity** | Run connectivity verification |
164
+ | **check_lvs** | Run Layout vs. Schematic verification |
165
+ | **simulate_component** | Run SAX circuit simulations with custom parameters |
166
+ | **list_samples** | List available sample files from GDSFactory+ General PDK projects |
167
+ | **get_sample_file** | Get the content of a specific sample file from a project |
185
168
 
186
169
  ## Multi-Project Support
187
170
 
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![PyPI version](https://img.shields.io/pypi/v/gfp-mcp.svg)](https://pypi.org/project/gfp-mcp/)
4
4
  [![Python versions](https://img.shields.io/pypi/pyversions/gfp-mcp.svg)](https://pypi.org/project/gfp-mcp/)
5
- [![Tests](https://github.com/doplaydo/gfp-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/doplaydo/gfp-mcp/actions)
6
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
6
 
8
7
  Model Context Protocol (MCP) server for GDSFactory+ that enables AI assistants like Claude to design and build photonic integrated circuits.
@@ -11,88 +10,71 @@ Model Context Protocol (MCP) server for GDSFactory+ that enables AI assistants l
11
10
 
12
11
  This MCP server connects AI assistants to [GDSFactory+](https://gdsfactory.com), 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.
13
12
 
14
- ## Quick Start
15
-
16
- ### 1. Install Prerequisites
13
+ ## Prerequisites
17
14
 
18
15
  - Python 3.10 or higher
19
16
  - VSCode with the [GDSFactory+ extension](https://marketplace.visualstudio.com/items?itemName=gdsfactory.gdsfactoryplus) installed
20
17
 
21
- ### 2. Install the MCP Server
18
+ ## Installation
22
19
 
23
- **With uv (recommended):**
20
+ Choose your AI assistant below and follow the instructions.
24
21
 
25
- If you don't have `uv` installed, see the [uv installation guide](https://docs.astral.sh/uv/getting-started/installation/).
22
+ ### 1. Cursor
26
23
 
27
- ```bash
28
- uv tool install gfp-mcp
29
- ```
24
+ **One-click install:**
30
25
 
31
- <details>
32
- <summary>Ephemeral approach</summary>
26
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](cursor://anysphere.cursor-deeplink/mcp/install?name=gdsfactoryplus&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnZnAtbWNwIiwiZ2ZwLW1jcC1zZXJ2ZSJdfQ%3D%3D)
33
27
 
34
- Run without installing:
28
+ **Manual setup:**
35
29
 
36
- ```bash
37
- uvx --from gfp-mcp gfp-mcp-serve
38
- ```
39
- </details>
40
-
41
- <details>
42
- <summary><strong>Alternative: pip install</strong></summary>
30
+ Add to `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` for global access):
43
31
 
44
- ```bash
45
- pip install gfp-mcp
32
+ ```json
33
+ {
34
+ "mcpServers": {
35
+ "gdsfactoryplus": {
36
+ "command": "uvx",
37
+ "args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
38
+ }
39
+ }
40
+ }
46
41
  ```
47
42
 
48
- </details>
43
+ ### 2. Claude Code
49
44
 
50
- ### 3. Connect to Your AI Assistant
45
+ Run the following command:
51
46
 
52
- <details>
53
- <summary><strong>Claude Code</strong></summary>
47
+ ```bash
48
+ claude mcp add gdsfactoryplus -- uvx --from gfp-mcp gfp-mcp-serve
49
+ ```
54
50
 
55
- Add to `.claude/settings.json`:
51
+ Or add to `.claude/settings.json` manually:
56
52
 
57
53
  ```json
58
54
  {
59
55
  "mcpServers": {
60
56
  "gdsfactoryplus": {
61
- "command": "gfp-mcp-serve",
62
- "args": [],
63
- "env": {
64
- "GFP_API_URL": "http://localhost:8787"
65
- }
57
+ "command": "uvx",
58
+ "args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
66
59
  }
67
60
  }
68
61
  }
69
62
  ```
70
63
 
71
- Or use the CLI:
72
-
73
- ```bash
74
- claude mcp add gdsfactoryplus -- gfp-mcp-serve
75
- ```
76
-
77
- </details>
78
-
79
- <details>
80
- <summary><strong>Claude Desktop</strong></summary>
64
+ ### 3. Claude Desktop
81
65
 
82
66
  Add to your config file:
83
67
 
84
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
85
-
86
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
87
-
88
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
68
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
69
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
70
+ - **Linux**: `~/.config/Claude/claude_desktop_config.json`
89
71
 
90
72
  ```json
91
73
  {
92
74
  "mcpServers": {
93
75
  "gdsfactoryplus": {
94
- "command": "gfp-mcp-serve",
95
- "args": []
76
+ "command": "uvx",
77
+ "args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
96
78
  }
97
79
  }
98
80
  }
@@ -100,16 +82,21 @@ Add to your config file:
100
82
 
101
83
  Restart Claude Desktop after adding the configuration.
102
84
 
103
- </details>
85
+ ### 4. Other MCP Clients
104
86
 
105
- <details>
106
- <summary><strong>Cursor</strong></summary>
87
+ Install `gfp-mcp` and run the server:
88
+
89
+ ```bash
90
+ uvx --from gfp-mcp gfp-mcp-serve
91
+ ```
107
92
 
108
- Coming soon. Follow the MCP integration instructions for Cursor when available.
93
+ Or install globally first, then reference `gfp-mcp-serve` in your client's MCP configuration:
109
94
 
110
- </details>
95
+ ```bash
96
+ uv tool install gfp-mcp
97
+ ```
111
98
 
112
- ### 4. Start Designing
99
+ ## Start Designing
113
100
 
114
101
  The MCP server automatically discovers running GDSFactory+ servers via the registry (`~/.gdsfactory/server-registry.json`). On startup, it will log all discovered projects.
115
102
 
@@ -123,23 +110,19 @@ Try these commands with your AI assistant:
123
110
 
124
111
  ## Available Tools
125
112
 
126
- - **build_cells** - Build one or more GDS cells by name (pass a list, can be single-item)
127
- - **list_cells** - List all available photonic components
128
- - **get_cell_info** - Get detailed component metadata
129
- - **list_projects** - List all running GDSFactory+ server instances
130
- - **get_project_info** - Get detailed information about a specific project
131
- - **check_drc** - Run Design Rule Check verification (returns structured format with all violations including simplified location data for LLM-friendly troubleshooting)
132
- - **check_connectivity** - Run connectivity verification
133
- - **check_lvs** - Run Layout vs. Schematic verification
134
- - **simulate_component** - Run SAX circuit simulations with custom parameters
135
- - Basic: `{"name": "mzi"}` - Simulate with default parameters
136
- - Custom layout: `{"name": "mzi", "layout": {"length_mmi": 12, "gap_mmi": 0.3}}` - Customize component geometry
137
- - Wavelength sweep: `{"name": "coupler", "model": {"wl": [1.5, 1.55, 1.6]}}` - Simulate at multiple wavelengths
138
- - Full example: `{"name": "mzi", "layout": {"length": 100}, "model": {"wl": [1.5, 1.55, 1.6], "loss": 0.2}, "how": "from_layout"}`
139
- - **get_port_center** - Get physical coordinates of component ports
140
- - **generate_bbox** - Generate bounding box GDS from layout
141
- - **freeze_cell** - Freeze parametric cell as static netlist
142
- - **get_pdk_info** - Get current PDK information
113
+ | Tool | Description |
114
+ |------|-------------|
115
+ | **list_projects** | List all running GDSFactory+ server instances |
116
+ | **get_project_info** | Get detailed information about a specific project |
117
+ | **build_cells** | Build one or more GDS cells by name (pass a list, can be single-item) |
118
+ | **list_cells** | List all available photonic components |
119
+ | **get_cell_info** | Get detailed component metadata |
120
+ | **check_drc** | Run Design Rule Check verification with structured violation reports |
121
+ | **check_connectivity** | Run connectivity verification |
122
+ | **check_lvs** | Run Layout vs. Schematic verification |
123
+ | **simulate_component** | Run SAX circuit simulations with custom parameters |
124
+ | **list_samples** | List available sample files from GDSFactory+ General PDK projects |
125
+ | **get_sample_file** | Get the content of a specific sample file from a project |
143
126
 
144
127
  ## Multi-Project Support
145
128
 
@@ -41,4 +41,4 @@ __all__ = [
41
41
  "get_resource_content",
42
42
  ]
43
43
 
44
- __version__ = "0.3.2"
44
+ __version__ = "0.3.3"
@@ -85,10 +85,10 @@ def _create_handler_registry() -> dict[str, ToolHandler]:
85
85
  CheckLvsHandler(),
86
86
  # Advanced tools
87
87
  SimulateComponentHandler(),
88
- GetPortCenterHandler(),
89
- GenerateBboxHandler(),
90
- FreezeCellHandler(),
91
- GetPdkInfoHandler(),
88
+ # GetPortCenterHandler(), # Commented out because so far unused.
89
+ # GenerateBboxHandler(),
90
+ # FreezeCellHandler(),
91
+ # GetPdkInfoHandler(),
92
92
  # Sample project tools
93
93
  ListSamplesHandler(),
94
94
  GetSampleFileHandler(),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gfp-mcp
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Model Context Protocol (MCP) server for GDSFactory+ photonic IC design
5
5
  Author: GDSFactory+ Team
6
6
  License: MIT
@@ -44,7 +44,6 @@ Dynamic: license-file
44
44
 
45
45
  [![PyPI version](https://img.shields.io/pypi/v/gfp-mcp.svg)](https://pypi.org/project/gfp-mcp/)
46
46
  [![Python versions](https://img.shields.io/pypi/pyversions/gfp-mcp.svg)](https://pypi.org/project/gfp-mcp/)
47
- [![Tests](https://github.com/doplaydo/gfp-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/doplaydo/gfp-mcp/actions)
48
47
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
49
48
 
50
49
  Model Context Protocol (MCP) server for GDSFactory+ that enables AI assistants like Claude to design and build photonic integrated circuits.
@@ -53,88 +52,71 @@ Model Context Protocol (MCP) server for GDSFactory+ that enables AI assistants l
53
52
 
54
53
  This MCP server connects AI assistants to [GDSFactory+](https://gdsfactory.com), 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.
55
54
 
56
- ## Quick Start
57
-
58
- ### 1. Install Prerequisites
55
+ ## Prerequisites
59
56
 
60
57
  - Python 3.10 or higher
61
58
  - VSCode with the [GDSFactory+ extension](https://marketplace.visualstudio.com/items?itemName=gdsfactory.gdsfactoryplus) installed
62
59
 
63
- ### 2. Install the MCP Server
60
+ ## Installation
64
61
 
65
- **With uv (recommended):**
62
+ Choose your AI assistant below and follow the instructions.
66
63
 
67
- If you don't have `uv` installed, see the [uv installation guide](https://docs.astral.sh/uv/getting-started/installation/).
64
+ ### 1. Cursor
68
65
 
69
- ```bash
70
- uv tool install gfp-mcp
71
- ```
66
+ **One-click install:**
72
67
 
73
- <details>
74
- <summary>Ephemeral approach</summary>
68
+ [![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](cursor://anysphere.cursor-deeplink/mcp/install?name=gdsfactoryplus&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnZnAtbWNwIiwiZ2ZwLW1jcC1zZXJ2ZSJdfQ%3D%3D)
75
69
 
76
- Run without installing:
70
+ **Manual setup:**
77
71
 
78
- ```bash
79
- uvx --from gfp-mcp gfp-mcp-serve
80
- ```
81
- </details>
82
-
83
- <details>
84
- <summary><strong>Alternative: pip install</strong></summary>
72
+ Add to `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` for global access):
85
73
 
86
- ```bash
87
- pip install gfp-mcp
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "gdsfactoryplus": {
78
+ "command": "uvx",
79
+ "args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
80
+ }
81
+ }
82
+ }
88
83
  ```
89
84
 
90
- </details>
85
+ ### 2. Claude Code
91
86
 
92
- ### 3. Connect to Your AI Assistant
87
+ Run the following command:
93
88
 
94
- <details>
95
- <summary><strong>Claude Code</strong></summary>
89
+ ```bash
90
+ claude mcp add gdsfactoryplus -- uvx --from gfp-mcp gfp-mcp-serve
91
+ ```
96
92
 
97
- Add to `.claude/settings.json`:
93
+ Or add to `.claude/settings.json` manually:
98
94
 
99
95
  ```json
100
96
  {
101
97
  "mcpServers": {
102
98
  "gdsfactoryplus": {
103
- "command": "gfp-mcp-serve",
104
- "args": [],
105
- "env": {
106
- "GFP_API_URL": "http://localhost:8787"
107
- }
99
+ "command": "uvx",
100
+ "args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
108
101
  }
109
102
  }
110
103
  }
111
104
  ```
112
105
 
113
- Or use the CLI:
114
-
115
- ```bash
116
- claude mcp add gdsfactoryplus -- gfp-mcp-serve
117
- ```
118
-
119
- </details>
120
-
121
- <details>
122
- <summary><strong>Claude Desktop</strong></summary>
106
+ ### 3. Claude Desktop
123
107
 
124
108
  Add to your config file:
125
109
 
126
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
127
-
128
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
129
-
130
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
110
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
111
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
112
+ - **Linux**: `~/.config/Claude/claude_desktop_config.json`
131
113
 
132
114
  ```json
133
115
  {
134
116
  "mcpServers": {
135
117
  "gdsfactoryplus": {
136
- "command": "gfp-mcp-serve",
137
- "args": []
118
+ "command": "uvx",
119
+ "args": ["--from", "gfp-mcp", "gfp-mcp-serve"]
138
120
  }
139
121
  }
140
122
  }
@@ -142,16 +124,21 @@ Add to your config file:
142
124
 
143
125
  Restart Claude Desktop after adding the configuration.
144
126
 
145
- </details>
127
+ ### 4. Other MCP Clients
146
128
 
147
- <details>
148
- <summary><strong>Cursor</strong></summary>
129
+ Install `gfp-mcp` and run the server:
130
+
131
+ ```bash
132
+ uvx --from gfp-mcp gfp-mcp-serve
133
+ ```
149
134
 
150
- Coming soon. Follow the MCP integration instructions for Cursor when available.
135
+ Or install globally first, then reference `gfp-mcp-serve` in your client's MCP configuration:
151
136
 
152
- </details>
137
+ ```bash
138
+ uv tool install gfp-mcp
139
+ ```
153
140
 
154
- ### 4. Start Designing
141
+ ## Start Designing
155
142
 
156
143
  The MCP server automatically discovers running GDSFactory+ servers via the registry (`~/.gdsfactory/server-registry.json`). On startup, it will log all discovered projects.
157
144
 
@@ -165,23 +152,19 @@ Try these commands with your AI assistant:
165
152
 
166
153
  ## Available Tools
167
154
 
168
- - **build_cells** - Build one or more GDS cells by name (pass a list, can be single-item)
169
- - **list_cells** - List all available photonic components
170
- - **get_cell_info** - Get detailed component metadata
171
- - **list_projects** - List all running GDSFactory+ server instances
172
- - **get_project_info** - Get detailed information about a specific project
173
- - **check_drc** - Run Design Rule Check verification (returns structured format with all violations including simplified location data for LLM-friendly troubleshooting)
174
- - **check_connectivity** - Run connectivity verification
175
- - **check_lvs** - Run Layout vs. Schematic verification
176
- - **simulate_component** - Run SAX circuit simulations with custom parameters
177
- - Basic: `{"name": "mzi"}` - Simulate with default parameters
178
- - Custom layout: `{"name": "mzi", "layout": {"length_mmi": 12, "gap_mmi": 0.3}}` - Customize component geometry
179
- - Wavelength sweep: `{"name": "coupler", "model": {"wl": [1.5, 1.55, 1.6]}}` - Simulate at multiple wavelengths
180
- - Full example: `{"name": "mzi", "layout": {"length": 100}, "model": {"wl": [1.5, 1.55, 1.6], "loss": 0.2}, "how": "from_layout"}`
181
- - **get_port_center** - Get physical coordinates of component ports
182
- - **generate_bbox** - Generate bounding box GDS from layout
183
- - **freeze_cell** - Freeze parametric cell as static netlist
184
- - **get_pdk_info** - Get current PDK information
155
+ | Tool | Description |
156
+ |------|-------------|
157
+ | **list_projects** | List all running GDSFactory+ server instances |
158
+ | **get_project_info** | Get detailed information about a specific project |
159
+ | **build_cells** | Build one or more GDS cells by name (pass a list, can be single-item) |
160
+ | **list_cells** | List all available photonic components |
161
+ | **get_cell_info** | Get detailed component metadata |
162
+ | **check_drc** | Run Design Rule Check verification with structured violation reports |
163
+ | **check_connectivity** | Run connectivity verification |
164
+ | **check_lvs** | Run Layout vs. Schematic verification |
165
+ | **simulate_component** | Run SAX circuit simulations with custom parameters |
166
+ | **list_samples** | List available sample files from GDSFactory+ General PDK projects |
167
+ | **get_sample_file** | Get the content of a specific sample file from a project |
185
168
 
186
169
  ## Multi-Project Support
187
170
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gfp-mcp"
7
- version = "0.3.2"
7
+ version = "0.3.3"
8
8
  description = "Model Context Protocol (MCP) server for GDSFactory+ photonic IC design"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -35,13 +35,13 @@ class TestToolRegistry:
35
35
  """Test the tool handler registry."""
36
36
 
37
37
  def test_all_handlers_registered(self) -> None:
38
- """Test that all 15 handlers are registered."""
39
- assert len(TOOL_HANDLERS) == 15
38
+ """Test that all active handlers are registered."""
39
+ assert len(TOOL_HANDLERS) == 11
40
40
 
41
41
  def test_get_all_tools_returns_correct_count(self) -> None:
42
42
  """Test that get_all_tools returns all tool definitions."""
43
43
  tools = get_all_tools()
44
- assert len(tools) == 15
44
+ assert len(tools) == 11
45
45
 
46
46
  def test_get_handler_returns_correct_types(self) -> None:
47
47
  """Test that get_handler returns correct handler types."""
@@ -54,10 +54,6 @@ class TestToolRegistry:
54
54
  assert isinstance(get_handler("check_connectivity"), CheckConnectivityHandler)
55
55
  assert isinstance(get_handler("check_lvs"), CheckLvsHandler)
56
56
  assert isinstance(get_handler("simulate_component"), SimulateComponentHandler)
57
- assert isinstance(get_handler("get_port_center"), GetPortCenterHandler)
58
- assert isinstance(get_handler("generate_bbox"), GenerateBboxHandler)
59
- assert isinstance(get_handler("freeze_cell"), FreezeCellHandler)
60
- assert isinstance(get_handler("get_pdk_info"), GetPdkInfoHandler)
61
57
 
62
58
  def test_get_handler_nonexistent(self) -> None:
63
59
  """Test that get_handler returns None for nonexistent tool."""
@@ -584,10 +580,6 @@ class TestSchemaConsistency:
584
580
  "check_connectivity",
585
581
  "check_lvs",
586
582
  "simulate_component",
587
- "get_port_center",
588
- "generate_bbox",
589
- "freeze_cell",
590
- "get_pdk_info",
591
583
  ]
592
584
 
593
585
  for tool_name in http_tools:
@@ -88,15 +88,11 @@ class TestToolHandlersRegistry:
88
88
  "check_connectivity",
89
89
  "check_lvs",
90
90
  "simulate_component",
91
- "get_port_center",
92
- "generate_bbox",
93
- "freeze_cell",
94
- "get_pdk_info",
95
91
  "list_samples",
96
92
  "get_sample_file",
97
93
  }
98
94
  assert set(TOOL_HANDLERS.keys()) == expected_tools
99
- assert len(TOOL_HANDLERS) == 15
95
+ assert len(TOOL_HANDLERS) == 11
100
96
 
101
97
 
102
98
  class TestGetAllTools:
@@ -110,7 +106,7 @@ class TestGetAllTools:
110
106
  def test_returns_all_tools(self) -> None:
111
107
  """Test returns all registered tools."""
112
108
  result = get_all_tools()
113
- assert len(result) == 15
109
+ assert len(result) == 11
114
110
  # Verify they are Tool objects
115
111
  for tool in result:
116
112
  assert hasattr(tool, "name")
@@ -34,10 +34,6 @@ def test_all_tools_have_handlers() -> None:
34
34
  "check_connectivity",
35
35
  "check_lvs",
36
36
  "simulate_component",
37
- "get_port_center",
38
- "generate_bbox",
39
- "freeze_cell",
40
- "get_pdk_info",
41
37
  ]
42
38
  for tool_name in expected_tools:
43
39
  handler = get_handler(tool_name)
@@ -16,7 +16,9 @@ def test_get_all_tools() -> None:
16
16
  """Test getting all tools."""
17
17
  tools = get_all_tools()
18
18
  assert isinstance(tools, list)
19
- assert len(tools) >= 13 # 2 project + 3 core + 3 verification + 5 advanced tools
19
+ assert (
20
+ len(tools) >= 11
21
+ ) # 2 project + 3 core + 3 verification + 1 advanced + 2 sample tools
20
22
 
21
23
 
22
24
  def test_core_tools_exist() -> None:
@@ -148,13 +150,9 @@ def test_check_drc_schema() -> None:
148
150
 
149
151
 
150
152
  def test_advanced_tools_exist() -> None:
151
- """Test that all Phase 4 advanced tools are defined."""
153
+ """Test that all active advanced tools are defined."""
152
154
  expected_tools = [
153
155
  "simulate_component",
154
- "get_port_center",
155
- "generate_bbox",
156
- "freeze_cell",
157
- "get_pdk_info",
158
156
  ]
159
157
  for expected in expected_tools:
160
158
  handler = get_handler(expected)
@@ -185,60 +183,10 @@ def test_simulate_component_schema() -> None:
185
183
  assert schema["required"] == ["name"]
186
184
 
187
185
 
188
- def test_get_port_center_schema() -> None:
189
- """Test get_port_center tool schema."""
190
- tool = get_tool_by_name("get_port_center")
191
- assert tool is not None
192
-
193
- schema = tool.inputSchema
194
- assert "netlist" in schema["properties"]
195
- assert "instance" in schema["properties"]
196
- assert "port" in schema["properties"]
197
- assert "netlist" in schema["required"]
198
- assert "instance" in schema["required"]
199
- assert "port" in schema["required"]
200
-
201
-
202
- def test_generate_bbox_schema() -> None:
203
- """Test generate_bbox tool schema."""
204
- tool = get_tool_by_name("generate_bbox")
205
- assert tool is not None
206
-
207
- schema = tool.inputSchema
208
- assert "path" in schema["properties"]
209
- assert "outpath" in schema["properties"]
210
- assert "layers_to_keep" in schema["properties"]
211
- assert "bbox_layer" in schema["properties"]
212
- assert "ignore_ports" in schema["properties"]
213
- assert "path" in schema["required"]
214
- assert "outpath" not in schema.get("required", [])
215
-
216
-
217
- def test_freeze_cell_schema() -> None:
218
- """Test freeze_cell tool schema."""
219
- tool = get_tool_by_name("freeze_cell")
220
- assert tool is not None
221
-
222
- schema = tool.inputSchema
223
- assert "cell_name" in schema["properties"]
224
- assert "kwargs" in schema["properties"]
225
- assert "cell_name" in schema["required"]
226
- assert "kwargs" not in schema.get("required", [])
227
-
228
-
229
- def test_get_pdk_info_schema() -> None:
230
- """Test get_pdk_info tool schema."""
231
- tool = get_tool_by_name("get_pdk_info")
232
- assert tool is not None
233
-
234
- schema = tool.inputSchema
235
- assert "properties" in schema
236
-
237
-
238
186
  def test_tool_handlers_registry() -> None:
239
187
  """Test that TOOL_HANDLERS contains all expected handlers."""
240
188
  assert isinstance(TOOL_HANDLERS, dict)
241
- assert len(TOOL_HANDLERS) >= 13
189
+ assert len(TOOL_HANDLERS) >= 11
242
190
 
243
191
  # Verify all handlers have correct names
244
192
  for name, handler in TOOL_HANDLERS.items():
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes