Commit graph

1,464 commits

Author SHA1 Message Date
Ola Hungerford
e604321024
Merge branch 'main' into debugger-auth-svr-metadata 2025-08-12 06:44:32 -07:00
Cliff Hall
5e6095d1fa
Merge pull request #698 from KKonstantinov/feature/inspector-oauth-client-provider-state
OAuth state parameter for InspectorOAuthClientProvider via reusable generateOAuthState helper
2025-08-12 09:24:41 -04:00
2underscores
9ef2a6c22d Use new auth svr discovery method from latest auth SDK 2025-08-12 14:13:31 +10:00
Konstantin Konstantinov
60049a5b6c
reorder methods 2025-08-12 00:29:53 +03:00
Konstantin Konstantinov
929b930618
reusable generateOAuthState helper, introduce in InspectorOAuthClientProvider and in oauth-state-machine, add test 2025-08-11 21:24:26 +03:00
Ola Hungerford
113b612b99
Merge pull request #673 from matsjfunke/fix/fastmcp-union-types
fix: support FastMCP union types in tool parameter forms
2025-08-10 20:04:46 -07:00
Mats Julius Funke
73bf133646
Merge branch 'main' into fix/fastmcp-union-types 2025-08-10 12:01:56 +02:00
Cliff Hall
7a8da0723c
Merge pull request #692 from olaservo/bump-version 0.16.3
Bump version
2025-08-08 22:30:35 -04:00
Ola Hungerford
62926b61ff
Merge branch 'main' into bump-version 2025-08-08 18:35:10 -07:00
olaservo
b89b10beac Bump version 2025-08-08 15:46:58 -07:00
Felix Weinberger
7b3e2c19e7
Merge pull request #661 from modelcontextprotocol/fweinberger/better-config-support
feat: Auto-detect transport type from config files
2025-08-08 09:51:52 +01: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
1263ffdf58
Simplify server auto-selection logic
Only auto-select when there's exactly one server in the config file.
Removes special handling for "default-server" naming convention.

Addresses review feedback from @ochafik on PR #661
2025-08-07 20:45:23 +01:00
Felix Weinberger
14b01815ad
prettier 2025-08-07 12:01:17 +01:00
Felix Weinberger
cf7c138958
Fix --server-url flag not being parsed by CLI
Add --server-url option to CLI parser so the flag is properly recognized
and passed through to the server process via the /config endpoint.
2025-08-07 11:58:08 +01:00
Felix Weinberger
e1e702ff14
ignore: ignore mcp.json as a common dev file 2025-08-07 11:42:31 +01:00
Felix Weinberger
98b7e63bb0 Add --transport flag support to CLI
- Add --transport option to command line parser
- Support --transport stdio/sse/http flags
- Convert 'http' to 'streamable-http' internally
- Fix transport type conversion for CLI mode
2025-08-06 19:50:23 +01:00
Mats Julius Funke
197822432a
Merge branch 'main' into fix/fastmcp-union-types 2025-08-06 17:02:27 +02:00
Felix Weinberger
7ea47c0caa
Fix transport type propagation from CLI to web client
- Add --transport and --server-url support to client/bin/start.js
- Pass transport configuration through server to client via /config endpoint
- Update client App.tsx to use defaultTransport and defaultServerUrl from server
- Ensure SSE and HTTP transport configs work properly from CLI
2025-08-05 19:38:44 +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
3a4f3bc510
Document transport types and default-server functionality
- Add examples for stdio, sse, and streamable-http transport types
- Document automatic server selection behavior
- Show how to use default-server in config files
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
a7675d1be2
Add Playwright e2e tests for CLI argument handling
- Test that transport and serverUrl parameters are correctly passed via URL
- Verify SSE and streamable-http transport types are handled
- Test default STDIO behavior
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
b6dc2ceeb9
Remove transport/serverUrl parsing from start.js
Move transport configuration parsing to cli.js as suggested in PR review. The CLI entry point (cli.js) should handle config file parsing and pass parameters to start.js.
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
Felix Weinberger
acf6c1e118
feat: Auto-detect transport type from config files
When launching the inspector with --config, automatically set the transport
dropdown and server URL based on the config file contents. This eliminates
the need to manually switch between stdio/sse/streamable-http in the UI.

- Use discriminated union for ServerConfig to properly type different transports
- Detect transport type and URL from config, pass via query params
- Maintain backwards compatibility for configs without explicit 'type' field
- Add comprehensive tests for the new functionality

Improves UX by making the config file the single source of truth for
server settings.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-05 14:08:57 +01:00
Ola Hungerford
aa6a98ae52
Merge pull request #681 from modelcontextprotocol/fweinberger/fix-npx-no-args
bugfix: fix `npx @modelcontextprotoco/inspector` failing on main
2025-08-05 05:14:03 -07:00
Felix Weinberger
de16a18e2f
fix: use spread operator to avoid empty string arguments
This fixes the regression introduced in dc5fa6a where empty strings
were passed as arguments when no command or args were provided,
causing parseArgs to fail with "Unexpected argument ''" error.

The spread operator approach is more idiomatic and avoids creating
empty strings that need to be filtered out.
2025-08-05 11:50:06 +01:00
Mats Julius Funke
fda879ccc1
ci: added test for the DynamicJsonForm 2025-08-04 09:32:24 +02:00
Mats Julius Funke
cc3f9df33c
fix: fix type error by handling array of types in JSON schema validation 2025-08-04 09:26:24 +02:00
Ola Hungerford
1b03d1cfe1
Merge branch 'main' into fix/fastmcp-union-types 2025-08-03 12:37:01 -07:00
Ola Hungerford
cf44b30bcc
Merge pull request #664 from richardkmichael/fix-dashed-mcp-args
fix: Argument notation to allow parseArgs to parse leading dash-options
2025-08-03 12:33:55 -07:00
Mats Julius Funke
d4f8e061f3
ci: added tests for the union type 2025-08-03 10:34:40 +02:00
Mats Julius Funke
1d960a1b9a
fix: added explicit handling for float & int 2025-08-03 10:34:19 +02:00
Mats Julius Funke
5469993e27
fix: add boolean union type support for FastMCP optional booleans 2025-08-02 16:35:42 +02:00
Mats Julius Funke
bcba0dc007
fix: removed tools tab test as its probably overkill and introduces to much new code 2025-08-02 16:11:43 +02:00
Mats Julius Funke
edd10e48a9
fix: updated import path npm test passes now 2025-08-02 16:01:16 +02:00
Mats Julius Funke
f73d8e6f8a
fix: support FastMCP union types in tool parameter forms 2025-08-02 15:59:45 +02:00
Cliff Hall
7f1d924ead
Merge pull request #650 from richardkmichael/minor-dependencies
Update minor dependencies
2025-08-01 15:39:49 -04:00
Ola Hungerford
33dbf8399e
Merge pull request #615 from KKonstantinov/bugfix/authorization-url-generate-state
OAuth Flow: generate random state parameter in oauth state machine
2025-07-31 18:45:05 -07:00
Ola Hungerford
816f6c2c4c
Merge branch 'main' into bugfix/authorization-url-generate-state 2025-07-31 18:41:24 -07:00
Ola Hungerford
21bb00499f
Merge pull request #611 from antholeole/oleina/logging
initalize logging after connection
2025-07-31 18:13:30 -07:00
Richard Michael
dc5fa6a0f5 fix: Argument notation to allow parseArgs to parse leading dash-options
The server was invoked as:

`server/build/index.js --command comm --args arg1 arg2 arg3`

(`arg1 arg2 arg3` is a string in ARGV; the single value of `--args`.)

`util:parseArgs()` cannot handle an argument value with a leading dash
with this usage.

e.g.,

`server/build/index.js --command npm --args --silent --prefix path/to/servers/src/everything run start`

The above will throw, and indicate correct usage:

```
TypeError [ERR_PARSE_ARGS_INVALID_OPTION_VALUE]: Option '--args' argument is ambiguous.
Did you forget to specify the option argument for '--args'?
To specify an option argument starting with a dash use '--args=-XYZ'.
```

However, since users do not control the invocation of the server, they
cannot adjust the notation for their use-case.

`arguments`, and `command`, are unknown user input, so adjust the
argument form to the more lenient and robust notation.  Although a
`command` beginning with `-` seems unlikely, consistent handling of both
improves code clarity and simplicity.

Running the server directly (e.g., on the command line in development)
may continue to use: `--args arg1 arg2 arg3` if desired, so this is a
non-breaking change.
2025-07-31 12:08:47 -07:00
oleina
eec20ff1fc add missing close bracket 2025-07-31 10:20:47 -07:00
Ola Hungerford
cea2b6fe00
Merge branch 'main' into bugfix/authorization-url-generate-state 2025-07-30 21:28:45 -07:00
Ola Hungerford
aba186c955
Merge pull request #616 from erichoracek/dev/eh/tool-meta-support
feat: Add _meta field support to tool UI
2025-07-30 21:27:56 -07:00
Ola Hungerford
14657973bd
Merge branch 'main' into dev/eh/tool-meta-support 2025-07-30 21:20:21 -07:00
Ola Hungerford
ad8755f84c
Merge branch 'main' into oleina/logging 2025-07-30 21:17:06 -07:00