mcp-proxy 6.5.2 → 6.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -20
- package/README.md +2 -0
- package/dist/bin/mcp-proxy.mjs +7 -1
- package/dist/bin/mcp-proxy.mjs.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{stdio-DLwYts_5.mjs → stdio-BQunCFor.mjs} +76 -2
- package/dist/stdio-BQunCFor.mjs.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/bin/mcp-proxy.ts +7 -0
- package/src/startHTTPServer.test.ts +197 -0
- package/src/startHTTPServer.ts +115 -6
- package/dist/stdio-DLwYts_5.mjs.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
=====================
|
|
2
3
|
|
|
3
|
-
Copyright
|
|
4
|
+
Copyright © 2026 Frank Fiegel (frank@glama.ai)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
Permission is hereby granted, free of charge, to any person
|
|
7
|
+
obtaining a copy of this software and associated documentation
|
|
8
|
+
files (the “Software”), to deal in the Software without
|
|
9
|
+
restriction, including without limitation the rights to use,
|
|
10
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the
|
|
12
|
+
Software is furnished to do so, subject to the following
|
|
13
|
+
conditions:
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
The above copyright notice and this permission notice shall be
|
|
16
|
+
included in all copies or substantial portions of the Software.
|
|
10
17
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
20
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
21
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
22
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
23
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
18
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
|
|
19
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
20
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
21
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
22
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
23
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
24
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
25
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -54,6 +54,7 @@ options:
|
|
|
54
54
|
- `--port`: Specify the port to listen on (default: 8080)
|
|
55
55
|
- `--connectionTimeout`: Timeout in milliseconds for the initial connection to the MCP server (default: 60000, which is 60 seconds)
|
|
56
56
|
- `--requestTimeout`: Timeout in milliseconds for requests to the MCP server (default: 300000, which is 5 minutes)
|
|
57
|
+
- `--keepAliveTimeout`: HTTP keep-alive timeout in milliseconds for stateful stream sessions (default: 300000, which is 5 minutes)
|
|
57
58
|
- `--debug`: Enable debug logging
|
|
58
59
|
- `--shell`: Spawn the server via the user's shell
|
|
59
60
|
- `--apiKey`: API key for authenticating requests (uses X-API-Key header)
|
|
@@ -430,6 +431,7 @@ Options:
|
|
|
430
431
|
- `eventStore`: Event store for streamable HTTP transport (optional)
|
|
431
432
|
- `port`: Port number to listen on
|
|
432
433
|
- `host`: Host to bind to (default: "::")
|
|
434
|
+
- `keepAliveTimeout`: HTTP keep-alive timeout in milliseconds for stateful stream sessions (default: 300000)
|
|
433
435
|
- `sseEndpoint`: SSE endpoint path (default: "/sse", set to null to disable)
|
|
434
436
|
- `streamEndpoint`: Streamable HTTP endpoint path (default: "/mcp", set to null to disable)
|
|
435
437
|
- `stateless`: Enable stateless mode for HTTP streamable transport (default: false)
|
package/dist/bin/mcp-proxy.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { D as __toESM, E as __commonJSMin, a as startHTTPServer, i as Client, n as serializeMessage, o as proxyServer, r as Server, t as ReadBuffer, w as InMemoryEventStore } from "../stdio-
|
|
2
|
+
import { D as __toESM, E as __commonJSMin, a as startHTTPServer, i as Client, n as serializeMessage, o as proxyServer, r as Server, t as ReadBuffer, w as InMemoryEventStore } from "../stdio-BQunCFor.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { basename, dirname, extname, join, normalize, relative, resolve } from "path";
|
|
5
5
|
import { format, inspect } from "util";
|
|
@@ -5077,6 +5077,11 @@ const argv = await yargs_default(hideBin(process.argv)).scriptName("mcp-proxy").
|
|
|
5077
5077
|
describe: "The host to listen on",
|
|
5078
5078
|
type: "string"
|
|
5079
5079
|
},
|
|
5080
|
+
keepAliveTimeout: {
|
|
5081
|
+
default: 3e5,
|
|
5082
|
+
describe: "The HTTP keep-alive timeout in milliseconds for stateful stream sessions (default: 5 minutes)",
|
|
5083
|
+
type: "number"
|
|
5084
|
+
},
|
|
5080
5085
|
port: {
|
|
5081
5086
|
default: 8080,
|
|
5082
5087
|
describe: "The port to listen on",
|
|
@@ -5197,6 +5202,7 @@ const proxy = async () => {
|
|
|
5197
5202
|
createServer,
|
|
5198
5203
|
eventStore: new InMemoryEventStore(),
|
|
5199
5204
|
host: argv.host,
|
|
5205
|
+
keepAliveTimeout: argv.keepAliveTimeout,
|
|
5200
5206
|
port: argv.port,
|
|
5201
5207
|
sseEndpoint: argv.server && argv.server !== "sse" ? null : argv.sseEndpoint ?? argv.endpoint,
|
|
5202
5208
|
sslCa: argv.sslCa,
|