Skip to content

Commit 755a3f2

Browse files
http transport deprioritization (#525)
* http transport deprioritization * Update app/en/home/build-tools/create-a-tool-with-secrets/page.mdx Co-authored-by: Eric Gustin <34000337+EricGustin@users.noreply.github.com> * improved the callout for local http to link to arcade deploy --------- Co-authored-by: Eric Gustin <34000337+EricGustin@users.noreply.github.com>
1 parent e98afc1 commit 755a3f2

File tree

3 files changed

+102
-10
lines changed

3 files changed

+102
-10
lines changed

app/en/home/build-tools/create-a-mcp-server/page.mdx

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,47 @@ if __name__ == "__main__":
102102

103103
Run your MCP Server using one of the with the following commands in your terminal:
104104

105+
<Tabs
106+
items={["stdio transport (default)", "http transport"]}
107+
storageKey="preferredTransport"
108+
>
109+
110+
<Tabs.Tab>
111+
105112
```bash
106-
uv run server.py
113+
uv run server.py stdio
107114
```
108115

116+
<Callout type="info">
117+
When using the stdio transport, it is common that the MCP client will start
118+
the MCP server for you on a different environment, so you the MCP sever may
119+
not be able to access the secrets you have defined in your .env file. Please
120+
refer to the [create a tool with
121+
secrets](/home/build-tools/create-a-tool-with-secrets) guide for more
122+
information.
123+
</Callout>
124+
125+
</Tabs.Tab>
126+
<Tabs.Tab>
127+
128+
```bash
129+
uv run server.py http
130+
```
131+
132+
For HTTP transport, view your server's API docs at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
133+
134+
<Callout type="info">
135+
For security reasons, Local HTTP servers do not currently support managed
136+
authorization and secrets. If you need to use authorization or secrets, you
137+
should use the stdio transport and configure the Arcade API key and secrets in
138+
your MCP connection settings. If you intend to expose your HTTP MCP server to
139+
the public internet, please follow the [on-prem MCP
140+
server](/home/deployment/on-prem-mcp) guide for secure remote deployment.
141+
</Callout>
142+
143+
</Tabs.Tab>
144+
</Tabs>
145+
109146
You should see output like this in your terminal:
110147

111148
```bash

app/en/home/build-tools/create-a-tool-with-secrets/page.mdx

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,31 @@ export MY_SECRET_KEY="my-secret-value"
113113
</Tabs.Tab>
114114
</Tabs>
115115

116+
### Using secrets with stdio transport
117+
118+
When using the stdio transport, it is common that the MCP client will start
119+
the MCP server for you on a different environment, so your MCP sever may
120+
not be able to access the secrets you have defined in your `.env` file.
121+
122+
In this cases, you should check your MCP client's documentation to see how to configure the secrets for your MCP server. This is usually done by setting the secrets in the MCP client's configuration JSON entry. For example:
123+
124+
```json
125+
{
126+
"mcpServers": {
127+
"my-server": {
128+
"command": "python",
129+
"args": ["server.py", "stdio"],
130+
"env": {
131+
"MY_SECRET_KEY": "my-secret-value"
132+
}
133+
}
134+
}
135+
}
136+
```
137+
138+
This will make the secret available to your MCP server when the MCP client starts the subprocess.
139+
Note that the specific key name may vary depending on the MCP client you are using.
140+
116141
### Define your tool and access the secret
117142

118143
<Callout type="info">
@@ -219,24 +244,36 @@ if __name__ == "__main__":
219244
### Run your MCP server
220245

221246
<Tabs
222-
items={["HTTP transport (default)", "stdio transport (for Claude Desktop)"]}
247+
items={["stdio transport (default)", "http transport"]}
223248
storageKey="preferredTransport"
224249
>
225250
<Tabs.Tab>
226251

227252
```bash
228-
uv run secrets.py http
253+
uv run secrets.py stdio
229254
```
230255

231-
For HTTP transport, view your server's API docs at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
232-
233256
</Tabs.Tab>
234257
<Tabs.Tab>
235258

236259
```bash
237-
uv run secrets.py stdio
260+
uv run secrets.py http
238261
```
239262

263+
For HTTP transport, view your server's API docs at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
264+
265+
<Callout type="info">
266+
For security reasons, Local HTTP servers do not currently support managed
267+
authorization and secrets. If you need to use authorization or secrets, you
268+
should use the stdio transport and configure the Arcade API key and secrets in
269+
your MCP connection settings. If you need authorization and tool secrets for
270+
an HTTP server that you intend to expose to the public internet, please follow
271+
the [on-prem MCP server](/home/deployment/on-prem-mcp) guide for secure remote
272+
deployment. If you are deploying your MCP server to Arcade, you can use
273+
[Arcade Deploy](/home/serve-tools/arcade-deploy) to deploy your MCP server and
274+
manage the secrets for your MCP server from the Arcade dashboard.
275+
</Callout>
276+
240277
</Tabs.Tab>
241278

242279
</Tabs>

app/en/home/custom-mcp-server-quickstart/page.mdx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,25 +124,43 @@ Follow the instructions in your browser, and once you've finished, your terminal
124124
Run your MCP Server using one of the with the following commands in your terminal:
125125

126126
<Tabs
127-
items={["HTTP transport (default)", "stdio transport (for Claude Desktop)"]}
127+
items={["stdio transport (default)", "http transport"]}
128128
storageKey="preferredTransport"
129129
>
130130

131131
<Tabs.Tab>
132132

133133
```bash
134-
uv run server.py http
134+
uv run server.py stdio
135135
```
136136

137-
For HTTP transport, view your server's API docs at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
137+
<Callout type="info">
138+
When using the stdio transport, it is common that the MCP client will start
139+
the MCP server for you on a different environment, so you the MCP sever may
140+
not be able to access the secrets you have defined in your .env file. Please
141+
refer to the [create a tool with
142+
secrets](/home/build-tools/create-a-tool-with-secrets) guide for more
143+
information.
144+
</Callout>
138145

139146
</Tabs.Tab>
140147
<Tabs.Tab>
141148

142149
```bash
143-
uv run server.py stdio
150+
uv run server.py http
144151
```
145152

153+
For HTTP transport, view your server's API docs at [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
154+
155+
<Callout type="info">
156+
For security reasons, Local HTTP servers do not currently support managed
157+
authorization and secrets. If you need to use authorization or secrets, you
158+
should use the stdio transport and configure the Arcade API key and secrets in
159+
your MCP connection settings. If you intend to expose your HTTP MCP server to
160+
the public internet, please follow the [on-prem MCP
161+
server](/home/deployment/on-prem-mcp) guide for secure remote deployment.
162+
</Callout>
163+
146164
</Tabs.Tab>
147165
</Tabs>
148166

0 commit comments

Comments
 (0)