Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
bkrabach committed Feb 24, 2025
1 parent 3006ae1 commit fa05206
Showing 1 changed file with 49 additions and 22 deletions.
71 changes: 49 additions & 22 deletions mcp-servers/mcp-server-fusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,57 @@ To create the virtual environment and install dependencies.

### Running the Server

Use the VSCode launch configuration, or run manually:

Defaults to stdio transport:
- Open Autodesk Fusion
- Utilities > Add-Ins > Scripts and Add-Ins...
- Select the Add-Ins tab
- Click the My AddIns "+" icon to add a new Add-In
- Choose the _main project directory_
- This is the folder that contains [FusionMCPServerAddIn.py](./FusionMCPServerAddIn.py)
- After added, select `FusionMCPServerAddIn` and click `Run`
- Select `Run on Startup` to have the server start automatically when Fusion starts
- The server will start silently, you can test it from your terminal via:

```bash
python -m mcp_server_fusion.mcp_server.start
curl -N http://127.0.0.1:6050/sse
```

For SSE transport:
Which should return something similar to:

```bash
python -m mcp_server_fusion.mcp_server.start --transport sse --port 6050
```
C:\>curl -N http://127.0.0.1:6010/sse
event: endpoint
data: /messages?sessionId=947e3ec6-7d10-442f-af8e-e8fe9779f285
```

The SSE URL is:
Use `Ctrl+C` to disconnect the curl command.

```bash
http://127.0.0.1:6050/sse
### Debugging the Server

To run the server in debug mode, open the Scripts and Add-Ins dialog, select the `FusionMCPServerAddIn` and click `Debug`.
This will launch VS Code with the project open. Use the `F5` or `Run & Debug` button and select the `mcp-servers:mcp-server-fusion (attach)` configuration and click `Start Debugging`. This will attach to the running Fusion instance and allow you to debug the server. Wait until you see that the server is listening before attempting to connect.

```
c:\Users\<your_user>\AppData\Roaming\Autodesk\Autodesk Fusion 360\API\AddIns\mcp-server-fusion
Starting MCP Server add-in
Starting MCP server thread
MCP Server add-in started successfully
INFO: Started server process [43816]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:6050 (Press CTRL+C to quit)
```

## Client Configuration

To use this MCP server in your setup, consider the following configuration:

### Stdio
### SSE

```json
{
"mcpServers": {
"mcp-server-fusion": {
"command": "python",
"args": ["run", "-m", "mcp_server_fusion.mcp_server.start"]
}
}
}
```
The SSE URL is:

### SSE
```bash
http://127.0.0.1:6050/sse
```

```json
{
Expand All @@ -65,3 +78,17 @@ To use this MCP server in your setup, consider the following configuration:
}
}
```

Here are some extra instructions to consider adding to your assistant configuration, but feel free to experiment further:

```
When creating models, remember the following:
- Z is vertical, X is horizontal, and Y is depth
- The top plane for an entity is an XY plane, at the Z coordinate of the top of the entity
- The bottom plane for an entity is an XY plane, at the Z coordinate of the bottom of the entity
- The front plane for an entity is an XZ plane, at the Y coordinate of the front of the entity
- The back plane for an entity is an XZ plane, at the Y coordinate of the back of the entity
- The left plane for an entity is a YZ plane, at the X coordinate of the left of the entity
- The right plane for an entity is a YZ plane, at the X coordinate of the right of the entity
- Remember to always use the correct plane and consider the amount of adjustment on the 3rd plane necessary
```

0 comments on commit fa05206

Please sign in to comment.