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
feat: support 'headers' argument for SSE server connection (sparfenyuk#23)
I have replaced the `--api-access-token` argument with the more generic
`--headers` argument for SSE. This will allow for other auth mechanisms
such as api keys as well. Intended usage:
```sh
# API key
mcp-proxy http://example.io/sse --headers x-api-key my-super-secret-api-key
# Bearer token
mcp-proxy http://example.io/sse --headers Authorization 'Bearer my-super-secret-bearer-token'
# Multiple headers
mcp-proxy http://example.io/sse --headers Authorization 'Bearer my-super-secret-bearer-token' --headers x-api-key my-super-secret-api-key
```
Start the MCP proxy in one of two possible modes: as a SSE or stdio client.
186
+
Start the MCP proxy in one of two possible modes: as an SSE or stdio client.
187
187
188
188
positional arguments:
189
-
command_or_url Command or URL to connect to. When a URL, will run a SSE client, otherwise will run the given command and connect as a stdio client. See corresponding options for more details.
189
+
command_or_url Command or URL to connect to. When a URL, will run an SSE client, otherwise will run the given command and connect as a stdio client. See corresponding options for more details.
190
190
191
191
options:
192
192
-h, --help show this help message and exit
193
193
194
194
SSE client options:
195
-
--api-access-token API_ACCESS_TOKEN
196
-
Access token Authorization header passed by the client to the SSE server. Can also be set as environment variable API_ACCESS_TOKEN.
195
+
-H KEY VALUE, --headers KEY VALUE
196
+
Headers to pass to the SSE server. Can be used multiple times.
197
197
198
198
stdio client options:
199
199
args Any extra arguments to the command to spawn the server
200
200
-e KEY VALUE, --env KEY VALUE
201
201
Environment variables used when spawning the server. Can be used multiple times.
202
202
203
203
SSE server options:
204
-
--sse-port SSE_PORT Port to expose a SSE server on. Default is a random port
205
-
--sse-host SSE_HOST Host to expose a SSE server on. Default is 127.0.0.1
204
+
--sse-port SSE_PORT Port to expose an SSE server on. Default is a random port
205
+
--sse-host SSE_HOST Host to expose an SSE server on. Default is 127.0.0.1
0 commit comments