Commit graph inspector/server/src
Author SHA1 Message Date
Pulkit Sharma
51c7eda6a6 Add MCP proxy address config support, better error messages 2025-04-01 19:21:19 +05:30
Abdelkader Boudih
6c67bf6d6d
Merge branch 'main' into main 2025-03-31 18:32:18 +00:00
Abdelkader Boudih
80f5ab1136
fix: typo 2025-03-31 18:28:40 +00:00
Cliff Hall
fb29ca0113
Merge branch 'main' into cleanup-old-transports 2025-03-31 12:36:34 -04:00
Abdelkader Boudih
da9dd09765
refactor: Update default ports for MCPI client and MPCP server
Changes the default ports used by the MCP Inspector client UI and the MCP Proxy server to avoid conflicts with common development ports and provide a memorable mnemonic based on T9 mapping.
2025-03-31 00:31:28 +00:00
cliffhall
054741be03 Run prettier. 2025-03-29 12:36:03 -04:00
cliffhall
1b754f52ca This fixes #214 where when the inspector is started, it can report that the inspector is up, when in fact it isn't because the address is already in use. It catches this condition, as well as the condition where the proxy server port is in use, reports it, and exits.
* In bin/cli.js
  - in the delay function, have the setTimeout return a true value.
  - try the server's spawnPromise call and within the try block, use Promise.race to get the return value of the first promise to resolve. If the server is up, it will not resolve and the 2 second delay will resolve with true, telling us the server is ok. Any error will have been reported by the server startup process, so we will not pile on with more output in the catch block.
  - If the server started ok, then we will await the spawnPromise call for starting the client. If the client fails to start it will report and exit, otherwise we are done and both servers are running and have reported as much. If an error is caught and it isn't SIGINT or if process.env.DEBUG is true then the error will be thrown before exiting.
* In client/bin/cli.js
  - add a "listening" handler to the server, logging that the MCP inspector is up at the given port
  - Add an "error" handler to the server that reports  that the client port is in use if the error message includes "EADDRINUSE", otherwise throw the error so the entire contents can be seen.
* In server/src/index.ts
  - add a "listening" handler to the server, logging that the Proxy server is up at the given port
  - Add an "error" handler to the server that reports  that the server port is in use if the error message includes "EADDRINUSE", otherwise throw the error so the entire contents can be seen.
* In package.json
  - in preview script
    - add --port 5173 to start the client on the proper port. This was useful in getting an instance of the client running before trying the start script. otherwise it starts on 4173
2025-03-28 11:59:21 -04:00
Simon Knott
353d6b549b
fix: clean up previous transport processes 2025-03-27 09:52:35 +01:00
lloydzhou
aeaf32fa45 fix 2025-03-15 12:58:11 +08:00
lloydzhou
090b7efdea add sse accept header 2025-03-15 12:58:11 +08:00
Justin Spahr-Summers
410a6f33dc
Format fixes 2025-02-12 18:10:25 +00:00
Ola Hungerford
9c3fee1442
Merge branch 'main' into add-server-startup-logging 2025-02-08 13:13:14 -07:00
Ola Hungerford
f980763381 Specify proxy server 2025-01-26 20:46:08 -07:00
Ola Hungerford
df955cfdb5 Remove other logging and just keep listening and try catch 2025-01-26 20:24:59 -07:00
Ola Hungerford
5b884b55b5 Add server startup logging 2025-01-26 20:13:11 -07:00
Justin Spahr-Summers
0882a3e0e5
Formatting 2025-01-24 15:23:24 +00:00
Justin Spahr-Summers
731ee588c2
Fix Authorization header passthrough
Node.js headers are lowercase
2025-01-24 13:55:43 +00:00
Justin Spahr-Summers
8a20f7711a
Use new SseError class from SDK 2025-01-24 11:27:40 +00:00
Justin Spahr-Summers
8bb5308797
Report SSE 401 errors to the client 2025-01-24 11:04:44 +00:00
Justin Spahr-Summers
14db05c2a2
Clarify inspector-server error logging 2025-01-23 17:19:39 +00:00
Justin Spahr-Summers
e7697eb5cd
Pass through Authorization headers sent to inspector server 2025-01-23 16:45:37 +00:00
Ashwin Bhat
a976aefb39
allow passing env vars to server from command line 2025-01-10 07:51:54 -08:00
devin-ai-integration[bot]
bd6586bbad style: apply prettier formatting 2024-12-06 19:43:48 +00:00
devin-ai-integration[bot]
cc1ae05f9d fix: use shell-quote for proper argument parsing 2024-12-06 19:34:03 +00:00
Ani Betts
853a3b4faf
Enable using 'npx' as your command on Windows 2024-11-27 17:04:52 +01:00
Anaïs Betts
7792070d81
Add debugging 2024-11-26 17:18:33 +01:00
Justin Spahr-Summers
dac692e638
Fix type errors in server 2024-11-21 10:29:36 +00:00
Ashwin Bhat
22bf78720b
show server stderr in inspector UI 2024-11-20 18:13:54 -08:00
Ashwin Bhat
f684d2e891
improve inspector startup message 2024-11-19 16:58:33 -08:00
Ashwin Bhat
c1a56810fb
pass in args 2024-11-19 11:42:16 -08:00
Justin Spahr-Summers
bf2ddc9b7b
Fix server dying when an error occurs
Resolves #34.
2024-11-12 14:02:23 +00:00
Justin Spahr-Summers
a0d8ec1e7e
Make server executable on its own 2024-11-11 10:41:07 +00:00
Justin Spahr-Summers
76e2cf6fdc
Add UI for viewing and configuring environment variables 2024-11-07 15:28:21 +00:00
Justin Spahr-Summers
82f3d99639
Install TypeScript SDK from registry 2024-10-28 10:42:31 +00:00
Justin Spahr-Summers
a16649be87
Fix argument splitting to work on spaces 2024-10-21 14:20:26 +01:00
Ashwin Bhat
c6a11422f4
updates for sdk update 2024-10-16 16:22:14 -07:00
Ashwin Bhat
17456ad54a
remove unused code 2024-10-11 08:52:22 -07:00
Ashwin Bhat
b9ed2bec74
encoding/decoding uri component 2024-10-11 08:48:17 -07:00
Ashwin Bhat
14da4793f7
extract transport logic 2024-10-11 08:42:31 -07:00
Ashwin Bhat
02bfd16309
handle multiple connections 2024-10-11 08:41:54 -07:00
Ashwin Bhat
2e939ba569
add clear logging to server 2024-10-11 08:41:10 -07:00
Ashwin Bhat
d32e7b6725
add SSE connection ability 2024-10-11 08:40:20 -07:00
Ashwin Bhat
50f86ebbfe
fix types, eliminate client/server 2024-10-11 08:34:28 -07:00
Ashwin Bhat
df8051b975
use proxy function 2024-10-10 09:13:19 -07:00
Ashwin Bhat
4b82553046
remove client class 2024-10-09 17:22:20 -07:00
Ashwin Bhat
6575697f25
refactor to not use custom websocket protocol 2024-10-09 17:22:20 -07:00
Ashwin Bhat
bfc9e6e882
get tools working 2024-10-08 16:49:12 -07:00
Ashwin Bhat
88df0cd453
make prompts pass args 2024-10-08 16:49:12 -07:00
Ashwin Bhat
1095e48c44
add ability to connect manually 2024-10-08 08:20:18 -07:00
Ashwin Bhat
38e1c8b2b9
tools 2024-10-08 07:33:47 -07:00