Skip to content

Commit 0985183

Browse files
authored
Merge pull request #71 from notargs/change_default_port
Change default port
2 parents 61f7eda + cd3a7b5 commit 0985183

8 files changed

Lines changed: 22 additions & 13 deletions

File tree

README.ja.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,20 @@ UPM(Unity Package Manager)を介してインストールできます。
8282

8383
### Initial Setup
8484
1. Unity Editorで`Edit > Project Settings > Unity Natural MCP`を開く
85-
2. MCPサーバーのポート番号を設定(デフォルト: 8090
85+
2. MCPサーバーのポート番号を設定(デフォルト: 56780
8686
3. `Refresh` ボタンをクリックして設定を反映
8787

88+
> [!NOTE]
89+
> `56780`はあくまでデフォルトポートです。プロジェクトに合わせて、自由に変更してください。
90+
> なお、`67 80` はASCII Codeで `CP` を表します。もちろんMCPから来ています。
91+
8892
![Settings](docs/images/settings.png)
8993

9094
### Claude Code
9195
次のコマンドを利用して、ClaudeCodeにMCPサーバーを登録します。
9296

9397
```shell
94-
claude mcp add -s project --transport http unity-natural-mcp http://localhost:8090/mcp
98+
claude mcp add -s project --transport http unity-natural-mcp http://localhost:56780/mcp
9599
```
96100

97101
### WSL2
@@ -127,7 +131,7 @@ GitHub Copilot(VSCode)を利用する場合、Streamable HTTPを介した接続
127131
{
128132
"servers": {
129133
"unity-natural-mcp": {
130-
"url": "http://localhost:8090/mcp"
134+
"url": "http://localhost:56780/mcp"
131135
}
132136
}
133137
}
@@ -147,7 +151,7 @@ GitHub Copilot(VSCode)を利用する場合、Streamable HTTPを介した接続
147151
"args": ["run", "start", "--prefix", "path/to/UnityNaturalMCP/stdio-to-streamable-http/"],
148152
"env": {
149153
"MCP_SERVER_IP": "localhost",
150-
"MCP_SERVER_PORT": "8090"
154+
"MCP_SERVER_PORT": "56780"
151155
}
152156
}}
153157
}

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,20 @@ You can install via UPM (Unity Package Manager):
8181

8282
#### Initial Setup
8383
1. Open `Edit > Project Settings > Unity Natural MCP` in Unity Editor
84-
2. Set the MCP server port number (default: 8090)
84+
2. Set the MCP server port number (default: 56780)
8585
3. Click the `Refresh` button to apply the settings
8686

87+
> [!NOTE]
88+
> `56780` is just the default port. Feel free to change it to suit your project.
89+
> Note that `67 80` is the ASCII code for `CP`. Of course, it comes from MCP.
90+
8791
![Setting](docs/images/settings.png)
8892

8993
### Claude Code
9094
Use the following command to register an MCP server with ClaudeCode.
9195

9296
```shell
93-
claude mcp add -s project --transport http unity-natural-mcp http://localhost:8090/mcp
97+
claude mcp add -s project --transport http unity-natural-mcp http://localhost:56780/mcp
9498
```
9599

96100
### WSL2
@@ -126,7 +130,7 @@ Add the following configuration to `.vscode/mcp.json`:
126130
{
127131
"servers": {
128132
"unity-natural-mcp": {
129-
"url": "http://localhost:8090/mcp"
133+
"url": "http://localhost:56780/mcp"
130134
}
131135
}
132136
}
@@ -146,7 +150,7 @@ Please replace `path/to/UnityNaturalMCP` with the path to the cloned `UnityNatur
146150
"args": ["run", "start", "--prefix", "path/to/UnityNaturalMCP/stdio-to-streamable-http/"],
147151
"env": {
148152
"MCP_SERVER_IP": "localhost",
149-
"MCP_SERVER_PORT": "8090"
153+
"MCP_SERVER_PORT": "56780"
150154
}
151155
}}
152156
}

UnityNaturalMCPServer/Editor/MCPSetting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace UnityNaturalMCP.Editor
66
public sealed class MCPSetting : ScriptableSingleton<MCPSetting>
77
{
88
public string ipAddress = "localhost";
9-
public int port = 8090;
9+
public int port = 56780;
1010
public bool showMcpServerLog = true;
1111
public bool enableDefaultMcpTools = true;
1212

UnityNaturalMCPTest/.mcp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"env": {
1212
"MCP_SERVER_IP": "localhost",
13-
"MCP_SERVER_PORT": "8090"
13+
"MCP_SERVER_PORT": "56780"
1414
}
1515
}
1616
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"servers": {
33
"unity-natural-mcp": {
4-
"url": "http://localhost:8090/mcp"
4+
"url": "http://localhost:56780/mcp"
55
}
66
}
77
}

UnityNaturalMCPTest/ProjectSettings/UnityNaturalMCPSetting.asset

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ MonoBehaviour:
1313
m_Name:
1414
m_EditorClassIdentifier:
1515
ipAddress: '*'
16-
port: 8090
16+
port: 56780
1717
showMcpServerLog: 1
18+
enableDefaultMcpTools: 1

docs/images/settings.png

-28.7 KB
Loading

stdio-to-streamable-http/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprot
55
import type { CallToolRequest, ListToolsRequest } from "@modelcontextprotocol/sdk/types.js";
66

77
const MCP_SERVER_IP = process.env.MCP_SERVER_IP || "localhost";
8-
const MCP_SERVER_PORT = process.env.MCP_SERVER_PORT || "8090";
8+
const MCP_SERVER_PORT = process.env.MCP_SERVER_PORT || "56780";
99
const MCP_SERVER_ENDPOINT = `http://${MCP_SERVER_IP}:${MCP_SERVER_PORT}/mcp`;
1010

1111
const server = new Server(

0 commit comments

Comments
 (0)