Commit graph inspector/cli/scripts
Author SHA1 Message Date
Felix Weinberger
195f79076e
Fix CLI test failures for SSE/HTTP transport configs
- Pass URL as command for SSE/HTTP configs instead of empty string
- Update runCli to pass transport type flag when needed
- Update tests to expect connection errors for non-existent SSE/HTTP servers
2025-08-05 14:22:16 +01:00
Felix Weinberger
1e399b7055
prettier 2025-08-05 14:08:57 +01:00
Felix Weinberger
0e2906c4c4
Implement default-server support
- Auto-select server when --config is used without --server
- Use 'default-server' if it exists in config
- Use single server if only one is defined
- Show helpful error if multiple servers exist without default
- Add tests for all default-server scenarios
2025-08-05 14:08:57 +01:00
Felix Weinberger
63193ec007
Clean up CLI tests and add config parsing tests
- Remove web client launch tests from CLI test suite
- Add CLI-mode tests for SSE and streamable-http configs
- Keep only tests that use --cli flag as intended
2025-08-05 14:08:57 +01:00
Felix Weinberger
1d89d750e0
test: Add minimal test coverage for CLI transport options
- Add tests for config files with different transport types (stdio, sse, streamable-http)
- Add test for backward compatibility with configs missing type field
- Verify transport and serverUrl options are correctly parsed from config files
- All 36 tests pass
2025-08-05 14:08:57 +01:00
Cliff Hall
efc8f32ad2
Merge branch 'main' into ci-test-cli 2025-07-15 16:04:47 -04:00
François Leblanc
1842063ce7 Remove unused import
This commit is mostly so that we can see whether the CI triggers a check
of the CLI tests when files are touched within the CLI folder.
2025-07-14 14:33:08 -04:00
François Leblanc
714192486b Fix a failing test 2025-07-14 13:45:50 -04:00
François Leblanc
7c2b761748 [cli] Don't force specific endpoints for remote servers
At the moment, the CLI tool expects that remote MCP servers, either
using SSE or streamable HTTP transport, have certain endpoints or
fragments -- `/sse` and `/mcp`, respectively. This is not part of the
MCP spec, nor should it be expected.

I also added a check to make sure a URL is provided if STDIO isn't
picked, erroring out if not.
2025-07-09 11:51:41 -04:00
Ryan Clark
14a9b8fb36
feat: formatting 2025-06-25 00:46:11 -05:00
Ryan Clark
0bef6f71ad
feat: add tests for http transport 2025-06-24 09:23:51 -05:00
cliffhall
6a99feaf33 Refactor project components
* Remove bin folder, leaving cli, server, and client
* This fixes #315
* In .gitignore,
  - add .idea
  - remove bin/build
* Remove bin and bin/cli.js
* Remove bin/scripts/copy-cli.js
* Refactor/move bin/scripts to cli/scripts
* Refactor/move bin/src/index.ts to cli/src/cli.ts
* Refactor/renamed client/bin/cli.js to client/bin/client.js
* In .github/workflows/main.yml,
  - add run of cli tests
* In cli/pacakge.json
  - change main and bin/mcp-inspector-cli properties to build/cli.js
* In client/package.json,
  - change bin/mcp-inspector-client properties to build/start.js
* In pacakge.json
  - change bin/mcp-inspector property to ./cli/build/cli.js
  - removed bin and cli/bin from files list
  - removed @modelcontextprotocol/inspector-bin dependency
  - rearranged and corrected scripts
2025-04-15 17:59:26 -04:00