You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: server/mcp_server_computer_use/README.md
+28-3Lines changed: 28 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,14 +78,18 @@ The following environment variables are available for configuring the MCP server
78
78
| Environment Variable | Description | Default Value |
79
79
|----------|------|--------|
80
80
|`MCP_SERVER_PORT`| MCP server listening port |`8000`|
81
-
|`TOOL_SERVER_ENDPOINT`| Tool server endpoint | - |
81
+
|`TOOL_SERVER_ENDPOINT`| Tool server endpoint. Use `https://...` when HTTPS is enabled. | - |
82
+
|`AUTH_API_KEY`| API key sent to tool server via the `X-API-Key` header. Must match `auth_key` configured on the tool server. Leave empty to disable authentication. |`""`|
83
+
|`TOOL_SERVER_ENABLE_HTTPS`| Set to `true` when the tool server is served over HTTPS so that the SDK validates the TLS server certificate. |`false`|
84
+
|`TOOL_SERVER_CLIENT_CA`| Absolute path to the CA certificate that signed the tool server's server certificate. Required when `TOOL_SERVER_ENABLE_HTTPS=true`. |`""`|
82
85
83
86
For example, set these environment variables before starting the server:
84
87
85
88
```bash
86
89
# Set fastmcp port and [tool server]() endpoint here
@@ -103,14 +107,35 @@ uv run mcp-server-computer-use
103
107
],
104
108
"env": {
105
109
"MCP_SERVER_PORT": 8000,
106
-
"TOOL_SERVER_ENDPOINT": "{endpoint}"
110
+
"TOOL_SERVER_ENDPOINT": "{endpoint}",
111
+
"AUTH_API_KEY": "{your-secret-api-key}"
107
112
}
108
113
}
109
114
}
110
115
}
111
116
112
117
```
113
118
119
+
### Authentication & HTTPS
120
+
121
+
By default the MCP server talks to the tool server over plain HTTP without authentication, which is fine for local development. For any deployment that exposes the tool server outside a fully trusted network, you should turn on at least the API-key authentication, and ideally HTTPS as well, so that the `X-API-Key` header is not transmitted in plain text.
Configure the **same** secret value on both sides:
126
+
127
+
- On the **tool server**, set `auth_key` in its `config.toml`.
128
+
- On the **MCP server**, set `AUTH_API_KEY` via the environment variable above.
129
+
130
+
When `auth_key` is set on the tool server, requests without a matching `X-API-Key` header will be rejected with `401 Permission denied`.
131
+
132
+
2.**HTTPS (recommended for any non-trusted network)**
133
+
134
+
- On the **tool server**, enable HTTPS (`plugins.enable_https = true`) with `ssl.server_cert` and `ssl.server_key`.
135
+
- On the **MCP server**, set `TOOL_SERVER_ENABLE_HTTPS=true` and `TOOL_SERVER_CLIENT_CA=/abs/path/ca.crt` (the CA that signed the tool server certificate). Make sure `TOOL_SERVER_ENDPOINT` uses `https://`.
136
+
137
+
Both ends must agree on whether HTTPS is enabled, otherwise the TLS handshake will fail.
138
+
114
139
115
140
# License
116
-
volcengine/mcp-server is licensed under the [MIT License](https://github.com/volcengine/mcp-server/blob/main/LICENSE).
141
+
volcengine/mcp-server is licensed under the [MIT License](https://github.com/volcengine/mcp-server/blob/main/LICENSE).
0 commit comments