Commit graph inspector/cli/scripts
Author SHA1 Message Date
olaservo
e27600cbf4 Add CLI header integration tests and update test scripts
- Introduced integration tests for header functionality in a new script `cli-header-tests.js`.
- Updated the `package.json` to include the new test script and modified the existing test command to run all tests.
- Adjusted the main CLI exit behavior to ensure proper termination in CI environments.
- Added `.claude/settings.local.json` to `.gitignore` to prevent local settings from being tracked.
2025-08-28 20:49:11 -07:00
Ola Hungerford
30a7d5e484
Merge branch 'main' into parse-tool-arg 2025-08-11 08:01:53 -07:00
Felix Weinberger
68319704f0
Update test to match new server selection behavior
Test 30 now expects an error when multiple servers exist, even with
"default-server" present, aligning with the simplified logic that only
auto-selects when there's exactly one server.
2025-08-07 21:02:29 +01:00
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
olaservo
dbacec64bd Fix formatting 2025-08-01 20:40:28 -07:00
olaservo
491a8dcadd Add separate tool tests 2025-07-27 08:16:19 -07: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