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.
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/PKG-INFO +56 -73
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/README.md +55 -72
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/__init__.py +1 -1
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/__init__.py +4 -4
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/PKG-INFO +56 -73
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/pyproject.toml +1 -1
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_tool_handlers.py +3 -11
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_tools_init.py +2 -6
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_handlers.py +0 -4
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_tools.py +5 -57
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/LICENSE +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/client.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/config.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/registry.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/render.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/resources.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/samples.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/server.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/base.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/bbox.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/build.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/cells.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/connectivity.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/drc.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/freeze.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/lvs.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/pdk.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/port.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/project.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/samples.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/tools/simulation.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp/utils.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/SOURCES.txt +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/dependency_links.txt +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/entry_points.txt +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/requires.txt +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/gfp_mcp.egg-info/top_level.txt +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/setup.cfg +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_phase4.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_server.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_tools_base.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_gfp_utils.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_config.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_integration.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_render.py +0 -0
- {gfp_mcp-0.3.2 → gfp_mcp-0.3.3}/tests/test_mcp_samples.py +0 -0
- {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.
|
|
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
|
[](https://pypi.org/project/gfp-mcp/)
|
|
46
46
|
[](https://pypi.org/project/gfp-mcp/)
|
|
47
|
-
[](https://github.com/doplaydo/gfp-mcp/actions)
|
|
48
47
|
[](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
|
-
##
|
|
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
|
-
|
|
60
|
+
## Installation
|
|
64
61
|
|
|
65
|
-
|
|
62
|
+
Choose your AI assistant below and follow the instructions.
|
|
66
63
|
|
|
67
|
-
|
|
64
|
+
### 1. Cursor
|
|
68
65
|
|
|
69
|
-
|
|
70
|
-
uv tool install gfp-mcp
|
|
71
|
-
```
|
|
66
|
+
**One-click install:**
|
|
72
67
|
|
|
73
|
-
|
|
74
|
-
<summary>Ephemeral approach</summary>
|
|
68
|
+
[](cursor://anysphere.cursor-deeplink/mcp/install?name=gdsfactoryplus&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnZnAtbWNwIiwiZ2ZwLW1jcC1zZXJ2ZSJdfQ%3D%3D)
|
|
75
69
|
|
|
76
|
-
|
|
70
|
+
**Manual setup:**
|
|
77
71
|
|
|
78
|
-
|
|
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
|
-
```
|
|
87
|
-
|
|
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
|
-
|
|
85
|
+
### 2. Claude Code
|
|
91
86
|
|
|
92
|
-
|
|
87
|
+
Run the following command:
|
|
93
88
|
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
```bash
|
|
90
|
+
claude mcp add gdsfactoryplus -- uvx --from gfp-mcp gfp-mcp-serve
|
|
91
|
+
```
|
|
96
92
|
|
|
97
|
-
|
|
93
|
+
Or add to `.claude/settings.json` manually:
|
|
98
94
|
|
|
99
95
|
```json
|
|
100
96
|
{
|
|
101
97
|
"mcpServers": {
|
|
102
98
|
"gdsfactoryplus": {
|
|
103
|
-
"command": "
|
|
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
|
-
|
|
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
|
-
**
|
|
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": "
|
|
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
|
-
|
|
127
|
+
### 4. Other MCP Clients
|
|
146
128
|
|
|
147
|
-
|
|
148
|
-
|
|
129
|
+
Install `gfp-mcp` and run the server:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
uvx --from gfp-mcp gfp-mcp-serve
|
|
133
|
+
```
|
|
149
134
|
|
|
150
|
-
|
|
135
|
+
Or install globally first, then reference `gfp-mcp-serve` in your client's MCP configuration:
|
|
151
136
|
|
|
152
|
-
|
|
137
|
+
```bash
|
|
138
|
+
uv tool install gfp-mcp
|
|
139
|
+
```
|
|
153
140
|
|
|
154
|
-
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
[](https://pypi.org/project/gfp-mcp/)
|
|
4
4
|
[](https://pypi.org/project/gfp-mcp/)
|
|
5
|
-
[](https://github.com/doplaydo/gfp-mcp/actions)
|
|
6
5
|
[](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
|
-
##
|
|
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
|
-
|
|
18
|
+
## Installation
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
Choose your AI assistant below and follow the instructions.
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
### 1. Cursor
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
uv tool install gfp-mcp
|
|
29
|
-
```
|
|
24
|
+
**One-click install:**
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
<summary>Ephemeral approach</summary>
|
|
26
|
+
[](cursor://anysphere.cursor-deeplink/mcp/install?name=gdsfactoryplus&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnZnAtbWNwIiwiZ2ZwLW1jcC1zZXJ2ZSJdfQ%3D%3D)
|
|
33
27
|
|
|
34
|
-
|
|
28
|
+
**Manual setup:**
|
|
35
29
|
|
|
36
|
-
|
|
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
|
-
```
|
|
45
|
-
|
|
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
|
-
|
|
43
|
+
### 2. Claude Code
|
|
49
44
|
|
|
50
|
-
|
|
45
|
+
Run the following command:
|
|
51
46
|
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
```bash
|
|
48
|
+
claude mcp add gdsfactoryplus -- uvx --from gfp-mcp gfp-mcp-serve
|
|
49
|
+
```
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
Or add to `.claude/settings.json` manually:
|
|
56
52
|
|
|
57
53
|
```json
|
|
58
54
|
{
|
|
59
55
|
"mcpServers": {
|
|
60
56
|
"gdsfactoryplus": {
|
|
61
|
-
"command": "
|
|
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
|
-
|
|
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
|
-
**
|
|
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": "
|
|
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
|
-
|
|
85
|
+
### 4. Other MCP Clients
|
|
104
86
|
|
|
105
|
-
|
|
106
|
-
|
|
87
|
+
Install `gfp-mcp` and run the server:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
uvx --from gfp-mcp gfp-mcp-serve
|
|
91
|
+
```
|
|
107
92
|
|
|
108
|
-
|
|
93
|
+
Or install globally first, then reference `gfp-mcp-serve` in your client's MCP configuration:
|
|
109
94
|
|
|
110
|
-
|
|
95
|
+
```bash
|
|
96
|
+
uv tool install gfp-mcp
|
|
97
|
+
```
|
|
111
98
|
|
|
112
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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
|
|
|
@@ -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.
|
|
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
|
[](https://pypi.org/project/gfp-mcp/)
|
|
46
46
|
[](https://pypi.org/project/gfp-mcp/)
|
|
47
|
-
[](https://github.com/doplaydo/gfp-mcp/actions)
|
|
48
47
|
[](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
|
-
##
|
|
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
|
-
|
|
60
|
+
## Installation
|
|
64
61
|
|
|
65
|
-
|
|
62
|
+
Choose your AI assistant below and follow the instructions.
|
|
66
63
|
|
|
67
|
-
|
|
64
|
+
### 1. Cursor
|
|
68
65
|
|
|
69
|
-
|
|
70
|
-
uv tool install gfp-mcp
|
|
71
|
-
```
|
|
66
|
+
**One-click install:**
|
|
72
67
|
|
|
73
|
-
|
|
74
|
-
<summary>Ephemeral approach</summary>
|
|
68
|
+
[](cursor://anysphere.cursor-deeplink/mcp/install?name=gdsfactoryplus&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnZnAtbWNwIiwiZ2ZwLW1jcC1zZXJ2ZSJdfQ%3D%3D)
|
|
75
69
|
|
|
76
|
-
|
|
70
|
+
**Manual setup:**
|
|
77
71
|
|
|
78
|
-
|
|
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
|
-
```
|
|
87
|
-
|
|
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
|
-
|
|
85
|
+
### 2. Claude Code
|
|
91
86
|
|
|
92
|
-
|
|
87
|
+
Run the following command:
|
|
93
88
|
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
```bash
|
|
90
|
+
claude mcp add gdsfactoryplus -- uvx --from gfp-mcp gfp-mcp-serve
|
|
91
|
+
```
|
|
96
92
|
|
|
97
|
-
|
|
93
|
+
Or add to `.claude/settings.json` manually:
|
|
98
94
|
|
|
99
95
|
```json
|
|
100
96
|
{
|
|
101
97
|
"mcpServers": {
|
|
102
98
|
"gdsfactoryplus": {
|
|
103
|
-
"command": "
|
|
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
|
-
|
|
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
|
-
**
|
|
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": "
|
|
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
|
-
|
|
127
|
+
### 4. Other MCP Clients
|
|
146
128
|
|
|
147
|
-
|
|
148
|
-
|
|
129
|
+
Install `gfp-mcp` and run the server:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
uvx --from gfp-mcp gfp-mcp-serve
|
|
133
|
+
```
|
|
149
134
|
|
|
150
|
-
|
|
135
|
+
Or install globally first, then reference `gfp-mcp-serve` in your client's MCP configuration:
|
|
151
136
|
|
|
152
|
-
|
|
137
|
+
```bash
|
|
138
|
+
uv tool install gfp-mcp
|
|
139
|
+
```
|
|
153
140
|
|
|
154
|
-
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
|
|
@@ -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
|
|
39
|
-
assert len(TOOL_HANDLERS) ==
|
|
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) ==
|
|
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) ==
|
|
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) ==
|
|
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
|
|
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
|
|
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) >=
|
|
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
|
|
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
|